Miasma Worm: Your npm Lockfile Is Compromised Until Proven Otherwise
What Happened
A self-replicating supply chain worm called Miasma has autonomously infected 73 Microsoft GitHub repositories across four organizations, and a variant (IronWorm) poisoned 50+ npm packages. This is not a targeted, manual package-poisoning attack. It is an autonomous worm that propagates across repositories, infecting their dependents automatically.
The campaign is described as 'ongoing' and not contained. If you have any npm dependencies pulled in the last week, you need to audit immediately.
Why Your Existing Defenses Are Blind
The payload is a Rust-based information stealer — a compiled native binary distributed through npm packages. This means:
npm auditwill not flag it (checks known CVEs, not binary payloads)- JavaScript static analysis tools cannot inspect compiled Rust binaries
- Standard lockfile review won't catch postinstall scripts that download binaries at build time
Your exposure is transitive. The question isn't just "did I install a bad package" — it's "did any dependency in my tree pull from a compromised Microsoft repo in the last N days." If CI/CD auto-merges Dependabot PRs or uses floating version ranges for Microsoft packages, stop and audit now.
Detection Signatures
- Unexpected
postinstallscripts that download binaries or make network calls - New native files appearing in
node_modulesafter recent updates - Unexpected network connections during
npm installor build phases - CI run logs showing HTTP calls to unfamiliar endpoints
Architectural Response
This attack class — worms using package registries as propagation vectors — cannot be addressed by better lockfile hygiene alone. The defensive architecture needs:
- Runtime behavioral monitoring in CI/CD: detect unexpected network calls and binary execution during install/build
- Pinned checksums for all dependencies from Microsoft GitHub organizations
- Network egress controls on build agents: allowlist only known registries and artifact stores
- SBOM diffing on every PR that touches package.json or lockfiles
What to do
Run `npm ls` against known-bad package lists from GitHub advisories today. Check every project with npm dependencies updated in the last 7 days.
Disable auto-merge on Dependabot PRs for Microsoft-org packages this sprint. Require manual review until containment is confirmed.
Add network egress monitoring to CI/CD runners by end of sprint. Alert on any outbound connection not in your registry allowlist.
Evaluate adding postinstall script auditing to your dependency review process this quarter.