Massive NPM Supply Chain Attack Compromises JavaScript Ecosystem
A sophisticated phishing operation has successfully infiltrated the NPM repository, compromising multiple high-profile JavaScript packages and exposing millions of development projects worldwide to malicious code execution. The attack, orchestrated through credential theft and strategic package manipulation, represents one of the most significant supply chain breaches in the Node.js ecosystem’s history.
The breach originated from a meticulously crafted phishing campaign utilizing the typosquatted domain npnjs[.]com to deceive legitimate developers. Attackers exploited missing DMARC and SPF records on the official npmjs.org domain, enabling spoofed emails to bypass security filters and reach unsuspecting maintainers.
Between July 18-19, 2025, threat actors successfully harvested NPM authentication tokens from multiple package maintainers, subsequently publishing malicious versions across seven critical packages. The compromised libraries include widely-used development tools and utilities that collectively receive millions of weekly downloads.
Jordan Harband, maintainer of the compromised is package, described the attack’s stealth approach: “The old owner was somehow removed from the npm package, and emailed me to be re-added. Everything seemed normal, so I obliged, and the next morning this malware was published.”
The is package, downloaded approximately 2.8 million times weekly, received a cross-platform JavaScript payload targeting Node.js environments across macOS, Linux, and Windows systems. This malware establishes persistent command-and-control channels through WebSocket connections, creating interactive remote shells with full system privileges.
The payload employs memory-only reconstruction techniques using a custom 94-character alphabet decoder, executing malicious scripts via new Function calls without leaving disk artifacts. Once active, it harvests system information including hostname, operating system details, CPU architecture, and environment variables before establishing encrypted communication channels.
Simultaneously, packages like eslint-config-prettier and eslint-plugin-prettier deployed Windows-centric malware dubbed “Scavenger.” This sophisticated infostealer targets browser-stored credentials and session data while employing advanced evasion techniques including indirect system calls and encrypted command-and-control communications.
Technical analysis revealed that Scavenger’s aggressive security manipulation occasionally triggered Chrome’s built-in protection mechanisms, alerting users to compromised security flags. However, by that point, credential harvesting had likely already occurred.
The attack’s scope encompasses multiple critical development packages:
High-Impact Compromised Packages:
eslint-config-prettier (versions 8.10.1, 9.1.1, 10.1.6, 10.1.7)eslint-plugin-prettier (versions 4.2.2, 4.2.3)synckit (version 0.11.9)@pkgr/core (version 0.2.8)napi-postinstall (version 0.3.1)got-fetch (versions 5.1.11, 5.1.12)is (versions 3.3.1, 5.0.0)The malicious packages remained publicly available for approximately six hours, during which automatic dependency resolution systems and CI/CD pipelines unknowingly integrated compromised code into production environments.
The attack’s sophistication extends beyond initial compromise. The JavaScript loader in the is package demonstrates persistence mechanisms that overwrite its own index.js file, requiring comprehensive remediation beyond simple node_modules deletion. Complete recovery necessitates lockfile resets and thorough system auditing.
Reports from affected developers highlight the malware’s devastating impact. One developer documented complete system compromise requiring network isolation, complete SSD replacement, fresh operating system installation, and comprehensive credential rotation across all development accounts and SSH keys.
Security researchers and the NPM ecosystem have responded rapidly to contain the breach. Socket’s automated threat detection systems successfully identified and flagged malicious releases, while reverse engineering teams published comprehensive technical analyses detailing malware behavior and indicators of compromise.
Immediate Protection Measures:
This attack underscores fundamental weaknesses in open-source dependency trust models. The incident demonstrates how a single compromised package can cascade through thousands of downstream projects, creating extensive attack surfaces that remain undetected until significant damage occurs.
The coordinated nature of this campaign, combined with its technical sophistication and persistence mechanisms, suggests state-sponsored or highly organized criminal involvement. The dual-payload approach targeting both cross-platform and Windows-specific environments indicates advanced threat actor capabilities and strategic planning.
Organizations must reassess their dependency management practices, implementing comprehensive supply chain security measures including package integrity verification, runtime monitoring, and isolated development environments. The JavaScript ecosystem’s interconnected nature demands proactive security measures rather than reactive responses to supply chain compromises.