TL;DR: A stolen long-lived npm token let attackers publish poisoned Axios versions 1.14.1 and 0.30.4, bypassing GitHub Actions OIDC provenance and dropping a cross-platform RAT through a phantom dependency, according to LEGIT Security. This is a supply chain and identity governance failure, not a code vulnerability.
NHIMG editorial — based on content published by LEGIT Security: Axios hijacked, npm account takeover deploys cross-platform RAT to millions
By the numbers:
- Two malicious Axios versions 1.14.1 and 0.30.4 were live for roughly three hours before npm removed them.
- Axios has over 83 million weekly downloads, making the poisoned releases a high-reach supply chain event.
Questions worth separating out
Q: What breaks when a package registry token is stolen and used to publish malware?
A: A stolen registry token breaks the trust chain between source review and package publication.
Q: Why do long-lived NHI credentials increase supply-chain risk?
A: They increase supply-chain risk because build systems, package installs, and developer tools can harvest and reuse them without a separate exploit chain.
Q: How do security teams detect malicious npm postinstall behaviour?
A: Look for packages that define lifecycle hooks, then correlate installs with unexpected child processes, shell spawning, and outbound connections from build hosts.
Practitioner guidance
- Lock down registry publishing identities Replace long-lived classic npm tokens with short-lived, federated publishing identities and revoke any token that can still publish without OIDC binding.
- Disable install-time scripts in CI Use --ignore-scripts or an equivalent policy for automated builds unless a package is explicitly approved for execution.
- Scan lockfiles for phantom dependencies Look for packages that do not belong in the dependency graph, especially names that exist only to execute a postinstall hook.
What's in the full analysis
LEGIT Security's full article covers the operational detail this post intentionally leaves for the source:
- The exact package versions, hashes, and exposure windows that help teams validate whether their lockfiles were touched.
- The malicious file paths and platform-specific payload artefacts that support endpoint hunting on macOS, Windows, and Linux.
- The attacker workflow around email takeover, publishing history, and direct npm CLI use that explains how registry trust was bypassed.
- The specific remediation playbooks and indicators of compromise that the article says teams can drop into their response workflow.
👉 Read LEGIT Security's analysis of the Axios npm account takeover and poisoned releases →
Axios npm account takeover: what it means for supply chain controls?
Explore further
Token lifetime is now a supply chain control problem, not just a registry hygiene issue. A long-lived npm token can bypass source review, CI provenance, and maintainer expectations in one step. That makes secret lifecycle governance part of software supply chain security, especially where registry credentials can publish production artifacts. Practitioner conclusion: bind publishing to short-lived federated identity wherever possible.
A few things that frame the scale:
- When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes, and as quickly as 9 minutes in some cases, according to LLMjacking: How Attackers Hijack AI Using Compromised NHIs.
- 85% of organisations lack full visibility into third-party vendors connected via OAuth apps, according to The State of Non-Human Identity Security.
A question worth separating out:
Q: Who is accountable when a trusted open-source package is used to deliver malware?
A: Accountability usually spans the package maintainer, the registry authentication model, the consuming organisation’s build controls, and the team that owns credential lifecycle. If a malicious release was published through a valid account, the key question is whether publishing identities were time-bound, recoverable, and constrained enough to limit misuse.
👉 Read our full editorial: Axios npm account takeover shows how token abuse bypasses CI trust