Axios NPM Package Compromised: Supply Chain Attack Hits JavaScript HTTP Client with 100M+ Weekly Downloads

Summary: Axios, a widely-used JavaScript HTTP client with more than 100 million weekly downloads on npm, was compromised via a supply chain attack that introduced malware into the ecosystem.

The compromise of Axios puts pressure back on the JavaScript ecosystem's supply chain, but this time with an especially alarming scope given the weight of the affected package. According to Trend Micro, attackers used stolen npm credentials to publish malicious versions of one of the most widely-used HTTP clients in the ecosystem, introducing a phantom dependency capable of deploying persistent malware on macOS, Windows, and Linux.

The most delicate technical detail is the combination of stealth and reach. Compromised versions included plain-crypto-js@4.2.1, which activated a postinstall hook to run the malicious chain and then clean up part of its footprint by replacing files with clean versions. That mechanism not only sought infection but also made it harder for later analysis and response efforts.

The story matters because Axios is no marginal library; it's a key piece within thousands of projects and CI/CD pipelines, making any manipulation an event with a massive blast radius. Additionally, the fact that manual publication bypassed certain automated controls reinforces a lesson the ecosystem already knows but continues to learn by experience: trusting in pipelines and automation doesn't replace vigilant monitoring of accounts, dependencies, and release processes.

At its core, the Axios case isn't just a hole in npm; it's a reminder that a single compromised credential can contaminate globally-consumed software.

Key facts

  • Axios, a widely-used JavaScript HTTP client with more than 100 million weekly downloads on npm.
  • Supply chain attack that used stolen npm credentials to publish malicious versions.
  • Phantom dependency plain-crypto-js@4.2.1 introduced persistent malware across multiple platforms.
  • npm security scanners detected the malicious dependency quickly.

Why it matters

This attack highlights the importance of supply chain security, especially regarding dependency pinning and CI/CD processes. Constant monitoring is crucial to prevent attackers from introducing malware into popular projects.

X profile@trendaisecurityhttps://x.com/trendaisecurity
Embedded content for: Axios NPM Package Compromised: Supply Chain Attack Hits JavaScript HTTP Client with 100M+ Weekly Downloads