惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
小众软件
小众软件
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
Jina AI
Jina AI
博客园 - 【当耐特】
V
Visual Studio Blog
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
量子位
IT之家
IT之家
G
Google Developers Blog
V
V2EX
The GitHub Blog
The GitHub Blog
月光博客
月光博客
GbyAI
GbyAI

2024 Sonatype Blog

Reduce AI Token Waste by Getting Decisions Right Earlier Optimising Out the Waste in Open Source Publishing The CRA Reporting Deadline Is Almost Here Hugging Face Security Incident: A New Class of Threat Is Here The AI Productivity Paradox: More Code, Not More Delivery A Reported Log4j RCE Is More Complicated Than It Looks Why Financial Services Is the Canary in the Code Mine 91 Spring CVEs: The AI Vulnerability Consumption Problem An Air Gap Doesn Securing Software at the Speed of AI: What Four Years of Data Reveal Major Themes at Black Hat 2026 Six npm Packages Use Ethereum Transactions to Retrieve Malicious Payloads Flooding Dropper Hits npm With 850 Malicious Packages Mini Shai-Hulud npm Attack: More Than 2,200 Components Impacted 5 Reasons Developers Still Download Malicious Packages Defining Community Open Source Is Harder Than It Looks Walking the Walk on Package Registry Sustainability AI Changes the Software Supply Chain and How We Secure It The Hugging Face Incident Changes the Vulnerability Equation What Is Grounding? Why AI Coding Assistants Need Better Intelligence Open Source, Open Infrastructure, and the Space Between Request for Comments: CARE and Maven Central Q2 2026 Open Source Malware Index AI Is Forcing a New Open Source Security Model Vulnerability Prioritization Is Missing the AI-Era Point The Hidden National Security Threat Inside AI-Driven Software Miasma Returns: Leo Platform Compromise in npm The Rise of Collective Defense for Open Source Signal Over Noise: Reachability Analysis Is the Reality Check SCA Has Been Missing Software Security Has to Start at Assembly
Red Hat Cloud Services npm Packages Hijacked
Sonatype Security Research Team · 2026-06-02 · via 2024 Sonatype Blog

A new wave of malicious npm activity has been reported involving multiple packages in the legitimate @redhat-cloud-services namespace.

Public analysis from security researchers indicates that affected package versions contained install-time malware executed through npm lifecycle scripts, exposing developer machines and CI/CD environments to credential theft, persistence, and possible downstream package propagation.

Attackers included GitHub dead-drop repositories in the secondary payload containing the phrase "Miasma: The Spreading Blight." Sonatype is referencing Miasma in that context, as a campaign marker observed in reported payload behavior, not as independent attribution to a specific threat actor.

Some industry researchers connected this activity to TeamPCP and the broader Shai-Hulud malware campaigns. However, definitive attribution remains unclear.

The activity appears to use credential-theft techniques similar to those seen in recent npm supply chain campaigns, which may also reflect copycat behavior as attackers adopt methods that have already proven effective.

Compromised Packages in a Trusted Namespace

Several npm packages under the @redhat-cloud-services scope were compromised and published with embedded malicious code.

These were not typosquatted or lookalike packages, but rather legitimate packages in a trusted namespace, which makes the incident especially relevant for organizations that rely on package reputation or historical usage as indicators of safety.

Affected packages include, but are not limited to:

  • @redhat-cloud-services/types

  • @redhat-cloud-services/frontend-components

  • @redhat-cloud-services/rbac-client

  • @redhat-cloud-services/javascript-clients-shared

  • @redhat-cloud-services/host-inventory-client

How the 'Miasma' Campaign Behaves

Sonatype Research observed that the affected Red Hat packages execute a heavily obfuscated script upon installation which attempts to download and run a second-stage payload from the author's server. Because this behavior is triggered during package installation, the payload can execute before application code imports the package or developers have a normal reason to inspect runtime behavior.

The second-stage payload appears to act as a Bun downloader with several malicious objectives:

  • It can gather and exfiltrate environment variables, AWS credentials, and developer secrets.

  • It also attempts to replicate by using discovered npm tokens to republish modified versions of packages the token can access, including use of npm's bypass_2fa parameter to bypass two-factor authentication protections.

  • In addition, the payload can modify Claude Code and VS Code settings to inject malicious code that runs at the beginning of each session.

Simply removing the package may not be enough. If an affected version was installed, the host should be considered potentially compromised, and teams should investigate whether the second-stage payload downloaded additional malicious software or established persistence.

Why The Red Hat Compromise Matters

The Red Hat compromise and subsequent npm supply chain attack reinforces a notable pattern: attackers are increasingly targeting trusted packages, maintainers, automation tokens, and publishing workflows.

A package can appear safe because, increasingly often, a malicious package was safe yesterday. It may have a legitimate namespace, real maintainers, meaningful download history, and valid package metadata.

But if an attacker compromises the publishing path, a newly released version can become malicious while retaining the trust signals developers and automated pipelines already accept.

This should be treated as more than a dependency cleanup issue. For organizations that installed affected versions, it may be a credential exposure and CI/CD security incident.

What to Do if You Installed Malicious Versions

Organizations that may have downloaded affected @redhat-cloud-services package versions should begin by identifying exposure across source repositories, lockfiles, CI/CD logs, package caches, developer machines, and container images.

Recommended first steps include:

  1. Search package.json, lockfiles, SBOMs, package caches, and build images for affected @redhat-cloud-services packages and versions.

  2. Review CI/CD logs to determine if affected packages were installed with lifecycle scripts enabled.

  3. Identify developer workstations or runners where npm install, npm ci, or equivalent commands may have executed the malicious versions.

  4. Treat exposed environments as potentially compromised, especially if credentials were available during installation.

  5. Isolate affected systems before rotating credentials where compromise is suspected.

  6. Review GitHub, npm, cloud, and CI/CD audit logs for unexpected token use, repository changes, workflow edits, or package publishes.

  7. Rotate exposed credentials from a clean environment after containment.

  8. Rebuild CI runners, containers, or developer systems where compromise cannot be ruled out.

  9. Assume the blast radius extends beyond the originally affected project and investigate other accessible projects and repositories for signs of compromise or propagation.

Teams should also look for suspicious install-time behavior, including unexpected preinstall scripts, unusually large or obfuscated JavaScript files, Bun execution during npm installation, unexpected outbound traffic during dependency installation, and suspicious changes to GitHub workflows or developer tool configuration files.

What Sonatype Customers Should Do

Sonatype customers should use their existing software composition analysis, repository management, and policy controls to identify and manage exposure to the affected package versions.

Recommended actions include:

  • Search for affected @redhat-cloud-services packages and versions across applications, builds, repositories, and SBOMs.

  • Review policy violations and malicious package intelligence as Sonatype data is updated.

  • Block or quarantine confirmed malicious versions.

  • Review dependency update automation to ensure compromised versions are not introduced through automated pull requests.

  • Use repository controls to reduce direct dependency retrieval from the public npm registry where appropriate.

  • Coordinate with security, DevOps, and application teams to determine whether any CI/CD credentials or developer machines were exposed.

  • Expand the investigation to your other repositories for signs of propagation, including unexpected commits, workflow changes, or package releases.

  • Leverage Sonatype Guide to help developers and AI coding assistants evaluate component health, security, and version risk before introducing or updating dependencies.

Trust Should Be Continuously Re-Evaluated

The reported @redhat-cloud-services compromise, with the descriptor "Miasma: The Spreading Blight," is another reminder that modern open source attacks are not limited to obscure packages or obvious social engineering.

For security teams, open source governance must move beyond static allowlists and one-time dependency approval. The question is not only if a package was safe when it was first adopted, but whether each new version, install-time behavior, and build environment interaction remains safe now.

Defending against this class of attack requires treating every new package version as a new risk decision, even when the package itself is familiar.

Tags

Red Hat npm security research supply chain attacks malicious code npm Malware Sonatype Guide