Malicious npm Packages Steal Crypto Keys and CI Secrets in SANDWORM_MODE Campaign


Cybersecurity firm Socket uncovered 19 malicious npm packages in the SANDWORM_MODE supply chain attack. These harvest crypto keys, CI secrets, API tokens, and target AI coding tools. The campaign evolves Shai-Hulud worms with GitHub propagation and MCP injection.

Packages like [email protected] and [email protected] use typosquatting. They grab system info, tokens, and npm/GitHub creds. A GitHub Action steals CI secrets via HTTPS or DNS fallback.

Malware waits 48-96 hours before stage 2 activates. It then spreads using stolen identities. A kill switch can wipe home directories if C2 fails.

Attack Capabilities

First stage captures basics like SSH keys and .env files. Second stage digs deeper into password managers and propagates.

McpInject targets Claude Code, Cursor, VS Code Continue. It runs fake MCP servers with prompt injection to exfiltrate ~/.ssh/id_rsa, AWS creds, npmrc.

Polymorphic engine uses local Ollama + DeepSeek Coder to rewrite code and evade scans. Currently disabled but ready.

Packages spread via official334 and javaorg publishers. Four sleepers (ethres, iru-caches) sit dormant.

Malware Features Table

ComponentTargetsExfiltration
Credential HarvestSSH keys, .env, npmrc, AWSHTTPS/DNS fallback
GitHub ActionCI/CD secretsStolen npm/GitHub tokens
McpInjectClaude, Cursor, VS CodeAI tool prompt injection
Propagationnpm publishes, SSH spreadStolen identities
PolymorphicVariable rename, junk codeOllama + DeepSeek

AI coding assistants face new risks. Malicious MCP tools read sensitive files during normal use.

Veracode found buildrunner-dev dropping Pulsar RAT via PNG. JFrog’s eslint-verify-plugin deploys Poseidon (Linux) and Apfell (macOS).

Checkmarx flagged solid281 VS Code extension. It mimics Solidity but drops ScreenConnect or Python shells.

Remove suspect packages now. Rotate all tokens. Check workflows and lockfiles for changes.

FAQ

What is SANDWORM_MODE?

npm supply chain worm stealing creds and targeting AI tools. 19 packages identified by Socket.

Which packages to remove?

claud-code, crypto-locale, [email protected], and 17 more. 

How does AI targeting work?

McpInject runs fake servers. Prompt injection grabs SSH/AWS keys via tools.

What triggers stage 2?

48+ hours delay with jitter. Then full propagation and exfil.

Other recent npm threats?

buildrunner-dev (Pulsar RAT), eslint-verify-plugin (Poseidon/Apfell), solid281 VS Code extension.

Readers help support VPNCentral. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help VPNCentral sustain the editorial team Read more

User forum

0 messages