← Blog

5 min read

The Axios npm Supply Chain Attack Is a Warning Shot for the Entire JavaScript Ecosystem

On March 31, 2026, the JavaScript ecosystem got another reminder that open source trust is fragile. Two malicious versions of Axios, one of the most widely used HTTP client libraries in the npm ecosys

The Axios npm Supply Chain Attack Is a Warning Shot for the Entire JavaScript Ecosystem

On March 31, 2026, the JavaScript ecosystem got another reminder that open source trust is fragile. Two malicious versions of Axios, one of the most widely used HTTP client libraries in the npm ecosystem, were published to npm after a lead maintainer’s account was compromised. Those poisoned releases, [email protected] and [email protected], pulled in a malicious dependency called [email protected], which executed a postinstall script to drop a remote access trojan on macOS, Windows, and Linux systems.

That detail matters because this was not a browser-side compromise. End users loading an application that happens to use Axios were not the primary target. The attack hit developers, build systems, CI runners, and any machine that installed the malicious package versions while lifecycle scripts were enabled. In other words, the danger lived in the software supply chain itself, not in the runtime behavior of ordinary web apps.

What happened

According to Malwarebytes and StepSecurity, the attacker used compromised credentials tied to a lead Axios maintainer to publish two malicious package versions on npm. Those releases added [email protected] as a dependency even though that package was never imported by Axios’s source code. The sole purpose of that dependency was to run a malicious postinstall hook that downloaded and launched a platform-specific payload.

StepSecurity’s timeline suggests the attack was carefully staged. A decoy version of plain-crypto-js was published first to create package history and avoid looking like a brand-new, suspicious dependency. Later, the attacker published the malicious version of that dependency, then pushed the two compromised Axios releases across both the modern 1.x line and the legacy 0.x line within minutes of each other. Both Axios versions were removed from npm after a few hours, but that was still enough time to expose machines running fresh installs in active development and CI/CD pipelines.

The maintainer’s own postmortem adds even more context. Jason Saayman wrote that the attacker gained access to the lead maintainer’s PC through a targeted social engineering campaign and RAT malware, which then led to the publication of the malicious npm releases. He also confirmed that community reports were being deleted during the incident and that remediation now includes wiping affected devices, resetting credentials, and moving toward a more immutable release setup with proper OIDC-based publishing.

Why this attack is so important

Axios is not some obscure library buried in a forgotten corner of npm. It is one of the most widely used packages in the JavaScript ecosystem, with reporting around the incident citing roughly 100 million weekly downloads. That kind of distribution gives attackers reach across startups, enterprise applications, internal tooling, open source projects, and CI environments all at once.

What makes this incident especially dangerous is that the malicious logic was not inserted directly into Axios’s visible application code. Instead, it was hidden in a dependency whose only job was to run during installation. StepSecurity reports that the malware cleaned up after itself, removing the obvious traces of compromise and swapping files so that later inspections of node_modules could appear clean. That means traditional after-the-fact checks like casually reviewing installed package files or relying on a simple npm audit workflow may not have been enough to reveal what happened.

This is the nightmare scenario for modern package ecosystems. Developers trust package names, maintainers, and familiar install flows. Attackers know that. If they can compromise a maintainer or their publishing credentials, they do not need to exploit every downstream application individually. They only need to poison the dependency stream once and let the ecosystem distribute the blast radius for them. That is why supply chain attacks are so efficient and so dangerous.

The trust problem npm still has to solve

One of the most revealing details in StepSecurity’s analysis is that the malicious [email protected] release did not match the project’s usual publish pattern. Legitimate Axios 1.x releases were being published through GitHub Actions using npm’s Trusted Publisher model, which ties package publication to an OIDC-authenticated CI workflow. The malicious version broke that pattern and appears to have been published manually with a stolen long-lived npm token, without the same trusted publisher metadata or corresponding GitHub tag.

That distinction is a big deal because npm and GitHub have already been pushing the ecosystem toward stronger publishing controls. GitHub announced npm trusted publishing with OIDC as generally available in July 2025, explicitly positioning it as a way to eliminate long-lived npm tokens and replace them with short-lived, workflow-specific credentials. In September 2025, GitHub also announced stronger npm authentication and token management changes, again encouraging trusted publishing because it improves auditability and removes a major class of token theft risk.

The Axios incident shows both progress and a gap. The progress is that safer publishing models already exist. The gap is that if high-impact packages still allow any path that bypasses those controls, then a compromised maintainer account can still push malicious code into one of the most trusted ecosystems in software. This is not just a maintainer hygiene issue. It is a registry trust model issue.

What developers and security teams should do now

If your environment installed [email protected], [email protected], or plain-crypto-js, treat the affected machine as potentially fully compromised. The Axios maintainer’s postmortem recommends checking lockfiles, downgrading to known-good Axios versions, deleting the malicious dependency, rotating all secrets and credentials available to that machine, and reviewing logs for connections to sfrclak[.]com or 142.11.206.73 on port 8000. Malwarebytes also published filesystem indicators for macOS, Linux, and Windows that defenders can use during triage.

For organizations, the takeaway is larger than this one package. Security teams should assume that developer workstations and CI runners are prime targets, because that is where secrets, signing access, deployment credentials, and source control permissions tend to concentrate. Package install telemetry, egress monitoring, secret minimization, ephemeral runners, and aggressive credential rotation are no longer “nice to have” defenses. They are core supply chain controls. This is an inference based on the attack path and the remediation guidance published by Axios, Malwarebytes, and StepSecurity.

Maintainers and package owners should also move faster toward immutable, attestable release processes. That means trusted publishing, provenance, least-privilege release workflows, reduced dependence on long-lived tokens, and stronger separation between a maintainer’s personal endpoint and the systems authorized to publish packages. GitHub’s npm guidance makes clear that trusted publishing exists precisely to reduce the risk of stolen reusable credentials.

Final thoughts

The Axios compromise was not just another package incident. It was a case study in how trust gets weaponized at scale. A library used by millions of projects became the delivery vehicle for a cross-platform RAT because one trusted publishing path was still vulnerable to account compromise. The fact that the malicious packages were short-lived does not make the event minor. It makes it a warning. In software supply chains, a few hours can be enough.

If the JavaScript ecosystem wants to restore confidence, the lesson is simple. Trust cannot just be assumed because a package name is familiar or a maintainer is reputable. Trust has to be continuously verified through hardened release pipelines, better registry controls, and faster incident response. npm has made important security moves, but the Axios attack shows the ecosystem still has work to do.