On March 31, 2026, the npm package axios (100M+ weekly downloads) was compromised in a sophisticated supply chain attack. A hacker took over the lead maintainer's account, injected a phantom dependency that deploys a cross-platform RAT in 1.1 seconds, and the malware self-destructs to erase all evidence.
This repo has everything you need to check if you're affected and protect yourself.
Watch the full breakdown: NetworkChuck Video
Bad versions: axios@1.14.1 and axios@0.30.4
Safe versions: axios@1.14.0 and axios@0.30.3
npm list axios
npm list -g axiosMac/Linux:
curl -sL https://raw.githubusercontent.com/networkchuck/axios-attack-guide/main/check.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/networkchuck/axios-attack-guide/main/check.ps1 | iexOr clone and run locally:
git clone https://github.com/networkchuck/axios-attack-guide.git
cd axios-attack-guide
./check.sh # Mac/Linux
.\check.ps1 # Windows PowerShellThe scripts check all 6 indicators: axios version, lockfile, git history, malicious dependency, RAT artifacts, and C2 connections.
Mac/Linux:
find / -path "*/node_modules/axios/package.json" 2>/dev/null | while read f; do
version=$(grep '"version"' "$f" | head -1)
echo "$f -> $version"
doneWindows (PowerShell):
Get-ChildItem -Path C:\ -Recurse -Filter "package.json" -ErrorAction SilentlyContinue |
Where-Object { $_.DirectoryName -like "*node_modules\axios" } |
ForEach-Object {
$version = (Get-Content $_.FullName | Select-String '"version"').Line
Write-Output "$($_.FullName) -> $version"
}If any result shows version 1.14.1 or 0.30.4, you are affected.
git log -p -- package-lock.json | grep "plain-crypto-js"If plain-crypto-js shows up anywhere in your lockfile history, investigate immediately. Legitimate axios has exactly 3 dependencies: follow-redirects, form-data, proxy-from-env. Anything else is a red flag.
The malware drops platform-specific payloads disguised as system files:
macOS:
ls -la /Library/Caches/com.apple.act.mond 2>/dev/nullLinux:
ls -la /tmp/ld.py 2>/dev/nullWindows (PowerShell):
Test-Path "$env:PROGRAMDATA\wt.exe"netstat -an | grep "142.11.206.73"If you found ANY indicators above, treat your machine as fully compromised:
- STOP — do not just delete files
- Rotate ALL credentials — npm tokens, SSH keys, API keys, cloud credentials
- Rotate all database passwords
- Check CI/CD pipelines for affected installs
- Block C2 traffic —
sfrclak.comand142.11.206.73at your firewall - Rebuild from a clean image if possible
- Audit git history for unauthorized changes
npm config set min-release-age 3This tells npm to refuse any package published less than 3 days ago. This one command would have blocked this attack.
Add to your .npmrc:
ignore-scripts=true
The entire attack depended on a postinstall script running automatically. No scripts = no attack.
Add to your .npmrc:
save-exact=true
The ^ in your version ranges is what let npm auto-upgrade to the compromised version.
npm ci # NOT npm installInstalls exactly what's in your lockfile. No surprises.
Both package managers do NOT run lifecycle scripts by default. This attack would have completely failed on pnpm or bun.
| Step | What Happened |
|---|---|
| 1 | Attacker obtained lead maintainer's (jasonsaayman) long-lived npm classic access token |
| 2 | Account email changed to ifstap@proton.me |
| 3 | One line added to package.json: "plain-crypto-js": "^4.2.1" — never imported anywhere |
| 4 | Clean decoy version published 18 hours before the malicious one |
| 5 | Published via npm CLI, bypassing GitHub Actions OIDC Trusted Publishing |
| 6 | Both axios@1.14.1 and axios@0.30.4 poisoned within 39 minutes |
| 7 | Postinstall dropper auto-executes — XOR + base64 obfuscation (key: OrDeR_7077) |
| 8 | Platform-specific RAT downloaded from C2 in 1.1 seconds |
| 9 | Malware self-destructs — deletes dropper, replaces package.json with clean decoy |
| Type | Value |
|---|---|
| C2 Domain | sfrclak.com |
| C2 IP | 142.11.206.73 |
| C2 Port | 8000 |
| C2 Path | /6202033 |
| XOR Key | OrDeR_7077 |
| axios@1.14.1 SHA-1 | 2553649f2322049666871cea80a5d0d6adc700ca |
| axios@0.30.4 SHA-1 | d6f3f62fd3b9f5432f5782b62d8cfd5247d5ee71 |
| plain-crypto-js@4.2.1 SHA-1 | 07d889e2dadce6f3910dcbc253317d28ca61c766 |
| Attacker emails | ifstap@proton.me, nrwise@proton.me |
RAT File Paths:
| OS | Path | Disguised As |
|---|---|---|
| macOS | /Library/Caches/com.apple.act.mond |
Apple system cache |
| Windows | %PROGRAMDATA%\wt.exe |
Windows Terminal |
| Linux | /tmp/ld.py |
Generic temp file |
- Socket.dev Analysis — First automated detection (6 minutes)
- StepSecurity Deep Dive — Runtime telemetry
- GitHub Issue #10604 — Maintainer confirms compromise
- Huntress Blog — 100+ confirmed compromised hosts
- John Hammond Video
- John Hammond Livestream
Made with coffee by NetworkChuck