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: This is a supply chain malware incident in npm that used a compromised developer account and install-time execution to steal cloud and source control credentials at scale.
Why it matters: It matters because IAM, PAM, and NHI governance teams need to treat developer accounts, package ecosystems, and cloud tokens as linked identity surfaces rather than separate controls.
By the numbers:
- the malware affected 23 packages
- 338 repositories in GitHub contained stolen credentials
👉 Read OXSecurity's analysis of the new Shai-Hulud, Miasma, and Hades npm variant
Context
npm package compromise is an identity problem as much as a software supply chain problem. A developer account, a package publishing workflow, and the secrets embedded in build and runtime environments can all become one attack surface when authentication tokens are reused or exposed. In this case, the primary risk sits in the trust relationship between package maintainers and the environments that automatically install their code.
For IAM practitioners, the relevant lesson is that non-human identities and developer identities are now tightly coupled. A compromised maintainer account can distribute malware that steals GitHub tokens, npm tokens, and cloud credentials in one flow, which means access governance, secrets management, and software integrity controls need to be evaluated together rather than in separate programme silos.
Key questions
Q: What breaks when developer accounts can publish packages and expose credentials at the same time?
A: The main failure is that one identity becomes both a delivery channel and a secret reservoir. If maintainers can publish code that executes on install and also hold reusable tokens, an attacker who compromises that account can move from software distribution into cloud and source control access very quickly. Segregating publishing rights, tokens, and runtime secrets reduces that blast radius.
Q: Why do stolen npm and GitHub tokens create a wider risk than a single compromised user account?
A: Because those tokens usually authenticate systems, pipelines, and repositories rather than one person. A stolen token can bypass normal human session controls and keep working until it is revoked, often across multiple environments. That is why non-human identity governance must cover creation, scope, storage, and revocation of tokens, not just user logins.
Q: How do security teams know if software supply chain governance is working?
A: It is working when teams can identify which software and dependencies are deployed, match them to critical environments, and prove they can act quickly on vulnerability disclosures. Evidence should include current inventories, SBOM use, defined response workflows, and contractual obligations that make vendors disclose incidents and security changes.
Q: Who is accountable when a stolen maintainer account pushes malicious packages?
A: Accountability sits with both the project maintainers and the organisation operating the publishing identity. Teams should define who owns package release rights, who can revoke them, and how quickly compromised publisher access can be removed. That governance belongs in access review and offboarding processes.
Technical breakdown
How install-time execution turns npm packages into delivery channels
The article describes a preconfigured binding.gyp file that executes when the package is installed. That matters because install-time hooks run before the package is fully trusted or inspected, which gives malware a path to execute in developer workstations and CI pipelines as soon as dependency resolution completes. In practical terms, the package itself becomes the transport and execution mechanism, not just the payload container. This is a classic supply chain pattern: trust in the registry is extended to code that has not yet been behaviourally validated.
Practical implication: block or scrutinise install-time scripts for externally sourced packages in build and developer environments.
Why credential theft from developer environments becomes NHI sprawl
The malware targets GitHub tokens, npm tokens, and cloud credentials such as AWS, GCP, and Azure. Those secrets represent non-human identities because they authenticate software and infrastructure rather than people, and they often have broader scope than a human session would ever need. Once stolen, the attacker can pivot from source control into package publishing, cloud access, or further repository compromise. That creates a chained identity failure where one compromised human account exposes many machine identities at once.
Practical implication: inventory developer-held secrets separately from human user accounts and constrain token scope to the minimum viable privilege.
How propagation works when compromised accounts seed more compromise
This variant reuses previous compromise paths, including GitHub strings and repositories that point to additional payloads. The result is recursive propagation across repositories and package versions, which makes remediation harder because the infection is no longer isolated to a single package or account. The article also notes different public encryption keys, suggesting that attackers are varying infrastructure while reusing the same operational pattern. The important architectural point is that supply chain compromise persists as long as trust is based on origin alone, rather than on runtime behaviour and provenance verification.
Practical implication: treat provenance checks, repository monitoring, and token revocation as linked controls rather than separate cleanup tasks.
Threat narrative
Attacker objective: The attacker’s objective is to convert one compromised developer identity into broader access to source code, cloud environments, and reusable secrets.
- Entry occurred through a compromised npm developer account that was used to publish malicious package updates into the registry.
- Credential harvesting happened when the malware stole GitHub tokens, npm tokens, and cloud credentials from infected developer environments.
- Impact followed as stolen credentials were uploaded into GitHub repositories and the malware spread across additional packages and repositories.
Breaches seen in the wild
- Shai Hulud npm malware campaign — Shai Hulud campaign: npm malware exposed secrets on GitHub.
- GitHub Dependabot Breach — GitHub Dependabot tokens stolen and abused to push malicious commits to repositories.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Compromised developer identity is now a machine identity event. This incident is not just about a malicious package, it is about a maintainer account being used as a distribution point for non-human identity abuse. When package publishing credentials and cloud tokens sit in the same workflow, one compromise can expose many downstream identities. Practitioners should stop treating developer compromise and NHI compromise as separate disciplines.
Install-time execution creates a blind spot in conventional code review. A package that executes at install time bypasses the assumption that published code is static and inspectable before use. That weakens controls built around pre-merge review alone, because the threat is activated after distribution. The governance gap is not missing code review, it is missing behavioural containment for trusted software delivery paths.
Secret sprawl is the real blast-radius multiplier here. The most damaging element of this pattern is not the malware family name, but the number of tokens, keys, and cloud credentials available inside developer environments. Once a single account can reveal source control and cloud access, the blast radius becomes a secrets governance issue. That is why secret classification, scope limitation, and revocation ownership need to sit inside identity governance.
Supply chain compromise now overlaps directly with OWASP NHI concerns. This kind of incident sits squarely in the territory covered by the OWASP Non-Human Identity Top 10 and MITRE ATT&CK credential access patterns. The same controls that protect service accounts and workload credentials also need to cover developer-issued tokens and CI-derived secrets. Practitioners should evaluate package trust, secret handling, and token lifecycle together, not as separate programme tracks.
Runtime detection is becoming more important than static trust. The article’s indicators, including unusual upload strings and repository spread, show that the attacker’s behaviour was observable after compromise began. That points to the need for monitoring that detects token misuse, abnormal publishing activity, and unexpected repository artefacts. The field needs more emphasis on runtime identity behaviour, not just pre-deployment approval.
From our research:
- From our research: When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes, according to LLMjacking: How Attackers Hijack AI Using Compromised NHIs.
- Our research on The State of Secrets in AppSec found that the average estimated time to remediate a leaked secret is 27 days.
- Forward-looking analysis: the same secret-exposure window that enables cloud compromise also accelerates package supply chain abuse, which is why 52 NHI Breaches Analysis is useful for pattern recognition.
What this signals
Secret exposure latency is now the programme-level risk signal. When exposed credentials can be acted on within minutes, but remediation takes days, identity and security teams are managing two different clocks. That gap makes secret discovery, automated revocation, and package pipeline containment part of the same control plane, not separate operational queues.
This incident also shows why NHI governance has to extend into developer tooling and software delivery. A maintainer account, a package registry, and cloud tokens now form a single attack path, so token scope, lifecycle, and publishing rights should be measured as one chain of control. The relevant question is not whether secrets exist, but whether the programme can invalidate them before they are reused.
For practitioners, the near-term signal is to watch for package ecosystems becoming more tightly bound to identity verification and runtime detection. Controls that can link publishing events, token issuance, and repository anomalies will reduce blast radius faster than static dependency scanning alone.
For practitioners
- Restrict package-install execution paths Disable or alert on install-time scripts such as binding.gyp in build systems unless the package has been explicitly approved and tested in a controlled environment. Use allowlists for high-risk dependencies and isolate dependency installs from production secrets.
- Separate developer tokens from high-value cloud access Issue narrowly scoped GitHub, npm, and cloud tokens with clear purpose boundaries and short lifetimes. Avoid reusing the same credential across publishing, CI, and administration workflows, and make revocation ownership explicit.
- Scan repositories for exfiltration indicators Search for unusual marker strings, unexpected uploads, and credential-like artefacts in GitHub repositories, especially where package maintenance activity has recently changed. Treat any credential appearance in source history as a revocation and containment event.
- Add mandatory 2FA and recovery controls Require 2FA for package maintainers and enforce strong account recovery checks for npm, GitHub, and cloud administrative identities. Where feasible, bind publishing rights to managed identities rather than personal accounts alone.
Key takeaways
- This incident shows that compromised developer accounts can function as distribution points for NHI abuse, not just software tampering.
- The scale matters because 23 packages and 338 credential-exposed repositories show how quickly one maintainer compromise can propagate across ecosystems.
- The control that changes the outcome is tight token scope, enforced 2FA, and fast revocation of secrets used in publishing and cloud workflows.
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 NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-01 | The incident centres on compromised credentials and token misuse in NHI workflows. |
| MITRE ATT&CK | TA0006 , Credential Access; TA0011 , Command and Control | The malware steals secrets and exfiltrates them through controlled channels. |
| NIST CSF 2.0 | PR.AC-1 | Identity credentials and access rights are the core control issue in this attack chain. |
| NIST SP 800-53 Rev 5 | IA-5 | Authenticator management applies directly to tokens, keys, and secret rotation. |
| CIS Controls v8 | CIS-5 , Account Management | Maintainer and machine account governance is central to preventing repository compromise. |
Review credential issuance and revocation against PR.AC-1 across developer and pipeline identities.
Key terms
- 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.
- Install-Time Script: An install-time script is code that executes when a package is installed, before the package has necessarily been validated in context. Attackers abuse these scripts because they can trigger silently in developer machines and CI systems, turning dependency installation into an execution path.
- Secrets Sprawl: The uncontrolled proliferation of sensitive credentials — API keys, tokens, passwords, certificates — across codebases, cloud environments, CI/CD pipelines, and configuration files. In 2024, over 50 million leaked secrets were found on the dark web.
- Supply Chain Propagation: Supply chain propagation is the spread of malicious code or trust abuse from one compromised package, account, or dependency into multiple downstream systems. The key risk is that trusted distribution mechanisms amplify impact faster than traditional endpoint or perimeter controls can respond.
What's in the full analysis
OXSecurity's full analysis covers the operational detail this post intentionally leaves for the source:
- The exact repository strings and decoded URLs used to trace the malware spread across GitHub.
- The package-by-package affected version list for the Leo and RStreams ecosystem.
- The public encryption keys and indicators of compromise used to distinguish this variant from earlier campaigns.
- The infection chain details showing how the compromised maintainer account propagated the payload.
👉 OXSecurity's full post covers the affected packages, infection chain, and indicators of compromise.
Deepen your knowledge
The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps security and identity practitioners align token lifecycle controls with real-world identity risk.
Published by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org