HTTP Request Smuggling Affecting http-proxy-middleware package, versions >=2.0.9 <2.0.11>=3.0.5 <3.0.10>=4.0.0-beta.0 <4.2.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.51% (46th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-HTTPPROXYMIDDLEWARE-23188845
  • published1 Dec 2026
  • disclosed1 Dec 2026
  • creditkagebunsher, kustundag

Introduced: 1 Dec 2026

NewCVE-2026-140103  (opens in a new tab)
CWE-444  (opens in a new tab)

How to fix?

Upgrade http-proxy-middleware to version 2.0.11, 3.0.10, 4.2.1 or higher.

Overview

Affected versions of this package are vulnerable to HTTP Request Smuggling via fixRequestBody in src/handlers/fix-request-body.ts, which uses req.readableLength === 0 as proof that a body parser has consumed the request body, when that same value is observed before any body byte has arrived. A remote unauthenticated attacker can send request headers first, wait one event-loop turn, and then send a body containing a complete second HTTP/1.1 request. When a body-parser 1.x parser has declined the declared media type, it assigns a truthy req.body without consuming the stream; fixRequestBody then serializes that empty body, rewrites the upstream Content-Length to zero, and writes it before the still-live request stream is piped upstream. The backend consumes the synthesized zero-length body and parses the attacker's withheld bytes as a second request on the persistent connection, bypassing the gateway's route filter, explicit path denials, and trusted-header normalization, and on a pooled upstream connection an attacker-controlled following request can receive the smuggled response.

Note: This is only exploitable when a body-parser 1.x parser runs before the proxy and declines the request media type (leaving a truthy req.body and an unread stream), fixRequestBody is registered as on.proxyReq, the request body arrives after the headers in a later event-loop turn, and the upstream connection remains persistent (the default from 4.0.0-beta.2; on 2.x, 3.x, and 4.0.0-beta.0 a pooling agent or an explicit client Connection: keep-alive header is required).

CVSS Base Scores

version 4.0
version 3.1