A new and active npm supply‑chain attack has been observed abusing compromised maintainer credentials to self‑propagate malicious code across packages in the Node.js ecosystem. The malware steals authentication material (npm tokens, cloud credentials, CI/CD secrets, SSH keys, and wallet data) and uses any discovered publishing tokens to inject itself into additional packages owned by the same maintainer, creating worm‑like lateral spread.
The campaign was identified by Socket and StepSecurity and affects multiple packages published by Namastex Labs, with at least 16 confirmed compromised packages at the time of reporting. Due to its credential‑driven propagation model, the blast radius may expand quickly in environments where developers or CI systems retain publish permissions.
Malicious code was injected into legitimate npm packages and executes automatically when the package is installed. Once running, the payload performs extensive secret discovery on the host system, scanning for:
If the malware locates valid npm publishing credentials (e.g., via environment variables or ~/.npmrc), it:
Researchers explicitly describe the malware as a “supply‑chain worm” capable of autonomously spreading without further attacker intervention once credentials are obtained.
If PyPI credentials are discovered on the same system, the malware attempts to compromise Python packages using a .pth‑based persistence mechanism. This expands the attack beyond JavaScript, making it a multi‑ecosystem supply‑chain threat.
At the time of publication, the following packages and versions were confirmed malicious and should be considered fully compromised:
These packages are commonly used in AI agent tooling and backend data services, increasing the value of compromised environments.
Organisations should investigate for:
The rapid re‑publishing cadence (multiple malicious versions released within hours) is a notable behavioural indicator in this campaign.
If you are worried about any of the threats outlined in this bulletin or need help in determining what steps you should take to protect yourself from the most material threats facing your organisation, please contact your account manager, or alternatively get in touch to find out how you can protect your organisation.