introduction
A major software supply chain attack has shaken the open-source JavaScript ecosystem, as attackers hijacked several high-profile npm packages with a combined download count exceeding two billion downloads weekly. The attack leveraged phishing, account takeovers, and malicious code insertion, threatening the security of countless downstream projects and users.
In July 2025, malicious actors orchestrated a sophisticated attack campaign against npm package maintainers, resulting in the unauthorized publication of trojanized versions of popular packages.
Key dates and facts:
For the affected packages, the malicious versions remained available for up to six hours before being detected and removed, a significant window considering the scale of weekly downloads.
The campaign began with a phishing attack targeting npm maintainers. Attackers used spoofed login pages and typosquatted domains to steal credentials. Upon gaining access to accounts, attackers modified package contents and uploaded malicious versions.
Key technical details:
For the Nx package, malware leveraged AI CLI tools (Claude, Gemini, Q) to scan for and extract secrets, including cryptocurrency wallets and developer tokens, automatically exfiltrating the information via attacker-created GitHub repositories.
Several critical npm packages were compromised:
Hundreds of organizations and untold numbers of software projects relying on these packages faced significant exposure, especially due to the packages' popularity and weekly traffic.
After detection, affected packages were deprecated and clean versions restored. Security vendors and npm responded by:
Mitigation recommendations include:
This incident follows a pattern of increasingly frequent and impactful software supply chain attacks:
Software supply chain attacks occur when attackers compromise the upstream components or tools that other software projects rely upon. In the npm ecosystem, with its deep dependency chains, a single compromised package can cascade through thousands of projects.
Recent history has seen high-profile incidents such as the SolarWinds compromise and repeated package registry breaches, underscoring the importance of securing both human and machine aspects of software distribution.
Table 1: Affected NPM Packages and Details
Package Name |
Malicious Versions |
CVE Assigned |
Weekly Downloads |
Attack Method |
eslint-config-prettier |
8.10.1, 9.1.1, 10.1.6, 10.1.7 |
CVE-2025-54313 |
>30 million |
Phishing, DLL infostealer |
eslint-plugin-prettier |
4.2.2, 4.2.3 |
- |
Millions |
Phishing, DLL infostealer |
synckit |
0.11.9 |
- |
Hundreds of thousands |
Phishing, DLL infostealer |
@pkgr/core |
0.2.8 |
- |
Tens of thousands |
Phishing, DLL infostealer |
napi-postinstall |
0.3.1 |
- |
Tens of thousands |
Phishing, DLL infostealer |
is |
3.3.1, 5.0.0 |
- |
Millions |
Maintainer phishing, hijack |
Nx |
21.5.0 and others |
- |
Millions |
AI-assisted infostealer |
Table 2: Key Security Incident Metrics
Date |
Event |
Exposure Window |
Estimated Impacted Repos/Users |
July 18, 2025 |
Malicious npm packages published |
~6 hours (eslint-config-prettier) |
Not publicly disclosed |
July 19, 2025 |
'is' package compromised |
~6 hours |
Not publicly disclosed |
Aug 26–27, 2025 |
Nx AI attack releases malicious versions |
~8 hours (data exfil window) |
>400 users/orgs, >5500 repos |
SUPPORTING DOCUMENTATION