axios Suffers Critical npm Supply Chain Attack; Malicious Versions Distributed for 3 Hours
Key Takeaways
- ▸Attackers compromised axios through social engineering targeting the lead maintainer, gaining access to npm credentials and publishing malicious versions that injected a remote access trojan
- ▸Organizations that downloaded axios 1.14.1 or 0.30.4 between 00:21-03:15 UTC on March 31 should check for compromise, rotate credentials, and downgrade to clean versions
- ▸axios is implementing multi-layered security improvements including mandatory 2FA, IP allowlisting, signing keys, and enhanced device security to prevent future supply chain attacks
Summary
On March 31, 2026, two malicious versions of the popular axios HTTP client library (versions 1.14.1 and 0.30.4) were published to the npm registry after attackers compromised the lead maintainer's account through social engineering and remote access trojan (RAT) malware. The compromised versions injected a malicious dependency called [email protected] that installed a remote access trojan capable of affecting macOS, Windows, and Linux systems. The malicious packages remained live for approximately 3 hours before being detected and removed from npm.
The attack originated from a targeted social engineering campaign against the lead maintainer that began roughly two weeks prior. Attackers gained access to the maintainer's PC through malware, enabling them to obtain npm account credentials and publish the poisoned versions. The compromise was detected when community members filed security issues, and axios collaborators quickly coordinated with npm to remove the malicious versions and deprecate them. The incident has prompted axios to implement enhanced security measures, including mandatory 2FA for npm publishing, IP allowlisting, signing keys, and additional safeguards for the lead maintainer's infrastructure.
- The incident highlights the vulnerability of open source maintainers to targeted attacks and the cascading risk when high-profile projects are compromised
Editorial Opinion
This supply chain attack on axios represents a critical wake-up call for the open source ecosystem. While the 3-hour window before removal limited damage, the attack successfully demonstrates how social engineering remains the weakest link in software security. The axios team's rapid response and transparent post-mortem are commendable, but the industry must collectively invest in better protection mechanisms for maintainer accounts—such as hardware security keys and privileged access management—to prevent similar incidents from occurring at other critical projects.



