cookie-phase (npm) · Malicious Code
Affects cookie-phaseSource GCVE Database
Malicious package : remove cookie-phase and rotate any secrets on hosts that installed it.
Data as of 13 Jul 2026, 09:28 UTC
Malicious package
Published to npm · OSV MAL-2026-10410
What to do
Remove cookie-phase 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 |
|---|---|---|
| npmcookie-phase | 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 'cookie-phase' version 2.3.5 is a malicious dropper impersonating the popular 'pino' logger. When imported and executed as middleware, it spawns a detached Node.js child process that contacts a remote command-and-control server via a base64-obfuscated URL. The response from this server is executed dynamically with full Node.js require access, allowing arbitrary code execution on the host. This behavior targets developer and build environments that mistakenly install this package expecting the legitimate 'pino' logger.