axios@1.14.1 Supply Chain Attack: What to Do Now

axios@1.14.1 was compromised on npm with a RAT payload. Here's what happened, how to check if you're affected, and exactly what to do to secure your project.

Ashley Innocent

Ashley Innocent

2 April 2026

axios@1.14.1 Supply Chain Attack: What to Do Now

TL;DR

On March 30–31, 2026, axios versions 1.14.1 and 0.30.4 were compromised on npm with a malicious dependency that drops a remote access trojan (RAT) on infected machines. Both versions have been unpublished. The safe version is 1.14.0. If you installed axios@1.14.1 or 0.30.4, treat the machine as compromised and rotate all credentials immediately.

What axios is and why this matters

axios has 100 million weekly downloads on npm. It's the HTTP client in countless frontend frameworks, backend Node.js services, and enterprise applications. When a package this foundational gets compromised, the blast radius is enormous — developers who ran npm install in a narrow time window on March 30–31 pulled malware onto their machines without knowing it.

This isn't a hypothetical supply chain risk. It happened, it was confirmed, and the payload was serious: a multi-stage remote access trojan capable of executing arbitrary commands, exfiltrating system data, and persisting on infected machines.

If your team uses axios, and you use Apidog to design and test your HTTP client integrations, read this before your next deploy.

button

Timeline of the attack

March 30, 2026 — 23:59:12 UTC: A malicious package called plain-crypto-js@4.2.1 is published to npm by an account using nrwise@proton.me. An earlier clean version (4.2.0) had been published 18 hours prior as a convincing typosquat of the legitimate crypto-js library.

March 31, 2026 — 00:05:41 UTC: Socket's automated malware detection flags plain-crypto-js@4.2.1 as malicious — six minutes after it was published.

March 31, 2026 — shortly after midnight: axios@1.14.1 is published to npm, pulling in plain-crypto-js@4.2.1 as a dependency. The release does not appear in the axios GitHub repository's official tags. The most recent legitimate tag remains v1.14.0.

March 31, 2026 — morning: The GitHub issue #10604 is opened publicly reporting both axios@1.14.1 and axios@0.30.4 as compromised. Axios maintainers confirm they initially cannot revoke the attacker's access — the compromised account has higher npm permissions than the legitimate maintainers.

March 31, 2026: Both axios@1.14.1 and axios@0.30.4 are unpublished from npm. Axios maintainers begin revoking tokens, tightening publish controls, and investigating how a long-lived npm token was exploited to gain unauthorized publish access.

How the attack worked

The attack exploited a gap in axios's publishing workflow: a long-lived npm token that had been used alongside trusted publishing. The attacker — likely after compromising a maintainer's credentials — used this token to publish a new version outside the normal release process.

The new version introduced plain-crypto-js@4.2.1 as a dependency. The package name was designed to look like a legitimate cryptography utility; the earlier clean 4.2.0 version established a brief history to reduce suspicion.

Inside plain-crypto-js@4.2.1, Socket's analysis found a multi-stage payload:

  1. Stage 1 — Execution: The package runs code at install time (via npm lifecycle scripts) to drop a secondary payload.
  2. Stage 2 — RAT deployment: The payload installs a remote access trojan that opens a persistent backdoor.
  3. Stage 3 — Exfiltration: The RAT is capable of executing arbitrary shell commands sent from a C2 server, reading environment variables and secrets from the filesystem, and sending system data out over the network.

The RAT persists across reboots, meaning machines that installed the compromised version remain at risk even after the npm package is removed unless the RAT is explicitly hunted and removed.

Am I affected?

You are potentially affected if:

Check immediately:

# Check installed version
npm list axios

# Check lock file
grep '"axios"' package-lock.json | head -5

# Check for plain-crypto-js presence
npm list plain-crypto-js
ls node_modules/plain-crypto-js 2>/dev/null && echo "INFECTED" || echo "Not found"

If plain-crypto-js is present in your node_modules, you ran the malicious version.

What to do right now

1. Update axios immediately

npm install axios@1.14.0
# or pin to latest safe
npm install axios@latest

Verify:

npm list axios
# Should show 1.14.0 or higher (once a clean 1.14.x is published)

2. If you installed the compromised version

Do not treat this as a routine dependency update. Treat the machine as compromised:

3. Audit your CI/CD pipelines

If your build pipeline ran npm install during the window, your CI environment may have been compromised. Check:

# Check build logs for the affected timeframe
# Look for axios@1.14.1 in any install output

# Verify current CI node_modules are clean
npm list axios plain-crypto-js

Rotate any secrets your CI pipeline has access to: deployment keys, cloud provider credentials, registry tokens.

4. Verify your lock file

Lock files (package-lock.json, yarn.lock) should pin exact versions. If your lock file has 1.14.1, regenerate it:

# Remove and regenerate
rm package-lock.json
npm install

Check the new lock file resolves axios to a safe version before committing.

Using Apidog to audit your axios API calls

If you use axios as your HTTP client for calling APIs, Apidog can help you verify that your integration is still sending the right requests after the dependency update.

After updating to axios@1.14.0, import your existing API endpoints into Apidog and run a quick regression check to confirm behavior hasn't changed. This is especially useful if you're worried that the malicious version may have tampered with request or response payloads — Apidog's response assertions let you validate exact field values, headers, and status codes:

// Apidog post-response assertion
pm.test("Response is clean — no injected fields", () => {
    const body = pm.response.json();
    pm.expect(body).to.not.have.property('__injected');
    pm.expect(pm.response.headers.get('X-Injected-Header')).to.be.null;
});

Running your full test suite against the updated axios version in Apidog gives you a documented clean baseline before you push to production.

Try Apidog free to set up HTTP client regression tests.

Why supply chain attacks on npm are hard to stop

The axios attack is not an anomaly. It's a pattern:

The common thread: trust in the publishing account, not in the code. npm's model grants publish access to maintainers, and if a maintainer's credentials are compromised, the attacker inherits that trust.

Mitigations that actually help:

Measure What it does
Lock files (package-lock.json) Pins exact versions, prevents silent upgrades
npm audit in CI Flags known vulnerabilities before deploy
Socket.dev / Snyk Behavioral analysis — flags suspicious packages even before CVEs exist
Two-factor auth on npm Makes credential compromise harder
npm publish with short-lived tokens Limits the window of exposure if a token leaks
Read lock files in PRs Catch unexpected dependency changes in code review

The axios team has since acknowledged that long-lived npm tokens were part of the problem and is moving to tighter publish controls. But the fix needs to come from the ecosystem, not just individual packages.

Indicators of Compromise (IOCs)

Per Socket's analysis:

If you suspect infection, file a report with npm security at security@npmjs.com and preserve logs.

Conclusion

The axios 1.14.1 compromise is a reminder that dependency security isn't a one-time audit — it's a continuous process. Lock your versions, run behavioral analysis tools like Socket in your CI, rotate credentials when anything looks off, and keep your lock files under review in code review.

If you need to rebuild confidence in your API integration after updating axios, Apidog gives you the test scenarios, assertions, and mocking tools to verify your HTTP client behavior before you ship.

button

FAQ

Which axios versions are compromised?axios@1.14.1 and axios@0.30.4. Both have been unpublished from npm. The safe version is 1.14.0 (or any version in the 1.13.x, 1.12.x lines).

What does the malicious axios payload do?It pulls in plain-crypto-js@4.2.1, which deploys a multi-stage payload including a remote access trojan (RAT). The RAT can execute arbitrary commands from a remote C2 server, exfiltrate environment variables and secrets, and persist across reboots.

How do I know if I installed the compromised version?Run npm list axios — if it shows 1.14.1 or 0.30.4, you're affected. Also check npm list plain-crypto-js — if that package is present, the malicious code ran on your machine.

Is it enough to just update axios?No. Updating removes the malicious dependency going forward, but the RAT may already be installed and persisting on the machine. If you installed the compromised version, rotate all secrets and audit the machine for persistence mechanisms.

How did the attacker publish to npm without being a maintainer?The attacker likely compromised a maintainer's credentials and exploited a long-lived npm token that had publish access. The axios team is investigating and tightening publish controls.

What's the difference between this and a regular vulnerability?A vulnerability is a flaw in legitimate code. A supply chain attack introduces malicious code through a trusted publishing channel. The compromised code was never in the axios GitHub repository — it was injected directly into the npm publish.

How can I protect my projects from future supply chain attacks?Use lock files, run npm audit in CI, add a tool like Socket.dev for behavioral analysis, enable 2FA on npm accounts, use short-lived publish tokens, and audit your lock file diffs in code review.

Explore more

Best AI Coding Agent in 2026? Claude Code vs OpenClaw

Best AI Coding Agent in 2026? Claude Code vs OpenClaw

Claude Code vs OpenClaw compared feature by feature: tools, security, multi-agent workflow, channels, and model support-plus where Apidog fits your API stack.

2 April 2026

What Is Microsoft VibeVoice? How to Use the Open-Source Voice AI Models

What Is Microsoft VibeVoice? How to Use the Open-Source Voice AI Models

VibeVoice is Microsoft's open-source voice AI: TTS (90 min, 4 speakers), streaming, and ASR (60 min, 50+ languages). MIT-licensed. Learn to install and use it.

2 April 2026

How to Secure NPM Dependencies ? A Complete Supply Chain Security Guide for API Developers

How to Secure NPM Dependencies ? A Complete Supply Chain Security Guide for API Developers

Protect your API projects from npm supply chain attacks with 7 layers of defense: lockfiles, script blocking, provenance, behavioral analysis, and dependency reduction.

1 April 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs