🚨 Axios Compromised on npm (What You Need to Know)

Axios npm package vulnerability shield illustration

If you updated your project’s dependencies on March 31, 2026, you may have accidentally installed a Remote Access Trojan (RAT). The popular HTTP client Axios was the victim of a sophisticated supply chain attack.

What Happened?
A lead maintainer’s npm account was hijacked, allowing attackers to bypass standard security checks and publish malicious versions of Axios directly to the npm registry.

These versions included a “hidden” dependency called plain-crypto-js. When installed, it triggered a script that deployed a Remote Access Trojan (RAT) tailored for macOS, Windows, and Linux. The malware was designed to be “invisible,” deleting its own installation files after execution to hide from developers.

Are You Affected?
Check your package-lock.json or yarn.lock for these specific versions:

  • axios@1.14.1
  • axios@0.30.4
  • plain-crypto-js@4.2.1

If you see these versions, assume your system or CI/CD environment is compromised.


🛠 Action Plan: What to Do Now

  1. Downgrade Immediately
    Force your project to use the last known “clean” versions. Update your package.json and run your install command:
    # For 1.x users
    npm install axios@1.14.0
    # For 0.x users
    npm install axios@0.30.3
  2. Rotate Your Secrets
    The RAT was designed to steal credentials. If you were infected, you must rotate:
    • Cloud provider keys (AWS, Azure, GCP).
    • Database passwords and .env secrets.
    • npm/GitHub automation tokens.
    • SSH keys.
  3. Clean Your Environment
    Manually check for and delete these malicious artifacts if they exist:
    • macOS: /Library/Caches/com.apple.act.mond
    • Linux: /tmp/ld.py
    • Windows: %PROGRAMDATA%\wt.exe

Hardening for the Future

To prevent this from happening again, update your CI/CD pipelines to ignore scripts during installation:

npm ci --ignore-scripts

Stay Safe Supply chain attacks are becoming more common. Always pin your versions and consider using tools that scan for malicious “postinstall” scripts. For a deep dive into the technical details, check out the original reports from Aikido and StepSecurity

You might also like

More stories worth your time — dive in while you are here.

Comments

Sign in with GitHub to comment or react. Threads live in GitHub Discussions, so you can also reply from GitHub.