TL;DR: CanisterWorm shows how a compromised CI/CD toolchain can turn stolen npm publishing tokens into self-propagating malware, with backdoored patch releases spreading across multiple package scopes after Trivy's compromise, according to StepSecurity. The pattern confirms that secret exposure, package trust, and persistence controls now need to be governed as one supply-chain problem.
Editorial analysis by NHI Mgmt Group, based on content published by StepSecurity: “CanisterWorm: How a Self-Propagating npm Worm Is Spreading Backdoors Across the Ecosystem”.
Key questions
Q: What breaks when npm publishing tokens are stolen from CI/CD environments?
A: When npm publishing tokens are stolen, attackers can impersonate maintainers, publish backdoored versions, and move from one compromised workflow to many affected namespaces.
Q: Why do stolen CI tokens and publishing tokens create such a large blast radius?
A: Because they are non-human identities with operational authority, not just authentication artifacts.
A: Warning signs include obfuscated multi-stage scripts, detached child processes, repeated background execution, hidden downloads from remote endpoints, and code that searches local browser profiles or wallet extension folders.
Practitioner guidance
- Harden npm publishing tokens as privileged credentials Restrict who can mint, store, and use npm publishing tokens, and require explicit approval for any token that can publish to production namespaces.
- Block new lifecycle scripts in dependency updates Flag any dependency update that introduces a first-time postinstall, preinstall, or similar lifecycle hook, because that is an execution path that runs before human review.
- Rotate every secret present in compromised pipelines If a workflow or runner was exposed, rotate npm tokens first and then any adjacent credentials that were available in the same environment, including cloud keys, GitHub tokens, and registry credentials.
Bottom line: CanisterWorm shows that npm token theft is not a narrow package problem, because stolen publishing rights can be converted into propagation across many namespaces.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Package publishing tokens are now production-grade credentials. The article shows that npm tokens can be transformed from build-time convenience into ecosystem-wide compromise paths when they are stolen from CI/CD environments. That moves them squarely into NHI governance territory because they authorize machine-to-machine actions with wide blast radius. Practitioners should govern publishing tokens as privileged non-human identities, not as disposable development secrets.
A few things that frame the scale:
- 96% of organisations store secrets outside of secrets managers in vulnerable locations including code, config files, and CI/CD tools, according to the Ultimate Guide to NHIs.
- 59% of compromised machines in a major 2025 supply chain attack were CI/CD runners rather than personal workstations, according to the State of Secrets Sprawl 2026.
A question worth separating out:
Q: How should teams respond when a package registry compromise is suspected?
A: Contain the affected scopes, revoke publishing credentials, rotate adjacent secrets from any exposed runners or developer machines, and search for host persistence before reintroducing the package. If the compromise includes republishing behaviour, assume the incident extends beyond a single repository and coordinate across all affected namespaces.
👉 Read our full editorial: CanisterWorm shows how npm token theft becomes ecosystem spread