Threat Advisory

npm Supply Chain Attack Extracts Developer Secrets via CanisterWorm Malware

Threat: Supply Chain Attack
Targeted Region: Global
Targeted Sector: Technology & IT
Criticality: High
[subscribe_to_unlock_form]


EXECUTIVE SUMMARY:

A supply chain compromise has been observed in the npm ecosystem involving multiple packages associated with Namastex Labs. It highlights a worm-like malware campaign embedded within seemingly legitimate package updates, designed not only to steal sensitive developer credentials but also to propagate across additional software packages using compromised publishing access. The affected packages include AI-focused tooling and backend utilities that are widely used in development workflows, increasing the potential downstream impact on developers and organizations relying on them.[/subscribe_to_unlock_form]


EXECUTIVE SUMMARY:

A supply chain compromise has been observed in the npm ecosystem involving multiple packages associated with Namastex Labs. It highlights a worm-like malware campaign embedded within seemingly legitimate package updates, designed not only to steal sensitive developer credentials but also to propagate across additional software packages using compromised publishing access. The affected packages include AI-focused tooling and backend utilities that are widely used in development workflows, increasing the potential downstream impact on developers and organizations relying on them.[emaillocker id="1283"]

The analysis of the compromised packages shows that malicious code is executed during the installation phase by abusing lifecycle mechanisms such as post-install scripts. Once activated, the malware is designed to collect a wide range of sensitive information from developer environments, including environment variables, API keys, cloud access credentials, SSH keys, database configuration files, and other sensitive artifacts. It also extends its reach to browser-stored credentials and cryptocurrency wallet data. The extracted information is then transmitted to external command-and-control infrastructure, including webhook-based channels and decentralized canister-style servers, which increases the difficulty of detection and disruption. Additionally, the malicious payload demonstrates worm-like capabilities by reusing stolen npm authentication tokens to publish infected versions of other packages maintained by the same developer, enabling lateral spread across the software supply chain and potentially impacting additional ecosystems such as Python package repositories.

It highlights the growing risk of self-propagating supply chain attacks that abuse trusted package registries as distribution vectors. By combining credential theft with automated republishing mechanisms, the malware can turn a single compromised developer environment into a propagation point for widespread ecosystem infection. Organizations relying on npm dependencies are strongly advised to audit installed package versions, rotate exposed credentials, and strengthen controls around package publishing and CI CD token usage to mitigate similar threats.

 

THREAT PROFILE:

Tactic Technique Id Technique Sub-technique
Initial Access T1195.002 Supply Chain Compromise Compromise Software Supply Chain
Execution T1059.007 Command and Scripting Interpreter JavaScript
Persistence T1554 Compromise Host Software Binary -
Credential Access T1555.003 Credentials from Password Stores Credentials from Web Browsers
T1552.001 Unsecured Credentials Credentials in Files
Command and Control T1102.002 Web Service Bidirectional Communication
Exfiltration T1041 Exfiltration Over C2 Channel -

 

REFERENCES:

The following reports contain further technical details:

https://www.infosecurity-magazine.com/news/npm-supply-chain-worm-canister/

https://socket.dev/blog/namastex-npm-packages-compromised-canisterworm

[/emaillocker]
crossmenu