The Axios Supply Chain Attack: A Post-Mortem analysis

The Axios Breach: How 100 Million Downloads Became a Vector
On March 31, 2026, the JavaScript ecosystem faced a significant compromise. Axios, the industry-standard HTTP client, was used to distribute a Remote Access Trojan (RAT). The incident lasted only a few hours, but its reach was global.
When: The Timeline
The compromise occurred in a tight window between 00:21 and 03:15 UTC. During this time, two poisoned versions were pushed to the npm registry:
- v1.14.1
- v0.30.4
Registry security teams flagged the unusual publishing patterns and removed the versions within three hours, but by then, thousands of automated CI/CD pipelines had already pulled the code.
Who: The Compromise and the Actor
The attack originated from the account takeover of lead maintainer Jason Saayman.
- The Victim: Saayman’s npm credentials were harvested via a targeted social engineering campaign. The attackers posed as a legitimate firm, tricking him into using a compromised meeting tool that scraped local session tokens.
- The Attacker: Forensic analysis by Microsoft and Sophos points to North Korean state-sponsored groups (specifically NICKEL GLADSTONE). The infrastructure used to host the malware matched previous campaigns targeting the cryptocurrency and fintech sectors.
Why: Strategic Espionage
This wasn't a simple defacement. The objective was credential harvesting and lateral movement. By infecting a core library, the attackers sought:
- Environment Secrets: Automated scraping of
.envfiles and AWS/GCP tokens from developer machines. - Downstream Access: Injecting code into the build processes of major tech companies to compromise their end-users.
- Persistence: Setting up backdoors that would allow for remote access long after the initial npm package was deleted.
How: The "Phantom" Dependency
The technical execution avoided direct code changes to the Axios library to bypass manual review. Instead, the attackers used a stolen npm access token to publish directly from a CLI, bypassing GitHub's security oversight.
The attackers injected a 'phantom' dependency into the
package.jsoncalledplain-crypto-js. It wasn't actually used by the code, but npm's installer executed it anyway.
The attack chain worked as follows:
- The Hook: A
postinstallscript in the hidden dependency triggered a platform-check. - The Payload: Depending on whether the victim used Windows, macOS, or Linux, a specific binary was downloaded. On Windows, this was a PowerShell-based RAT; on Linux, it was a Python script.
- The Cleanup: The malware was designed to overwrite the
package.jsonwith a clean version immediately after the RAT was deployed, leaving no trace for local developers to find during a routine audit.
Final Thoughts
The Axios breach highlights a fundamental fragility in the modern software supply chain: when a "blindly trusted" dependency is compromised, the fallout is instantaneous. For teams that ran an npm install on March 31, 2026, the standard recovery protocol applies: auditing build logs for anomalies and rotating any secrets exposed to the environment during that window.
Read Next.
Keyless Entry Relay Attacks: How They Work and How to Prevent Them
Learn how keyless entry relay attacks work using an SDR and a Raspberry Pi, and discover practical ways to protect your vehicle.
Securely Running OpenClaw with Ollama via Tailscale
OpenClaw is a powerful AI agent, but giving it full host access can be risky. Learn how to run OpenClaw securely with Ollama by leveraging Tailscale to restrict access to a single port, while keeping your home network safe.
Building the Ploopy Adept BLE (Any Ball Mod)
A comprehensive guide on how to build a wireless Ploopy Adept trackball, featuring the highly recommended Any Ball mod, ordering the PCB, and assembling the components.


