Malicious package
Also called: supply chain malware
A malicious package is a library, plugin, extension, skill or model file published to look useful while carrying code that steals data, opens a backdoor or attacks its user. AI tooling has made registries like npm, PyPI, Hugging Face and skill and MCP marketplaces frequent targets.
How it works
Malicious packages run code at install, import or load time, or wait for a trigger. They arrive through typosquatting, compromised maintainer accounts, takeovers of abandoned names, or agents that install dependencies automatically.
How to defend
Pin and review dependencies, use registry scanners, restrict which sources agents may install from, and isolate build and agent environments from long-lived secrets.
Real cases 2 stories
HIGH
Supply chain · Socket
TensorLake npm SDK published a credential stealer in 0.5.144tensorlake 0.5.144 on npm carried a credential-stealing worm that runs from a preinstall hook, Socket reports. The package is the SDK for a sandbox runtime used to run AI agents, with about 12,000 weekly downloads.
HIGH
Supply chain · Socket
MemTensor MemOS packages compromised with a credential stealerMalicious releases of MemTensor's MemOS packages on npm and PyPI shipped sckit, a Go credential stealer that runs on import and sends npm, PyPI, GitHub, cloud and SSH secrets to skyleen[.]fr. Safe versions: npm 0.1.20, PyPI 2.0.33.