CVE-2026-140103
### Summary `fixRequestBody` treats `req.readableLength === 0` as proof that a body parser consumed the request body. The same value is observed before any body byte has arrived. An unauthenticated client can therefore send the request headers first, wait one event-loop turn, and then send a body containing a complete second HTTP request. When a body-parser 1.x parser declined the declared media type, it has already assigned a truthy `req.body` but has not consumed the stream. `fixRequestBody` serializes that empty body, changes the upstream `Content-Length`, and writes it. `httpxy` subsequently pipes the still-live request stream into the same upstream request. The backend consumes the synthesized body at the declared length and parses the attacker's withheld bytes as a second request on the persistent connection. That second request bypasses the gateway's route filter, explicit `/admin` denial, and trusted-header normalization. On the default 4.2.0 upstream pool, a following request can also receive the smuggled request's response. The PoC below uses no attacker credential: a public `/api/thing` request produces a backend `/admin/secret` request carrying the attacker-selected internal identity header, and an attacker-controlled follow-up receives `SECRET_ADMIN_ONLY`. ### Details The vulnerable guard is in [`src/handlers/fix-request-body.ts:30-39`](https://github.com/chimurai/http-proxy-middleware/blob/1c8255248e619ec01fd20e6eb1f660f7a1e38221/src/handlers/fix-request-body.ts#L30-L39): ```ts // skip fixRequestBody() when req.readableLength not 0 (bodyParser failure) if (req.readableLength !== 0) { return; } const requestBody = req.body; if (!requestBody) { return; } ``` `readableLength` reports bytes currently buffered in the readable queue. It is zero both after a parser drains the stream and before the client sends the body. The client controls which state applies by controlling body arrival. With body-parser 1.20.3, [`json()` assigns `req.body = req
Properties
- Severity
- medium
- Summary
- http-proxy-middleware smuggles a second request when fixRequestBody runs before body arrival
- Nvd fetched at
- 2026-12-02T06:37:54.190518+00:00
- Epss score
- 0.00513
- Cvss severity
- MEDIUM
- Cvss score
- 5.4
- Retrieved at
- 2026-12-02T06:40:14+00:00
- Ghsa published
- 2026-12-01T18:15:48Z
- Source url
- https://github.com/advisories/GHSA-vp89-2qrg-8fwc
- Ghsa updated
- 2026-12-01T18:15:49Z
- Ghsa id
- GHSA-vp89-2qrg-8fwc
- Last source
- FIRST EPSS
- Score
- 5.4
- Cvss version
- 3.1
- Cve id
- CVE-2026-140103
- Cvss vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
- First seen by Signal
- 2026-12-01T02:29:47+00:00
- Name
- CVE-2026-140103
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
Related Entities (4)
HAS_WEAKNESS (2)
AFFECTS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph