PA

// Tool Review

The Worm Compromised Two Million Downloads a Week. I Built This the Day After.

The Shai-Hulud worm hit 187 npm packages and two million weekly downloads. This actor checks your dependencies against the OSV database and flags suspicious maintainer changes.

19 August 2026·4 min read·By Joseph Oranagwa

On 12 September 2025, a security researcher published a disclosure that went through the developer community like a cold current. A sophisticated malware campaign — later named Shai-Hulud by the researchers tracking it — had embedded malicious payloads in 187 npm packages that collectively recorded over two million weekly downloads. The attack vector was supply chain compromise: packages that had been legitimate for years had been updated with malicious code by attackers who had gained access to the original maintainers' credentials or taken over ownership of abandoned packages.

The affected packages were not obscure. Several were in the transitive dependency trees of major frameworks and toolkits. Developers whose package.json files listed none of the compromised packages directly were still exposed if their dependencies depended on them.

The response across the developer community was a combination of genuine alarm and practical helplessness. How do you know if your application is exposed? You audit your lockfile against a known-bad list. How do you get the known-bad list? You follow security researchers on Twitter and hope they post it. How do you monitor your dependencies continuously going forward? You pay for Snyk or Socket or similar and hope their coverage is current.

Snyk's entry pricing starts at $25 per developer per month. Socket's free tier is limited in depth. Neither is particularly well-suited to indie developers, solo founders, or small teams who want dependency monitoring without a per-seat subscription or an enterprise security stack.

I built the NPM and PyPI CVE Monitor in response to Shai-Hulud, and the core insight was that all the data required to audit and monitor a dependency tree is freely and publicly available from multiple authoritative sources.

The Open Source Vulnerabilities (OSV) database is a free, public API maintained by Google that aggregates vulnerability data from GitHub Advisory Database, NVD, RustSec, PyPA, and a dozen other sources. It accepts a package name and version and returns all known advisories, with CVE IDs, severity scores (using the CVSS framework), fix versions, and reference URLs. No authentication. No rate limits that affect normal monitoring use. Explicitly designed for programmatic consumption.

The npm registry exposes full package metadata — maintainer history, publish dates, weekly download counts, version history with timestamps — at registry.npmjs.org/{package}. This metadata is where the suspicious pattern detection lives, separate from the vulnerability database.

The suspicious pattern logic addresses the attack vector that made Shai-Hulud effective: legitimate packages compromised by new maintainers. The actor flags packages that have published more than five versions in seven days (unusual velocity), packages where the most recent version was published by a different npm account than the previous major version (ownership change), and packages that are fewer than thirty days old but have accumulated unusually high weekly download counts (a combination that sometimes indicates typosquatting or dependency confusion attacks).

These patterns do not identify vulnerabilities in the CVE sense. They identify behavioural anomalies that warrant a second look before a package is trusted with production dependencies.

The workflow is straightforward. You give the actor your package.json content or requirements.txt content, or a manual list of package names and versions. It extracts all dependencies, checks each against the OSV database, runs the suspicious pattern analysis for npm packages, and returns a prioritised report: critical vulnerabilities first, high next, then suspicious patterns, then clean packages.

For a developer who wants to audit their project before a deployment, this replaces a manual process that involves running npm audit (which only covers the npm advisory database, not OSV's broader coverage), checking CVE feeds manually, and hoping no packages changed maintainers recently without being flagged.

For an agency auditing client codebases as part of a security assessment, the actor provides a scriptable, documentable audit trail at £0.001 per package checked and £0.04 per vulnerability advisory returned.

For AI developers specifically — a category of user who is increasingly building applications that auto-install npm packages based on agent recommendations — continuous dependency monitoring is not optional. A model that installs a package without verifying its provenance is a vector for exactly the kind of supply chain attack that Shai-Hulud demonstrated was possible at scale.

The incident lasted six days before most of the compromised packages were removed from the registry. For developers with no monitoring in place, six days was long enough to ship production code that included the malicious payloads.

Two million weekly downloads. A six-day window. A freely available vulnerability database.

The monitoring infrastructure was always available. The actor is just the pipeline that makes it automatic.

Get Your Free Automation Audit

I'll identify the 3 biggest automation opportunities in your business — on a free 30-minute call. No pitch, no obligation.

Book Free Audit
PA

Written by

Prime Automate Systems

AI automation consultancy based in Bishop's Stortford, Hertfordshire. We help UK service businesses eliminate repetitive work using AI tools — no developers required. Serving Hertfordshire, Essex, Cambridge and London.

About us →