TL;DR: A new Shai-Hulud and Miasma malware variant spread through a compromised npm developer account, affecting 23 packages, 52,640 monthly downloads, and 338 GitHub repositories with stolen credentials, according to OXSecurity. The incident shows how developer accounts, tokens, and package-install execution paths can turn supply chain compromise into NHI exposure faster than conventional review cycles can respond.
At a glance
What this is: OXSecurity describes a Shai-Hulud npm malware variant that abused a compromised developer account to spread across packages and harvest credentials from GitHub and cloud environments.
Why it matters: It matters because software supply chain compromise now reaches NHI governance directly, exposing how developer accounts, tokens and build-time execution paths can bypass conventional identity controls.
By the numbers:
- Total affected packages were 23 in the Shai-Hulud / Miasma / Hades variant reported by OXSecurity.
- OXSecurity found 338 repositories in GitHub with stolen credentials during the spread of the malware variant.
Context
The core problem is not just package malware, but the trust chain that lets a compromised developer account turn a normal npm publish into credential theft at scale. In this case, the attack blended supply chain compromise, GitHub credential harvesting and cloud secret exposure, which makes it an identity governance problem as much as a software integrity problem.
The malware's use of package-install execution means the harm occurs before many organisations have a chance to apply endpoint or SIEM-based response. For teams responsible for IAM, PAM and NHI governance, the article is a reminder that developer identities, tokens and CI-linked secrets now sit on the attack path as first-class assets.
The starting position here is unfortunately typical for modern supply chain incidents: one compromised account, trusted distribution paths and broad downstream exposure.
Key questions
Q: What breaks when a trusted npm package can execute post-install code?
A: The boundary between dependency installation and code execution breaks down, which means a trusted package can inspect files, environment variables, and cached credentials during a normal install. That turns developer machines and build agents into secret harvesting targets. Teams need to treat package execution as a controlled privilege, not a routine background step.
Q: Why do leaked developer tokens create such a large blast radius in supply chain attacks?
A: Developer tokens often bridge source control, package registries and cloud access, so one leaked credential can unlock several trust domains at once. The risk is amplified when the same token or secret is reused across repositories, runners and automation workflows.
Q: How can security teams tell whether NHI secrets are being reused across repositories?
A: Look for the same token patterns, identical secret material, repeated infection strings and matching access artefacts across multiple repositories and CI logs. Reuse is a warning sign because one compromise can then propagate through every environment that accepted the same credential.
Q: Should organisations separate package publishing identity from CI runtime identity?
A: Yes. Publishing, build execution and deployment should use distinct identities with narrow scopes, because a compromise in one should not automatically expose the others. Separation limits how far an attacker can move when a maintainer account, workflow file or CI secret is abused.
Technical breakdown
How a compromised npm account turns into supply chain execution
A compromised publishing account becomes an execution channel when malicious code is inserted into a package that runs at install time. In this case, the article says the variant used a preconfigured binding.gyp file, which can execute during package installation and bypass the assumption that package consumption is passive. That matters because dependency trust is often treated as a distribution issue, when it is really a runtime execution decision. Once the package is installed in developer or CI environments, the attacker gains a path to local secrets, cloud credentials and tokens without needing a separate exploit chain.
Practical implication: treat package-install execution as a privileged control point, not a routine developer workflow.
Why stolen tokens and cloud credentials matter in NHI governance
The malware's stated payload targets GitHub tokens, npm tokens and cloud credentials for AWS, GCP and Azure. Those artefacts are non-human identities in practice because they authenticate software and automation rather than people, and they often persist beyond the session in which they were captured. When those credentials are harvested from developer workstations or build contexts, the attacker can move from package compromise to repository access, secret reuse and cloud abuse. The governance failure is not only leakage, but also the lack of lifecycle control over where machine credentials exist and who can mint or reuse them.
Practical implication: inventory, rotate and scope developer and CI-bound secrets as governed NHI assets.
Why the infection spread faster than review cycles
The report ties the infection to 338 repositories containing stolen credentials, which shows how quickly a supply chain compromise can propagate through shared tooling and copied secrets. The article also notes that the same spread technique reused a GitHub commit search pattern, suggesting the actor relied on publicly reachable artefacts and existing trust relationships rather than bespoke intrusion. That makes manual review or delayed triage a weak defence, because the compromise advances through normal collaboration paths. The governance gap is the assumption that credential abuse will be visible only after a human review loop has time to react.
Practical implication: monitor for credential reuse and secret spillover across repositories, not just the initial package compromise.
Threat narrative
Attacker objective: The attacker sought to turn a trusted npm publishing account into a credential-harvesting and propagation channel that exposed developer, GitHub and cloud access.
- Entry occurred through a compromised npm developer account that was used to publish malicious package updates to the registry.
- Credential harvesting then targeted GitHub tokens, npm tokens and cloud credentials from installed environments and infected repositories.
- The malware spread through package-install execution and reused GitHub-based infection paths, expanding exposure across additional repositories and downstream systems.
- Impact was credential theft at scale, with 23 packages affected, 52,640 monthly downloads exposed and 338 repositories found containing stolen credentials.
Breaches seen in the wild
- Shai-Hulud npm worm first wave 2025: The first Shai-Hulud wave used stolen npm tokens to trojanise 500+ packages, starting with tinycolor, and leaked developer and CI secrets on GitHub.
- CircleCI breach 2023: Malware stole a CircleCI engineer's SSO session; attackers exfiltrated customers' CI/CD secrets and keys, forcing a platform-wide rotation.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
This is an NHI governance failure disguised as malware. The article is not only about malicious code in npm, but about the trust placed in developer accounts, tokens and install-time execution. Once those identities are used to publish or run code, the boundary between software supply chain security and machine identity governance disappears. Practitioners should treat package publishers, CI runners and cloud tokens as a single governed trust surface.
Standing trust in developer credentials creates a reusable blast radius. The compromise of one npm account is enough to seed malware, capture secrets and contaminate downstream repositories because the same identities are often reused across package publishing, source control and cloud access. This is exactly the kind of cross-environment credential persistence that conventional review cycles struggle to see. The right governance frame is not just detection, but reducing the lifetime and reusability of those identities.
Package-install execution is the real control gap here. If untrusted package installation can execute logic at install time, then the organisation has allowed code delivery to become code execution. That shifts risk from the repository to the workstation, the runner and the build pipeline. Security teams should align this with software supply chain controls and NHI stewardship, because the exposed artefacts are often the same credentials used to automate production access.
Secret spillover turns a single compromise into a multi-system incident. The 338 repositories with stolen credentials show that once machine secrets leak, the incident no longer stays within the original package or account. The governing assumption that repository boundaries contain credential exposure has clearly failed. Practitioners should conclude that secret discovery and revocation must happen at the speed of publication, not the speed of human investigation.
Shai-Hulud-style campaigns are now a governance pattern, not an anomaly. Repeated variants with different public keys, infection strings and propagation methods show a mature playbook built around credential theft and trusted distribution. That means teams need controls for non-human identity inventory, package provenance and automated secret containment as standard operating assumptions. The practitioner takeaway is to govern the trust path, not just inspect the payload.
From our research library:
- 59% of compromised machines in a major 2025 supply chain attack were CI/CD runners rather than personal workstations, according to the State of Secrets Sprawl 2026.
- 92% of organisations expose NHIs to third parties, raising concerns about supply chain security, according to the Ultimate Guide to NHIs.
What this signals
Package-install execution is now a governance problem, not only a malware problem. When malicious logic runs as part of dependency installation, teams lose the safety margin they assume exists between package review and runtime execution. That pushes control design toward provenance, signing and tighter dependency trust boundaries rather than relying on later-stage detection.
Machine identities exposed in development paths need the same lifecycle discipline as production access. Tokens used by developers, build agents and publishing workflows are still identities, and they should be inventoried, scoped and revoked like any other privileged credential. Without that discipline, one compromised account can unlock source control, package registries and cloud systems in sequence.
Repository sprawl magnifies secret spillover. Once stolen credentials appear in multiple GitHub repositories, the incident becomes a propagation problem as much as an intrusion problem, which is why revocation and search must be automated rather than handled case by case.
For practitioners
- Rotate exposed developer and CI secrets Revoke GitHub, npm and cloud credentials that may have been present in affected development or build environments, then reissue them under tighter scope and shorter lifetime.
- Audit package-install execution paths Review where package installation can execute code during build or local setup, and restrict that behaviour for untrusted or newly introduced dependencies.
- Separate publishing and runtime identities Use distinct identities for package publication, source control and cloud access so a compromise in one environment does not automatically unlock the others.
- Detect secret spillover across repositories Search for reused tokens, copied credentials and known infection strings across GitHub repositories, CI logs and developer workspaces, then trace where the same secrets were duplicated.
- Apply tighter package provenance checks Require provenance and integrity checks for high-risk dependencies before they are allowed into build or deployment workflows.
Key takeaways
- The incident shows how a compromised npm publishing account can become a credential-harvesting and distribution channel across development and cloud environments.
- The article reports 23 affected packages, 52,640 monthly downloads and 338 GitHub repositories containing stolen credentials, which is enough scale to make this a governance issue rather than a narrow malware case.
- The control gap is not only secret exposure but also install-time code execution and overly reusable developer identities, both of which widen the blast radius.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while SLSA sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | The malware's core effect is theft of developer and cloud secrets from trusted build paths. |
| NHI-03 — Vulnerable Third-Party NHI | The attack begins with a compromised third-party publishing account in the npm ecosystem. | |
| NHI-07 — Long-Lived Secrets | Reusable tokens and cloud credentials extend the attack window after initial compromise. | |
| Recommendation — Scan developer and CI environments for exposed secrets and revoke any credentials found in repositories or logs. Assess third-party publishing and dependency accounts as governed NHI sources before they reach production. Shorten secret lifetime and remove long-lived tokens from package publishing and build workflows. | ||
| MITRE ATT&CK | TA0006;TA0010 — Credential Access; Exfiltration | The campaign steals credentials and pushes them into attacker-controlled repositories and accounts. |
| Recommendation — Map the incident to credential access and exfiltration behaviours to prioritise detection and containment. | ||
| SLSA | L2 — Build integrity | The package compromise shows why build provenance and dependency integrity matter in software supply chains. |
| Recommendation — Require provenance checks for dependencies and package builds before they enter release pipelines. | ||
Key terms
- Supply Chain Malware: Malware delivered through trusted software distribution paths such as packages, dependencies, or build tooling. It succeeds by inheriting trust from legitimate workflows, which makes publication-time checks insufficient if the malicious behaviour appears only after install or in a later version.
- Non-Human Identity (NHI): A digital identity assigned to a non-human entity such as a software application, service account, API key, bot, machine, or AI agent that enables it to authenticate and interact with systems without direct human involvement. NHIs now outnumber human identities in most enterprises by 25 to 50 times.
- Package install execution: Package install execution is the point at which dependency installation runs code on a developer machine or build runner. In supply chain attacks, that execution step becomes the entry point for secret theft, persistence, and propagation because it inherits trust before the workload is fully inspected.
- Secret Spillover: Secret spillover is the spread of the same credential or token across multiple repositories, workstations or automation contexts. Once one copy is exposed, every duplicate extends the blast radius and makes containment dependent on rapid discovery and coordinated revocation.
Deepen your knowledge
NHI Foundation Level course covers NHI governance, machine identity security and secrets management in practical terms. It helps practitioners connect identity controls to the realities of developer, CI and workload access.
Published by the NHIMG editorial team on August 2, 2026.
Updated on October 13, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org