The Axios npm supply chain attack represents the most sophisticated documented compromise of a top-10 npm package, with attackers hijacking the account of lead maintainer jasonsaayman to deploy a self-erasing remote access trojan (RAT) across Windows, macOS, and Linux systems. On March 31, 2026, malicious versions of Axios—one of JavaScript’s most critical HTTP client libraries—were published to the npm registry, potentially affecting millions of developers worldwide.
Key Takeaways
- Attackers compromised Axios lead maintainer’s npm account on March 30, 2026, publishing poisoned versions within 39 minutes
- Axios has 83 million weekly downloads and ranks as a top-10 npm package globally
- Compromised versions: [email protected] and [email protected], deploying cross-platform RAT via fake dependency
- Attack bypassed GitHub CI/CD safeguards by using direct npm CLI publish, leaving no GitHub commit traces
- Malicious dependency [email protected] executes postinstall script that self-erases after infection
How the Axios npm supply chain attack unfolded
The attack began with precision timing. Attackers pre-staged a malicious fake dependency called [email protected] on the npm registry 18 hours before compromising Axios itself. This dependency was never imported anywhere in legitimate Axios source code—a critical red flag. Once the maintainer’s account was hijacked, poisoned versions of Axios were published within 39 minutes, creating a narrow window for installation before detection. The attacker changed the npm account email to [email protected], using ProtonMail to obscure their identity.
What made this attack exceptionally dangerous was how it bypassed GitHub’s security infrastructure. Axios uses OIDC (OpenID Connect) verification to protect its CI/CD pipeline, but the attacker published directly via the npm command-line interface, leaving no GitHub commits or tags that would trigger alerts. This meant the poisoned versions appeared legitimate to dependency scanning tools that only monitored GitHub activity.
The malicious payload and technical sophistication
The fake dependency [email protected] contained a postinstall script that deployed a self-erasing cross-platform RAT targeting macOS, Windows, and Linux. This remote access trojan could execute arbitrary commands on infected systems while automatically removing traces of itself after installation—a hallmark of advanced threat actors who understand detection evasion. The self-erasing capability meant that traditional file-based forensics would find nothing after the initial infection, making incident response significantly harder.
This level of sophistication distinguishes the Axios npm supply chain attack from typical dependency poisoning campaigns. Rather than leaving obvious malware signatures, the attacker deployed a tool designed for persistent access and command execution, then covered tracks automatically. The targeting of three major operating systems simultaneously indicates a well-resourced threat actor operating at scale.
Impact and immediate response required
Axios receives 83 million downloads per week, making it one of the most widely used packages in the JavaScript ecosystem. Any developer who ran npm install between March 31 and the time of detection potentially pulled the compromised versions into their projects. Organizations using Axios should immediately audit their dependency trees, identify which versions are installed, and downgrade to known-safe releases.
The incident underscores a critical weakness in open-source software supply chains: even packages protected by CI/CD automation remain vulnerable if account credentials are compromised. Unlike attacks that exploit code vulnerabilities, this attack required only stealing a maintainer’s npm credentials—a social engineering or credential theft vector that bypassed all technical safeguards.
Why this matters for JavaScript developers
The Axios npm supply chain attack demonstrates that no package is too popular to target. Attackers specifically chose a top-10 library because it maximizes reach—every installation of Axios during the attack window was a potential infection vector. Developers who assume their dependencies are safe because they are widely used are taking an unnecessary risk.
The attack also reveals gaps in how npm package distribution works. While GitHub’s OIDC protections are strong, they apply only to automated deployments. A single compromised account can still publish directly to npm without triggering CI/CD checks. This architectural asymmetry—where automation is protected but manual publishing is not—creates an exploitable gap that sophisticated attackers will continue to target.
What should developers do right now?
Immediate action: Check your package-lock.json or yarn.lock files to confirm you are not using [email protected] or [email protected]. If either version is present, downgrade immediately to a known-safe release and reinstall dependencies. Run a security audit on any systems where these versions were installed, particularly checking for unexpected network connections or process execution.
Longer-term: Consider implementing stricter dependency pinning strategies and using security scanning tools that monitor npm for malicious packages in real time. The Axios npm supply chain attack was detected relatively quickly, but not all attacks are caught so fast—defense in depth is essential.
Has npm made changes to prevent this type of attack?
The research brief does not specify what npm or the Axios maintainers have done in response to this attack. Developers should monitor official Axios and npm security announcements for guidance on additional protections or account security measures implemented since the incident.
How does this attack compare to other supply chain compromises?
The Axios npm supply chain attack is described as the most sophisticated documented compromise of a top-10 npm package, primarily because it combined account hijacking with a self-erasing RAT and bypassed GitHub CI/CD safeguards. Most supply chain attacks either exploit code vulnerabilities or inject obvious malware. This attack used multiple layers of obfuscation and technical sophistication to maximize dwell time before detection.
Should I stop using Axios entirely?
No. Axios itself is not flawed—the attack exploited the maintainer’s account, not a vulnerability in the library’s code. Once you upgrade to a safe version, Axios remains a reliable HTTP client. The incident highlights the importance of keeping dependencies updated and monitoring security advisories, but it does not mean abandoning widely used packages.
The Axios npm supply chain attack is a watershed moment for JavaScript developers. It proves that even the most popular, well-maintained packages can be weaponized if account security fails. The immediate priority is identifying and removing compromised versions from your systems. The longer-term lesson is that no amount of code quality or popularity makes a package immune to supply chain risk—vigilance and rapid response are your only defenses.
Edited by the All Things Geek team.
Source: Tom's Hardware


