Critical Axios Supply Chain Attack Compromises Developer Systems, Prompts Urgent Security Action

A critical supply chain attack has impacted Axios, a JavaScript library boasting over 80 million weekly downloads. Malicious versions 1.14.1 and 0.30.4 were published shortly after midnight UTC, reportedly by compromising a maintainer’s account. Attackers injected a new dependency, plain-crypto-js, into these versions. This rogue package’s post-install script was designed to download a Trojan, subsequently exfiltrating sensitive data such as credentials, API keys, and crypto tokens from affected macOS, Linux, and Windows systems. Developers who executed npm install, bun install, npm update, or bun update in the preceding hours are at significant risk. Urgent actions for potentially affected individuals include running specific system checks, rotating all secrets, changing passwords, and disabling API keys, treating all system credentials as compromised. The swift 39-minute compromise of both versions suggests a highly orchestrated attack.

This incident underscores the escalating threat of supply chain attacks, where adversaries target upstream dependencies rather than directly infiltrating core codebases. The malicious plain-crypto-js package leveraged npm’s post-install script mechanism to execute its payload automatically upon package installation. A puzzling aspect of the attack is how it seemingly bypassed npm’s Trusted Publishing safeguards for the 1.x branch, suggesting a potential vulnerability involving long-lived classic npm tokens. This event follows a trend of similar recent attacks, including the Shai Hulud incident in the npm ecosystem and a compromise of the Lite-LLM package in Python. Contributing factors to this rise include the exponential increase in code generation (often AI-assisted), the ease of creating sophisticated attack tools, and the challenges of open-source maintainer overload. To bolster defenses, developers are advised to implement minimum-release-age settings in pnpm or bun to prevent installation of newly published, potentially malicious versions. Furthermore, adopting secret management services (e.g., Doppler) to encrypt and centralize credentials, rather than storing them in plaintext .env files, is crucial. Finally, isolating development environments through virtual private servers (VPS) or Docker containers can significantly limit the blast radius of a successful compromise, preventing system-wide data exfiltration.