express-middle (npm) · Malicious Code
Affects express-middleSource GCVE Database
Malicious package : remove express-middle and rotate any secrets on hosts that installed it.
Data as of 5 Aug 2026, 17:21 UTC
Malicious package
Published to npm · OSV MAL-2026-12376
What to do
Remove express-middle 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-middle | 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-middle' version 5.5.1 contains malicious code that executes remote code on the installer's machine during installation. The package declares a postinstall script that runs an obfuscated JavaScript file which contacts a hidden command-and-control server, decrypts a payload, writes it to disk, and executes it silently. The package does not provide any legitimate middleware functionality and is designed solely to enable remote code execution.