This article contains affiliate links. We may earn a commission at no extra cost to you if you sign up through our links.
Axios npm Package Hijacked: RAT Malware Hit 100M+ Weekly Downloads — Full Incident Timeline
March 31, 2026 · Resolved today · 8 min read · Happycapy Guide
Affected vs. Safe Versions
| Version | Status | Published | Action |
|---|---|---|---|
| axios@1.14.1 | MALICIOUS — removed | Mar 31, 00:21 UTC | Downgrade immediately; rotate all secrets |
| axios@0.30.4 | MALICIOUS — removed | Mar 31, 01:00 UTC | Downgrade immediately; rotate all secrets |
| axios@1.14.0 | SAFE | Prior to attack | Use this version |
| axios@0.30.3 and below | SAFE | Prior to attack | Use this version |
Full Attack Timeline
How the Attack Worked
This was a phantom dependency injection attack. The attackers did not modify Axios's source code directly — they injected a new dependency (plain-crypto-js) that ran a setup.js post-install script automatically when npm installed the package.
The setup.js script contacted a command-and-control (C2) server at sfrclak.com:8000 and downloaded platform-specific payloads:
| Platform | Method | Artifact to Check |
|---|---|---|
| macOS | AppleScript downloads binary, disguised as system process | /Library/Caches/com.apple.act.mond |
| Windows | VBScript + PowerShell downloads RAT, persists as system binary | %PROGRAMDATA%\wt.exe |
| Linux | Python script executed via nohup in background | /tmp/ld.py |
After execution, the malware deleted its own package.json and replaced it with a clean decoy — a deliberate anti-forensic measure to avoid detection during post-install inspection. Security researchers assess this as APT-level espionage activity rather than financially motivated crime, based on the sophistication and focus on credential harvesting.
The account takeover was complete: attackers changed the registered email on jasonsaayman's npm account to ifstap@proton.me before publishing, locking out the legitimate maintainer from taking immediate action.
Immediate Remediation Steps
Context: March 31, 2026 — A Bad Day for npm Security
This is the second significant npm security incident to occur on March 31, 2026. Earlier this morning, Anthropic's Claude Code CLI was found to have accidentally published a source map file with its npm package, exposing 512,000 lines of proprietary TypeScript source code. That incident was a packaging mistake — this Axios attack is deliberate criminal or state-sponsored activity.
Both incidents highlight the structural risk of the npm ecosystem: the world's largest software registry has minimal verification controls on who can publish to existing packages, and the post-install script mechanism gives attackers an automatic code execution vector the moment a developer runs npm install.
Notable Prior npm Supply Chain Attacks
| Package | Year | Downloads/Week | Attack Type |
|---|---|---|---|
| axios | 2026 | 100M+ | Account hijack → phantom dependency → RAT |
| xz-utils | 2024 | N/A (Linux core) | 2-year social engineering → backdoor in SSH |
| ua-parser-js | 2021 | 7M+ | Account hijack → crypto miner + credential stealer |
| node-ipc | 2022 | 1M+ | Maintainer sabotage → file wiper (anti-Russia protest) |
| event-stream | 2018 | 2M+ | Malicious maintainer → Bitcoin wallet theft |
Frequently Asked Questions
Which versions of Axios are affected?
axios@1.14.1 and axios@0.30.4, both published via a hijacked account on March 31, 2026. Both have been removed from npm. Safe versions are axios@1.14.0 and axios@0.30.3 and below.
What does the malware do?
The injected plain-crypto-js@4.2.1 dependency runs a post-install script that contacts a C2 server and deploys a Remote Access Trojan on macOS, Windows, and Linux. The RAT enables persistent remote access, credential harvesting, and likely espionage-grade intelligence collection.
Is Axios itself compromised?
The Axios source code itself was not modified. The malware was introduced as a phantom dependency added to the published npm package — not in the GitHub repository. Developers cloning the repo directly were not affected. Only those who ran npm install and received the malicious package version were at risk.
How can I use AI to detect supply chain risks?
Claude and GPT can analyze your package.json and package-lock.json for suspicious dependencies, unusual version bumps, and phantom dependencies. Happycapy gives you both models in one platform — paste your lock file and ask for a security review.
Comments are coming soon.