Critical Supply Chain Attack: Axios npm Package Compromised to Deliver Cross-Platform RAT
A major supply chain attack has impacted the widely used JavaScript library Axios, after attackers managed to publish malicious versions of the package to npm using compromised maintainer credentials.
The incident affects versions 1.14.1 and 0.30.4, which were found to include a hidden malicious dependency designed to deliver malware across multiple operating systems.
How the Attack Was Executed
The attackers gained access to the npm account of a core Axios maintainer, allowing them to push tampered versions of the package without raising immediate suspicion.
These malicious releases introduced a fake dependency named “plain-crypto-js”, which served as the initial infection vector.
Because the packages were published through legitimate channels, they bypassed standard CI/CD security checks, making the attack particularly dangerous.
Malware Delivery via Post-Install Script
The injected dependency was not just harmless code, it contained a post-install script that executed automatically when the package was installed.
This script acted as a dropper for a cross-platform Remote Access Trojan (RAT), targeting:
- Windows
- macOS
- Linux
Once executed, the malware could establish persistent access and enable attackers to control infected systems remotely.
Why This Is Highly Dangerous
This attack highlights a critical weakness in the open-source ecosystem: trust in widely used dependencies.
Axios is one of the most popular HTTP clients in the JavaScript ecosystem, used in countless applications. By compromising it, attackers gain indirect access to a massive number of downstream projects.
This type of attack is especially effective because:
- Developers often trust and auto-update dependencies
- Malicious code is hidden within legitimate packages
- Infection happens during normal development workflows
Scope and Impact
The attack has the potential to affect thousands of applications and developer environments that installed the compromised versions.
Since the payload is executed during installation, even development machines, not just production systems can be compromised.
This creates a high-risk scenario for:
- Credential theft
- Source code exposure
- Lateral movement within internal networks
Mitigation and Recommended Actions
Developers and organizations should take immediate action:
- Avoid using affected Axios versions (1.14.1 and 0.30.4)
- Upgrade to a clean and verified version immediately
- Audit dependencies and lockfile changes for anomalies
- Monitor systems for unusual outbound connections or processes
- Implement stricter controls for dependency management
It is also recommended to use tools that verify package integrity and detect suspicious behavior in dependencies.
Why This Matters
This incident reinforces a growing trend: software supply chain attacks are becoming one of the most effective attack vectors.
Instead of targeting organizations directly, attackers compromise trusted tools and libraries, effectively turning them into distribution channels for malware.
As reliance on open-source ecosystems continues to grow, securing dependencies is no longer optional, it is a critical part of modern cybersecurity strategy.
Comments
Post a Comment