Axios npm supply chain attack: deeply analyzed
Key Takeaways
- β’A sophisticated supply chain attack hit Axios, the JavaScript HTTP library with over 100 million weekly npm downloads, by embedding a Remote Access Trojan inside compromised package versions.
- β’Attackers gained control of a maintainer's npm account, published malicious Axios releases, and introduced a rogue dependency called plain-crypto-JS that silently installed a RAT capable of stealing AWS credentials, OpenAI API keys, and more.
- β’Fireship covered the incident in their video "Millions of JS devs just got penetrated by a RATβ¦", breaking down exactly how the attack worked, which versions are affected, and why rolling your credentials matters far more than just deleting a file.
How a Trusted Library Became the Delivery Vehicle
Axios is one of those packages that lives in basically every JavaScript project. Over 100 million downloads a week. It's so ubiquitous that developers install it without a second thought, which is exactly what made it a useful target. Attackers didn't need to convince anyone to install something sketchy. They just needed to get inside something people were already installing automatically. As Fireship explains in Millions of JS devs just got penetrated by a RATβ¦, the specific method used to obtain the maintainer's npm access token hasn't been confirmed β we know the lock was picked, we just don't know how.
The Account Takeover Nobody Noticed
Once attackers had control of a compromised npm maintainer account, they bypassed the normal GitHub Actions release pipeline entirely and pushed malicious versions of Axios directly to the registry under a Proton Mail address. That's the tell in hindsight, but npm doesn't exactly send you a push notification when a package you depend on changes its publishing behavior. The malicious versions looked legitimate from the outside. Nothing in the primary Axios code screamed
Our Analysis: The scariest part here isn't the RAT itself. It's that npm audit came back clean. The entire safety net developers have been trained to trust was useless against this attack, and most people won't know that until it's already too late.
Fireship covers the detection steps well, but glosses over the real fallout. Rolling API keys sounds simple. It isn't. Figuring out what touched your environment, when, and from which machine is hours of painful forensic work most solo devs are not equipped to do.
The dependency chain is a liability. Everyone knows it. Nobody has a better answer yet.
What this attack exposes, more than anything, is the structural trust problem baked into how the JavaScript ecosystem operates. npm's security model is built around the assumption that maintainer accounts are secure. There's no mandatory multi-factor enforcement for publishing, no cryptographic signing requirement tied to identity verification, and no behavioral anomaly detection that would flag a package suddenly switching from a GitHub Actions pipeline to a manual publish via a Proton Mail address. Each of those gaps is known. Each has been discussed. None have been resolved at the ecosystem level.
The plain-crypto-JS dependency is also worth dwelling on. Burying the malicious payload in a sub-dependency β rather than in Axios itself β is a deliberate obfuscation strategy. It means the diff on the Axios repo looks clean. A developer doing due diligence, even an unusually careful one, would have had no obvious reason to inspect a newly added transitive dependency. This is the same technique that made the XZ Utils backdoor so effective: the attack surface isn't the famous package, it's the stuff nobody thinks to look at.
There's a harder conversation here about who actually maintains the software that powers modern infrastructure. Axios has hundreds of millions of weekly downloads and is a critical dependency for thousands of production systems. The people responsible for its security are, presumably, a small group of volunteers. That asymmetry β massive blast radius, minimal resources β is the real vulnerability. Attackers understand it even if the industry doesn't want to talk about it plainly.
If there's anything actionable beyond the obvious credential rotation advice, it's this: audit your dependency tree for packages that have no strong community presence, no meaningful commit history, and no independent security scrutiny. plain-crypto-JS fit that profile exactly. Automated tooling won't catch these. Someone has to actually look.
Frequently Asked Questions
What exactly happened in the Axios npm supply chain attack?
Which versions of Axios are affected by the RAT malware?
How can JavaScript developers check if they've been compromised by the Axios supply chain attack?
Why does rotating credentials matter more than just removing the malicious Axios package?
Can npm's security model actually prevent this kind of supply chain attack?
Based on viewer questions and search trends. These answers reflect our editorial analysis. We may be wrong.
Source: Based on a video by Fireship β Watch original video
This article was created by NoTime2Watch's editorial team using AI-assisted research. All content includes substantial original analysis and is reviewed for accuracy before publication.



