evil-pkg (npm) · Malicious Code
Affects evil-pkgSource GCVE Database
Malicious package : remove evil-pkg and rotate any secrets on hosts that installed it.
Data as of 20 Aug 2026, 16:57 UTC
Malicious package
Published to npm · OSV MAL-2026-6374
What to do
Remove evil-pkg from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmevil-pkg | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package 'evil-pkg' versions 1.0.0 through 1.0.5 contains malicious code that hijacks the 'node' command by registering a shim script in the local bin directory. This shim executes during package installation, allowing unconsented code execution with the installer's privileges. The current payload is benign but demonstrates a supply-chain attack vector capable of exfiltrating sensitive files. Any system with this package installed should be considered compromised, and secrets should be rotated immediately.
References
- npmjs.com/package/evil-pkg/v/1.0.0 (opens in a new tab)
- npmjs.com/package/evil-pkg/v/1.0.1 (opens in a new tab)
- npmjs.com/package/evil-pkg/v/1.0.5 (opens in a new tab)
- npmjs.com/package/evil-pkg/v/1.0.4 (opens in a new tab)
- npmjs.com/package/evil-pkg/v/1.0.2 (opens in a new tab)
- npmjs.com/package/evil-pkg/v/1.0.3 (opens in a new tab)
- github.com/advisories/GHSA-p67r-jq7p-6g7v (opens in a new tab)