Security

Red Hat npm Miasma Attack Hits CI/CD Supply Chains

3 min read

Summary

Microsoft Threat Intelligence uncovered a large-scale npm supply chain attack involving trojanized packages under the @redhat-cloud-services scope. The campaign abused a compromised CI/CD publishing workflow to deliver credential-stealing malware targeting GitHub, npm, AWS, Azure, GCP, Kubernetes, and developer systems, making it especially relevant for security teams and DevOps administrators.

Need help with Security?Talk to an Expert

Introduction

Microsoft has disclosed a significant software supply chain attack affecting npm packages published under the @redhat-cloud-services namespace. The campaign, dubbed Miasma, shows how attackers can abuse trusted CI/CD publishing workflows to distribute malicious packages with legitimate-looking provenance, raising the stakes for organizations that rely on open-source dependencies in build pipelines.

What’s new

Microsoft Threat Intelligence found that attackers compromised the upstream RedHatInsights/javascript-clients CI/CD pipeline and used the legitimate GitHub Actions OIDC publishing flow to push 32 malicious packages across more than 90 versions.

Key technical findings include:

  • Malicious preinstall hook: The infected packages executed automatically during npm install via a weaponized preinstall script.
  • Multi-stage malware chain: The package launched an obfuscated 4.29 MB dropper, decrypted additional payloads, downloaded the Bun runtime, and executed a second-stage stealer.
  • Broad credential theft: The malware targeted secrets from GitHub, npm, AWS, Azure, GCP, HashiCorp Vault, Kubernetes, and local developer environments.
  • CI/CD-focused behavior: On Linux runners, it scraped GitHub Actions runner memory for secrets and attempted privilege escalation using passwordless sudo.
  • Worm-like propagation: The payload tried to republish poisoned packages from compromised maintainer accounts using forged provenance metadata.
  • Destructive capability: In some scenarios, the malware could trigger rm -rf ~/, wiping a victim’s home directory.

Why this matters for administrators

This attack is notable because the malicious packages were published through a trusted publisher workflow, meaning they carried authentic provenance signatures. For IT and security teams, that weakens assumptions that signed or provenance-backed packages are automatically safe.

Organizations running Linux-based CI/CD pipelines are at particular risk, but developer workstations on Windows, macOS, and Linux were also targeted. Any environment with cached cloud credentials, SSH keys, browser data, or package publishing tokens could be exposed.

Administrators should take the following actions immediately:

  • Audit environments for any use of affected @redhat-cloud-services packages and related versions.
  • Rotate exposed credentials, especially for GitHub, npm, Azure, AWS, GCP, Vault, and Kubernetes.
  • Review CI/CD runners for unusual process chains such as node -> shell -> bun.
  • Check for unauthorized package publishing activity and suspicious provenance metadata.
  • Harden build agents by reducing token scope, limiting sudo access, and isolating runner secrets.
  • Use Microsoft Defender and related security tooling to investigate signs of credential theft or downstream package tampering.

Microsoft says it coordinated with npm to remove affected repositories and add protections to the namespace. Security teams should still treat this as a reminder to strengthen dependency governance, monitor software publishing workflows, and validate secrets exposure in CI/CD systems.

Need help with Security?

Our experts can help you implement and optimize your Microsoft solutions.

Talk to an Expert

Stay updated on Microsoft technologies

npmsoftware supply chainCI/CD securitycredential theftMicrosoft Defender

Related Posts

Security

SCKit ScreenConnect Attack: MSPs Must Hunt Now

Microsoft Threat Intelligence confirmed a campaign abusing ConnectWise ScreenConnect to deploy unauthorized remote-access clients and the SCKit worm on MSP-managed endpoints. The activity can also target technician sessions, making this a high-priority incident for defenders because removing a rogue client alone does not eliminate persistence or invalidate exposed sessions.

Security

AI Agent Supply Chain Attacks Target Coding Tools

Microsoft Security researchers detailed two post-training supply chain attack paths that can backdoor coding and terminal agents: dataset poisoning and model poisoning. The findings matter because compromised agents can misuse tools, execute commands, and access sensitive environments even when prompts appear benign, reinforcing the need for stronger controls around training data, model provenance, and tool permissions.

Security

GSocket C2 Abuse: Microsoft Warns of Stealthy Persistence

Microsoft has observed multiple threat actors deploying the open source GSocket remote access tool on compromised Linux web servers to maintain access after the original vulnerability is patched. The technique relies on outbound-only encrypted connections through a shared relay network, making traditional IP or domain blocking far less effective and raising the need for host-level investigation and egress monitoring.

Security

Linux Kernel Bug Reports: 59 Findings From Microsoft

Microsoft’s FORGE Lab detailed how its MDASH project turned 26,502 Linux kernel scan findings into 59 upstream bug reports and 33 CVEs, with 38 fixes already merged. The research highlights both the promise of AI-assisted vulnerability discovery and the continued need for expert validation, patching, and coordination with upstream maintainers.

Security

AI Sleeper Agent Threat: Microsoft Shares Defenses

Microsoft Research says AI models can be backdoored by editing fewer than 10 neurons, creating sleeper agents that pass evaluations but execute attacker commands when triggered. The findings matter because autonomous agents often run with privileged access, making model weight integrity, auditing, and runtime controls critical for enterprise AI security.

Security

Rust Memory Safety Issues Found by Microsoft FORGE

Microsoft FORGE Lab disclosed several memory safety issues in Rust’s standard library, including cases where safe Rust code could still trigger undefined behavior. The research, aided by the Hyenas AI vulnerability-scanning system, highlights recurring unsafe-code design pitfalls that matter for developers and security teams relying on Rust at scale.