CanisterSprawl: self-spreading npm worm hits pgserve and Namastex

CriticalCompromisenpm

Socket and StepSecurity disclosed CanisterSprawl, a self-propagating npm worm that compromised at least 16 versions across Namastex Labs and related publishers from 21 April 2026. The postinstall hook harvests 38 env vars and filesystem secrets, encrypts via AES-256-CBC + RSA-4096, and exfiltrates to an Internet Computer Protocol canister. Stolen npm tokens are reused to publish further malicious versions. Tradecraft matches the earlier TeamPCP CanisterWorm campaign.

Published 21 Apr 2026

At a glancenpm-2026-04-21-canisterworm-pgserve-namastex
6
Packages tracked16 malicious versions

Every version named by the advisory is in the scanner, so a lockfile check finds it directly.

Severity
Critical
Type
Compromise
Published
21 Apr 2026
Ecosystems
npm
Detected by
StepSecurity, Socket
Also known as
CanisterSprawl, CanisterWorm variant

Compromise. A legitimate, already-used package, maintainer account, CI pipeline, or release tag was hijacked and a malicious version was published under a name people already depend on.

What happened

The full picture

StepSecurity and Socket disclosed CanisterSprawl on April 21, 2026 - a self-propagating npm worm focused on Namastex Labs and adjacent publishers. At least 16 malicious versions were published across pgserve, @automagik/genie, @fairwords/websocket, @fairwords/loopback-connector-es, and the @openwebconcept design-token packages.

The postinstall hook harvests 38 environment-variable names plus filesystem secrets (SSH private keys, .npmrc, .aws/credentials, Chrome saved passwords). The data is encrypted with AES-256-CBC under a randomly-generated key, the key is sealed with the attacker's RSA-4096 public key, and the bundle is uploaded to an Internet Computer Protocol (ICP) canister rather than a normal HTTP endpoint. ICP canisters are immune to conventional domain-takedown, which is the operational point of using one as a drop.

Stolen npm tokens are immediately reused to publish new malicious versions of any other package the maintainer can publish to, which is how the worm hopped from Namastex into the Fairwords and OpenWebConcept namespaces. The tradecraft - env-var list, encryption layout, ICP canister exfil - matches the earlier TeamPCP CanisterWorm campaign closely enough that StepSecurity considers it the same operator infrastructure even though TeamPCP did not publicly claim this one.

If you resolved any affected version, rotate every npm token, cloud key, and SSH credential present on the machine, then block egress to *.raw.icp0.io and telemetry.api-monitor.com.

wormcredential-theftmaintainer-takeoverinfostealerobfuscation
Affected packages

6 packages 16 versions

These are usually pulled in as transitive dependencies rather than installed directly. Check your whole tree at once. It runs in your browser and nothing is uploaded.

Impact

What it does if you installed it

  • Steals npm tokens, AWS/GCP/Azure credentials, SSH keys, Chrome passwords
  • Self-replicates to additional packages via stolen publish tokens
  • Exfiltration to ICP canister immune to domain takedown
  • Python .pth-based PyPI lateral path if PyPI creds are found
What to do

Clean-up steps

  1. Remove the listed versions and downgrade to the last legitimate release
  2. Rotate every npm token, cloud key, and SSH credential present on affected machines
  3. Block egress to *.raw.icp0.io and telemetry.api-monitor.com
References

Sources

npm-2026-04-21-canisterworm-pgserve-namastexBack to incidentsSubmit a correction
Am I affected?

Check your lockfile against this and every other incident.

Paste a lockfile and it is matched on your own device against every compromised version we track. Nothing is uploaded and there is no account.