requests-middleware (npm) · Malicious Code
Affects requests-middlewareSource GCVE Database
Malicious package : remove requests-middleware and rotate any secrets on hosts that installed it.
Data as of 8 Sep 2026, 12:41 UTC
Malicious package
Published to npm · OSV MAL-2026-6096
What to do
Remove requests-middleware 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 |
|---|---|---|
| npmrequests-middleware | 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 'requests-middleware' version 1.0.2 is a malicious typosquat of the legacy 'request' HTTP library. It contains a dropper that silently spawns a detached child process which fetches and executes attacker-controlled JavaScript code from a remote paste hosting service. This remote code execution occurs whenever the package's default middleware function is invoked, granting full require access to the attacker-controlled code within the consumer process.