5,400 Malicious npm Packages Expose Supply Chain Risks

A report finds about 5,400 malicious npm packages, revealing systemic open-source supply chain risks in publishing, dependencies, and installation.
A supply chain threat analysis of the npm ecosystem identifies about 5,400 malicious packages and uses them as a core sample to dissect attacker intrusion paths. It highlights three exposure surfaces: low publishing barriers and identity trust, blind spots in dependency resolution, and execution on install. The report urges teams to make dependency source verification, version pinning, and install script review routine practice.

Software supply chain attacks are evolving from occasional incidents into a systemic threat. A recent analysis of the npm ecosystem reports that approximately 5,400 malicious npm packages have been identified in total — a figure that reflects how attackers exploit the trust mechanisms and publishing process gaps of open-source ecosystems to inject malicious code into the build chains developers rely on every day.
The Attack Logic Behind the Scale of Malicious Packages
The report uses these 5,400 malicious packages as its core sample to answer a key question: how exactly do attackers get into the npm ecosystem? Unlike traditional vulnerability exploitation, malicious packages often masquerade as legitimate tools, use names closely resembling popular libraries, or trick users into installing them through dependency confusion. Once pulled into a project, they may steal credentials, plant backdoors, or perform other actions during install scripts, at runtime, or in the build phase.
The value of this sample lies not in the number itself but in the attack patterns it reveals. The report frames itself as the opening installment of a supply chain threat landscape series, suggesting that future installments will break down attacker techniques and defense strategies from different angles.
Dependency Confusion is a supply chain attack technique targeting package managers: attackers publish malicious packages to a public registry (such as npm) under the same names as an organization's internal private packages. When a build system is configured with both public and private sources, the package manager often resolves by version number or source priority, potentially pulling the higher-version malicious package from the public source first and thereby bypassing access controls on the private registry. This type of attack works because developers assume "same name means same package," while package managers do not verify package provenance. Once a private package name used on a corporate intranet leaks (for example, appearing in public code, error logs, or dependency manifests), attackers can squat on it and poison it.
Three Exposure Surfaces of Supply Chain Risk
Judging by the distribution and behavior of these 5,400 malicious packages, npm ecosystem risk is concentrated at three levels.
Publishing Barriers and Identity Trust
npm allows developers to publish packages with a relatively low barrier to entry. This openness is both the foundation of the ecosystem's prosperity and an entry point for attackers. Malicious packages are often published through newly registered accounts with no accumulated reputation, but they deliberately imitate well-known projects in their names, exploiting developers' trust in package names to spread.
Typosquatting is one of the most common distribution methods for malicious packages: attackers register names that differ from popular libraries by only one or two characters — for example, writing lodash as 1odash or cross-env as crossenv — exploiting developers' carelessness when typing manually or copy-pasting. Related tactics include brandjacking (impersonating well-known organizations or brand prefixes) and starjacking (faking repository links and download counts to create an illusion of credibility). npm's namespace mechanism (scoped packages such as @scope/name) can reduce the room for impersonation to some extent, but the large number of packages that do not use scopes remain exposed. Developers should prefer official scopes and verify the repository link on a package's homepage.
Blind Spots in Dependency Resolution
Modern projects routinely pull in hundreds of transitive dependencies, making it difficult for developers to review them one by one. Attackers exploit this complexity by hiding malicious code in deep dependencies or version updates, so that traditional code review struggles to cover every path of introduction.
The Risk of Execution on Install
npm packages' install script mechanism allows arbitrary code to run during installation, giving malicious packages a natural landing window. Among the samples analyzed in the report, the binding of malicious behavior to the installation process is a common characteristic worth noting.
The npm install script lifecycle consists of hooks such as preinstall, install, and postinstall. Package authors can declare these scripts in package.json, causing arbitrary commands to execute automatically during npm install. Because installation typically happens on a developer's local machine or a CI build node, these scripts have the same file system and environment variable access as the current user, allowing them to read tokens in .npmrc, SSH keys, or cloud credentials and exfiltrate the data. Since v7, npm has warned about install scripts by default and offers the --ignore-scripts option, but disabling scripts can break the build process of some legitimate packages, so practical implementation requires balancing security and usability.
Practical Implications for Development Teams
The significance of this report is that it reminds teams to re-examine their dependency management processes. Faced with a considerable number of malicious packages, manual review alone is unrealistic; dependency source verification, version pinning, and install script review need to become part of routine engineering practice. As the first part of a series, the report is expected to be followed by targeted detection and mitigation recommendations.
For teams that depend on the npm ecosystem, the number 5,400 is a clear signal: supply chain security is no longer just an issue for large enterprises — any project that pulls in third-party packages is exposed.

One-line Summary
A report identifies approximately 5,400 malicious npm packages, revealing systemic open-source supply chain risks in publishing, dependencies, and installation.
Paragraph Summary
A supply chain threat analysis of the npm ecosystem has identified approximately 5,400 malicious npm packages and uses them as a core sample to dissect attackers' intrusion paths. The report notes that attackers mainly exploit npm's low publishing barrier by registering new accounts, impersonating popular package names, or using dependency confusion to lure installations; the large number of transitive dependencies in modern projects makes it hard for developers to review every path of introduction; and the install script mechanism lets malicious code execute during installation to steal credentials or plant backdoors. The report groups the risks into three exposure surfaces: publishing barriers and identity trust, blind spots in dependency resolution, and execution on install, urging development teams to incorporate dependency source verification, version pinning, and install script review into routine engineering practice. As the opening installment of a supply chain threat landscape series, it is expected to be followed by detection and mitigation recommendations.
Related articles

Foldable AI Smart Home Gym S1 Pro: 220 lbs Resistance + Real-Time Form Correction
The Ike All-in-One Smart Home Gym S1 Pro is a foldable AI fitness system with 220+ lbs resistance, 9 height levels, AI body scans, personalized plans, and real-time form correction—no subscription required, folds flat against the wall.

OpenAI Model Cracks a Historical Cold Case: The Warning Behind an Anonymous Sketchbook
OpenAI's latest model identifies the author of an 1808 anonymous sketchbook, showcasing cross-modal historical reasoning. This breakthrough raises concerns about the credibility and interpretability of AI in knowledge discovery.

NVIDIA Reportedly Weighs Sweeping Board Overhaul: Fallout from the Jensen Huang Crisis
NVIDIA is reportedly considering a sweeping board overhaul following the controversy involving CEO Jensen Huang and Alice Huang. This article reviews the background, the governance changes the overhaul may involve, and the potential impact on NVIDIA.