2 minute read

CRITICAL: Axios npm Package Backdoored — 100M Weekly Downloads, Cross-Platform RAT

This is not a drill. Assume compromise if you’ve pulled affected versions. Immediate action required.

Today, the open-source community is grappling with what may be the most sophisticated npm supply chain attack ever documented against a top-10 package. The ubiquitous axios package, downloaded over 100 million times weekly, was compromised, injecting a hidden dependency that deploys cross-platform Remote Access Trojans (RATs). If your codebase, CI/CD pipelines, or any dependency tree has pulled axios@1.14.1 or axios@0.30.4, you must treat your environment as fully compromised and take immediate corrective action.

The Attack: Operational Sophistication on Display

Attackers managed to hijack the npm account of maintainer jasonsaayman. In a move demonstrating advanced operational security, they swapped the npm account’s registered email to a ProtonMail address, ensuring they controlled account recovery. They then published tainted versions (axios@1.14.1 and axios@0.30.4) containing a malicious, hidden dependency: plain-crypto-js@4.2.1.

This malicious dependency was no simple script. It was engineered to deploy OS-specific RATs:

  • macOS: Installed as a system daemon.
  • Windows: Deployed via PowerShell.
  • Linux: Delivered as a Python backdoor.

Compounding the severity, the malicious dependency was staged 18 hours in advance, and three separate payloads were pre-built. The tainted versions were published across both release branches within a mere 39 minutes, maximizing the attack’s reach before detection.

What This Means for You: Immediate Action Required

This attack bypasses many traditional security measures because it targets the trust inherent in the software supply chain. If you have pulled either axios@1.14.1 or axios@0.30.4, the following steps are critical:

  1. Assume Full Compromise: Do not try to ‘clean’ affected systems. Treat them as if all secrets and credentials accessible from that environment have been exfiltrated.
  2. Rotate ALL Secrets: Immediately rotate all API keys, passwords, private keys, SSH keys, cloud credentials, and any other sensitive information that could have been accessed from the compromised environment.
  3. Rebuild from Scratch: Rebuild your affected services and applications entirely from known-good, trusted sources. Do not rely on existing artifacts that may have been tainted.
  4. Audit Your Dependencies: Review your lock files (package-lock.json, yarn.lock, etc.) for any instances of axios@1.14.1 or axios@0.30.4. Remove them and revert to a known-good version (any version prior to 1.14.1 in the 1.x branch, or prior to 0.30.4 in the 0.x branch).
  5. Enhance CI/CD Security: This incident underscores the need for robust CI/CD security:
    • Implement Dependency Scanning: Use tools to continuously scan your dependencies for known vulnerabilities and malicious packages.
    • Enforce Package Signing: Utilize tools like Sigstore/cosign to verify the integrity and origin of your packages.
    • Secure npm Accounts: Ensure all npm accounts, especially those with publishing privileges, have strong MFA enabled and are monitored for suspicious activity.
    • Reproducible Builds: Aim for reproducible builds where possible, allowing you to verify that the output binary exactly matches the source code.

The Broader Implications: Trust in the Supply Chain

The Axios attack is a stark reminder that the software supply chain is the new perimeter. As developers, we place immense trust in the open-source packages we integrate into our projects. This incident, however, demonstrates that this trust can be exploited with devastating effect. It is no longer sufficient to simply rely on the reputation of a package; proactive security measures, rigorous auditing, and a security-first mindset are paramount. The widespread adoption of these compromised versions highlights a critical need for better automated security checks and verification processes throughout the development lifecycle.

Stay vigilant. The landscape of cybersecurity threats is constantly evolving, and the open-source ecosystem, while incredibly valuable, is a prime target.


#Cybersecurity #SupplyChainAttack #npm #OpenSource #DevOps #Security #Axios #RAT

Updated: