TL;DR: Two malicious Axios npm releases were published with a hidden dependency that executed at install time and could expose developer workstations, CI/CD secrets, and production credentials, according to CYCOGNITO. The incident shows that dependency trust must be treated as a runtime security problem, because postinstall execution can turn package installs into immediate compromise paths.
NHIMG editorial — based on content published by CYCOGNITO: Axios npm supply chain vulnerability analysis and impacted asset patterns
By the numbers:
- Axios is the most widely used HTTP client in the JavaScript ecosystem, with over 300 million weekly downloads.
- Consumer Discretionary accounted for 22.4% of observed impacted assets in CyCognito's dataset.
Questions worth separating out
Q: What breaks when install-time scripts are allowed in dependency pipelines?
A: Install-time scripts let a dependency execute before the application even runs, which turns package retrieval into code execution.
Q: Why do maintainer credentials make npm supply chain attacks so dangerous?
A: Maintainer credentials are effectively publishing identities, so reuse or theft lets an attacker publish malicious updates under a trusted package name.
Q: How do security teams know whether developer endpoints are leaking NHI secrets?
A: Look for unexpected token use, unusual outbound connections, unexplained browser profile access, and persistence mechanisms on workstations and build runners.
Practitioner guidance
- Audit install logs and lock files immediately Search package-lock.json, CI/CD logs, and dependency caches for the malicious Axios versions and any other suspicious install-time dependencies.
- Rotate every secret present during installation Assume the installer could read cloud access keys, npm tokens, SSH keys, and deployment credentials present on the host at the time of compromise.
- Disable lifecycle scripts in CI where possible Run npm ci --ignore-scripts in automated build environments unless a package is explicitly approved to execute scripts.
What's in the full analysis
CYCOGNITO's full analysis covers the operational detail this post intentionally leaves for the source:
- Affected package versions, exposure window analysis, and asset-scoping guidance for developer and CI/CD environments
- The platform's breakdown of impacted asset categories and sector exposure patterns
- Recommended rebuild and credential-rotation workflow details for teams handling suspected compromise
- Indicator review guidance for package-lock files, pipeline logs, and dependency caches
👉 Read CYCOGNITO's analysis of the Axios npm supply chain attack →
Axios npm supply chain attack: what practitioners need to act on?
Explore further
Install-time execution is the real control boundary: package supply chain attacks are not only about malicious code, they are about when code is allowed to run. A postinstall hook turns dependency retrieval into immediate execution, which collapses the distinction between install and compromise. That means dependency governance must treat lifecycle hooks as privileged behaviour, not routine metadata. Practitioners should control installation paths as tightly as runtime execution paths.
A few things that frame the scale:
- The average estimated time to remediate a leaked secret is 27 days, despite 75% of organisations expressing strong confidence in their secrets management capabilities, according to The State of Secrets in AppSec.
- Organisations maintain an average of 6 distinct secrets manager instances, creating fragmentation that undermines centralised control, according to The State of Secrets in AppSec.
A question worth separating out:
Q: What should teams do in the first 24 to 72 hours after suspected package compromise?
A: Teams should isolate affected hosts, preserve forensic evidence, rotate exposed credentials, and inspect repositories for unauthorized workflow or package changes. They should also review internal mirrors and caches, because malicious versions may persist there after public removal. The goal is to stop reuse of stolen identities before the attacker expands access.
👉 Read our full editorial: Axios npm supply chain attack exposes the cost of install-time trust