CVE-2026-140103 — Http-proxy-middleware — CWE-444 · CWE-807
### 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-bo
### 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-bo
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-140103
CVSS 5.4/10 · MEDIUM · 30.11.2026
CWE: CWE-444, CWE-807
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Summary: ### 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.
Affected: http-proxy-middleware
⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · no user interaction (UI:N).
⚠️ Scope changes (S:C) — impact can cross security boundaries.
🌍 REAL WORLD IMPACT
All confidential data readable/stealable; limited integrity modification (I:L); pivot to other systems possible.
🛡️ REMEDIATION
→ Apply vendor security update for http-proxy-middleware.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
📋 Routine update cycle (30 days)
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]