Axios NPM Compromise Scanner
echo " === Axios Compromise Scanner ===" && echo " Malicious: 1.14.1, 0.30.4 | Attack: 2026-03-31" && echo && find ~ -path " */node_modules/axios/package.json" -type f 2> /dev/null | while read p; do v=$( jq -r ' .version' " $p " 2> /dev/null || grep -o ' "version"[[:space:]]*:[[:space:]]*"[^"]*"' " $p " 2> /dev/null | head -1 | cut -d' "' -f4) ; case " $v " in 1.14.1|0.30.4) echo " π¨ MALICIOUS: $p β $v " ;; * ) echo " β Safe: $p β $v " ;; esac ; done && echo && if find ~ -path " */node_modules/plain-crypto-js" -type d 2> /dev/null | head -1 | grep -q . ; then echo " π¨ TROJAN: plain-crypto-js present" ; else echo " β No trojan package" ; fi && echo && if find ~ -path " */node_modules/axios/*" -type f -name " *.js" -exec grep -l " sfrclak\.com" {} \; 2> /dev/null | head -1 | grep -q . ; then echo " π¨ C2 CALLBACK: sfrclak.com found" ; else echo " β No C2 callbacks" ; fi
curl -sL https://gist.githubusercontent.com/tuannvm/fe9214691b5cc88996c3f560eea31c70/raw/axios-scan.sh | bash
Check
Description
Axios versions
Scans all node_modules/axios/package.json for versions
Malicious detection
Flags versions 1.14.1 and 0.30.4 (published 2026-03-31)
Trojan package
Searches for plain-crypto-js directory
C2 callbacks
Greps for sfrclak.com URLs in axios source
If malicious version found
Isolate system - Disconnect from network
Delete artifacts :
rm -rf node_modules package-lock.json
find . -name " plain-crypto-js" -type d -exec rm -rf {} +
Pin safe version - Add to package.json:
"overrides" : { "axios" : " 1.13.6" }
Reinstall : npm ci
Rotate secrets - Treat as full compromise, rotate all credentials
Disable postinstall scripts globally
npm config set ignore-scripts true --global
Per-project (add to .npmrc)
ignore-scripts=true
Attack : npm axios account hijack, malicious versions with RAT
Timeline : 2026-03-31, ~3 hours before detection
Vector : Hidden dependency plain-crypto-js@4.2.1 with postinstall
C2 server : sfrclak.com:8000
Source : StepSecurity Blog
β
Linux (GNU grep, bash)
β
macOS (BSD grep, bash)
β
Works without jq (falls back to grep)
β
No external dependencies required