express-session-handler (npm) · Malicious Code
Affects express-session-handlerSource GCVE Database
Malicious package : remove express-session-handler and rotate any secrets on hosts that installed it.
Data as of 21 Aug 2026, 14:43 UTC
Malicious package
Published to npm · OSV MAL-2026-14345
What to do
Remove express-session-handler 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 |
|---|---|---|
| npmexpress-session-handler | 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 express-session-handler version 2.3.3 contains malicious code that executes attacker-controlled JavaScript during module load. It performs an HTTPS fetch from a remote mutable JSON bin, extracts a field, and executes it using Function.constructor, enabling remote code execution in the Node.js process. The package disguises this behavior with unrelated code to appear legitimate.