Red Hat hit by npm supply‑chain attack – here’s how to stay safe


red hat logo

John Keeble/Getty Images

Follow ZDNET: Add us as a preferred source on Google.


ZDNET’s key takeaways

  • Red Hat was the victim of an npm security breach.
  • The company has removed the affected packages.
  • Check whether you use @redhat-cloud-services npm namespace.

The npm repository namespace –the JavaScript runtime environment Node.js package manager — is infamous for security breaches. Now, Red Hat, which, with IBM, just announced Project Lightwell, an AI-powered initiative to find and fix open-source software vulnerabilities, has an npm problem of its own.

Also: Open-source security is a mess – IBM and Red Hat bet $5 billion and 20,000 engineers can fix it

Dozens of JavaScript packages in the company’s @redhat-cloud-services namespace were backdoored with credential-stealing malware targeting secrets in Red Hat developers’ and continuous integration and continuous deployment (CI/CD) systems. The security research company Aikido reported that the namespace was “compromised with a credential-stealing worm. In total, 96 versions across 32 packages have been compromised, cumulatively downloaded 116,991 times per week.”

According to Red Hat security, someone used a compromised GitHub account to inject malicious code into packages maintained in a Red Hat GitHub organization. The affected packages are front-end libraries compiled and bundled into container images during the Red Hat product build process.

What exactly happened?

It appears the malware was added via npm preinstall hooks: Whenever a developer or build system ran “npm install” for an affected package, the malicious code was automatically executed. According to Microsoft’s threat intelligence team, each compromised package added a preinstall script that ran a bloated, heavily obfuscated index.js loader, which then pulled down and executed a payload designed to vacuum up secrets from npm, GitHub, AWS, SSH, and other environments.

Researchers quickly linked the attack to a broader campaign based on the Mini Shai-Hulud malware,  an npm-propagating worm used in earlier supply-chain incidents. In the Red Hat case, multiple reports refer to the payload as a new variant dubbed Miasma, which retains Mini Shai-Hulud’s self-spreading behavior while adding more obfuscation and a multistage loading design.

The worm does more than just steal credentials. Once it’s running on a machine with access to other npm packages, it identifies every package the current user can publish and republishes them with the same malicious preinstall payload. That is, each victim becomes a new attacker. Security firms say this “wormable” behavior is what enabled the Red Hat-associated namespace to be contaminated so quickly. Some estimates suggest that more than 30 packages were backdoored in a matter of minutes.

Also: Red Hat Desktop vs. Fedora Hummingbird: Which AI development Linux path is right for you?

While Red Hat hasn’t yet published a detailed post-mortem, independent analyses point to compromised GitHub infrastructure as the initial access vector. Semgrep and other security research companies report that the malicious Red Hat-scoped packages were pushed using GitHub Actions OpenID Connect (OIDC) tokens associated with the RedHatInsights/javascript-clients repository.

Once in, the attackers injected the preinstall hook into multiple packages and versions, often without any corresponding changes in the public source repositories. This is a classic hallmark of build-pipeline compromise.

The executed code scans for and attempts to exfiltrate the following:

  • GitHub Actions secrets and access tokens
  • GitHub SSH keys and personal access tokens
  • AWS, GCP, and Azure cloud credentials
  • Kubernetes configuration and tokens
  • HashiCorp Vault tokens and other secret manager data
  • npm and CircleCI tokens, plus other CI/CD secrets stored in environment variables or configuration files

Also: Rust will save Linux from AI, says Greg Kroah-Hartman

Security vendors warn that anyone who installed the affected versions on a developer workstation, build agent, or CI runner should assume that all accessible tokens and credentials from that environment may now be in an attacker’s hands.

For developers, guidance from multiple firms is explicit:

  1. Rotate secrets immediately.
  2. Audit GitHub and cloud activity for suspicious access.
  3. Rebuild any potentially contaminated environments from known-good baselines.

Red Hat told me, “We immediately initiated an investigation and removed the packages from the npm registry. The packages are strictly limited to internal development, and the malicious code was never published for customer consumption via the console.redhat.com system. While our investigation is ongoing, we have not identified any impact on customer or partner environments or Red Hat production systems.”

In short, this could have been much worse.

Also: Ubuntu 26.04 is the OS for the AI agentic era, says Canonical’s Mark Shuttleworth

In earlier, more general guidance on npm supply-chain attacks, Red Hat Product Security stated that its products rely heavily on strict version pinning and internal mirrors, and that no previously compromised npm packages had been incorporated into supported Red Hat software. 

In the wake of the recent incident, however, security researchers are urging organizations not to assume they are safe simply because they use Red Hat offerings. They argue that any build or developer workflow that touched the backdoored packages should be treated as potentially compromised.

What should you do now?

While Red Hat is assuring everyone that the bad code didn’t make it into the public, I remain wary. If you rely on Red Hat cloud services tooling or have ever pulled @redhat-cloud-services packages into your builds, I’d recommend scanning dependency trees for the affected versions, blocking the known-bad releases, and downgrading or replacing them with trusted builds where necessary. 

At the same time, I’d assume that any environment where those packages were installed may have had its secrets exposed, and rotate all relevant credentials, for example, GitHub PATs, SSH keys, cloud provider API keys, and CI tokens.

Also: How digitally sovereign is your organization? This Red Hat tool can tell you in minutes

In the long term, the Red Hat npm incident shows again that the npm repositories aren’t all that trustworthy. With even heavyweight Linux and cloud vendors now demonstrably vulnerable to wormable npm malware, the pressure is mounting on both npm’s stewards and major software suppliers to provide stronger guarantees about the provenance and safety of their packages.

In other words, while Red Hat may have pie on its face from this episode, it also underscores just how important Project Lightwell and similar efforts, such as Chainguard’s efforts to find a way to improve everyone’s open-source security, are.





Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews






It’s easy to assume that vehicles all had internal combustion engines until very recently. Gasoline and petrol engines were the standard for decades, after all, so why would early vehicles be any different? In reality, the early days of the automobile era were more varied than you might expect, and even featured a range of electric cars. Yes, despite electric vehicles not truly taking off until the 21st century, the first electric vehicles are much older than you think; drivers in the 1900s were going around town in electric vehicles — and where there are EVs, there are charging stations.

One such station, visible in the image above, was the creation of General Electric. Formally called the mercury arc rectifier, it took alternating current and sent it through vaporized mercury in a glass tube. This converted it into direct current, which powered up the EV’s battery. The woman in the image, who’s charging a Columbia Mark 68 Victrola, is standing at the control panel, which allowed a user to adjust power levels. 

These chargers could be installed everywhere, including homes, businesses, and public parking garages, supporting the electric vehicle boom of the early 20th century. While 21st-century EV chargers have come a long way from where they were, the basic building blocks are all still there, and it’s fascinating to see.

How EV chargers have evolved since the early 20th century

EV charging has changed a lot in some ways — but not in others. At the core of it all is the aforementioned conversion from AC to DC, which still happens when you charge modern EVs at standard charging stations. The difference is that your vehicle’s on-board charger performs the conversion, not the charger. Old EV chargers took between several hours and a day to charge, and current-day units can similarly take a few hours to well over a day from empty, depending on the charger’s speed. Fast chargers, which provide DC directly, can cut this down to around an hour or less.

Old-school and modern EV chargers also differ in how they provide power to the vehicle. Mercury arc rectifiers connected directly to the negative terminal of the lead-acid battery that needed charging. Nowadays, EVs use dedicated charging ports. Battery swapping was also commonplace in the early 1900s, and companies like General Electric tried to cash in by offering to replace drivers’ old, run-down batteries with new ones for a fee. That’s not yet possible with most mainstream EVs, although companies like Stellantis have tried to introduce EV battery swapping with moderate success.

Even if they were unrefined compared to today’s models, early EVs seemed to be on to something. Why, then, did electric cars fail, and how did gasoline end up becoming the predominant power source for vehicles?

What led to the downfall of the original wave of electric cars

EVs were no mere fad in the 1900s and 1910s. According to the 1900 United States census, 1,575 of the 4,192 vehicles sold that year were electric, with the value of these early EVs — $2,873,464 — accounting for more than half of the total market value of $4,899,443. It wasn’t just EVs, either; other sources of propulsion, like steam, were also vying for a foothold in the automobile market. By the 1920s and 1930s, though, these had all been superseded by the internal combustion engine.

One of the major drawbacks of early EVs was the fact that electricity was not yet widely available. Electrical hookups were a rarity outside of major cities, limiting the use of these vehicles. The lead-acid batteries they used also had their fair share of issues. They needed to be inspected, cleaned, and repaired every few days, making them more of an inconvenience than anything. Worse yet, they had poor mileage, and, with chargers possibly out of reach, many likely didn’t want to risk being stranded while out for a drive.

Eventually, price reductions for gas cars and improvements such as electric starters and better reliability prompted buyers and automakers alike to move away from electric rides. Thus, while the best-selling EVs of 2026 show that it’s a good time for EVs, this electric boom plainly isn’t the first of its kind. Early EVs eventually fizzled out, but they still set the stage for our current fascination with electric vehicles.





Source link