Visit the Wiz Whimzical Shop at AWS re:Invent
Vulnerability DatabaseCVE-2026-140103

CVE-2026-140103: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-140103 is an HTTP Request Smuggling vulnerability in http-proxy-middleware, a widely used Node.js reverse proxy middleware package. The flaw exists in the fixRequestBody handler, which incorrectly uses req.readableLength === 0 as proof that a body parser has consumed the request body — a condition that is indistinguishable from a body that has not yet arrived. Affected versions are >= 2.0.9, < 2.0.11, >= 3.0.5, < 3.0.8, and >= 4.0.0-beta.0, < 4.2.1. The vulnerability was disclosed on November 16, 2026, and carries a CVSS v3.1 base score of 5.4 (Medium) (GitHub Advisory, Feedly).

Technical details

The root cause is classified under CWE-444 (Inconsistent Interpretation of HTTP Requests / HTTP Request Smuggling) and CWE-807 (Reliance on Untrusted Inputs in a Security Decision). In src/handlers/fix-request-body.ts, the guard if (req.readableLength !== 0) { return; } was intended to detect body-parser failures, but readableLength is also zero before any body bytes have arrived over the network. When body-parser 1.x declines a declared media type (e.g., application/x-www-form-urlencoded when only express.json() is mounted), it assigns a truthy req.body = {} without consuming the stream. fixRequestBody then serializes this empty object, sets Content-Length: 0, and writes it to the upstream request; the underlying httpxy library subsequently pipes the still-live, unread request stream into the same upstream connection. The backend receives a synthesized zero-length body followed by the attacker's withheld bytes — parsed as a second, independent HTTP/1.1 request on the persistent connection — bypassing the gateway's route filter, /admin denial rules, and trusted-header normalization (GitHub Advisory, Fix PR #1309).

Impact

A remote unauthenticated attacker can cause the backend to execute an arbitrary HTTP/1.1 request that the gateway never parsed or authorized, including requests targeting routes outside pathFilter and carrying forged identity headers that the backend trusts the gateway to set. In the demonstrated proof-of-concept, a public /api/thing request smuggles a GET /admin/secret request with an attacker-chosen X-Authenticated-User: admin header, completely bypassing explicit gateway denials. With the default LIFO connection pool in 4.x, a subsequent attacker-controlled request can also receive the smuggled response, enabling confidential data exfiltration from privileged backend endpoints. Legitimate users sharing the upstream connection pool may also inadvertently receive smuggled responses intended for other requests (GitHub Advisory).

Exploitability

A detailed, self-contained proof-of-concept (PoC) script was included in the GitHub Security Advisory, demonstrating 100% success across 10 repeated runs on Node v24.21.0 with http-proxy-middleware 4.2.0. The PoC requires no attacker credentials and exploits the timing of body delivery relative to header arrival. As of the disclosure date, there is no evidence of in-the-wild exploitation, no known threat actor attribution, and the EPSS score is 0.0. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires specific preconditions: body-parser 1.x before the proxy, fixRequestBody registered as on.proxyReq, a persistent upstream connection, and no upstream component that fully buffers and reframes requests (e.g., nginx with default buffering was not vulnerable in testing) (GitHub Advisory, Feedly).

Exploitation steps

  1. Identify a vulnerable target: Find a Node.js application using http-proxy-middleware versions 2.0.9–2.0.10, 3.0.5–3.0.7, or 4.0.0-beta.0–4.2.0 with fixRequestBody registered as on.proxyReq and body-parser 1.x (e.g., express.json()) mounted before the proxy.
  2. Craft the smuggled payload: Construct a complete second HTTP/1.1 request as the body of the outer request. For example, embed GET /admin/secret HTTP/1.1\r\nHost: backend\r\nX-Authenticated-User: admin\r\nContent-Length: 0\r\n\r\n as the body of a POST /api/thing request with Content-Type: application/x-www-form-urlencoded.
  3. Split header and body delivery: Open a raw TCP connection to the gateway. Send only the HTTP headers of the outer request first (including Content-Length matching the smuggled payload size and Connection: keep-alive), then pause for at least one event-loop tick (e.g., 20 ms) before sending the body containing the smuggled request.
  4. Trigger the race condition: The delayed body causes fixRequestBody to run while req.readableLength === 0 and req.readableEnded === false. It serializes the empty req.body = {} as a zero-length URL-encoded string, sets Content-Length: 0, and writes it upstream. The real body bytes are then piped into the same upstream connection.
  5. Receive the smuggled response: Send a follow-up request (e.g., GET /api/follow) on a new connection shortly after the body is sent. With the default LIFO connection pool, this follow-up receives the backend's response to the smuggled /admin/secret request, exposing privileged data (GitHub Advisory).

Indicators of compromise

  • Network: Inbound HTTP POST requests to proxied API paths (e.g., /api/*) with Content-Type: application/x-www-form-urlencoded and a Content-Length value significantly larger than expected for a form body; TCP connections where the body is delivered with a measurable delay after headers (split-delivery pattern); Connection: keep-alive headers on requests to the gateway from untrusted clients.
  • Logs: Backend access logs showing two requests on the same socket/connection ID where the second request targets a privileged path (e.g., /admin/*) that was never sent by a legitimate client; backend logs recording requests with forged identity headers (e.g., X-Authenticated-User: admin) originating from the proxy's IP address.
  • Process/Application: Unexpected backend responses (e.g., 200 OK with sensitive content) delivered to clients that did not make the corresponding request; mismatched request/response pairs in application-level audit logs.
  • File System: No specific file artifacts are expected for this network-layer attack (GitHub Advisory).

Mitigation and workarounds

Upgrade http-proxy-middleware to the patched versions: 2.0.11, 3.0.8, or 4.2.1. The fix replaces the flawed req.readableLength !== 0 guard with !req.readableEnded, ensuring body reconstruction only occurs after the request stream has fully ended (Fix PR #1309, Fix PR #1310, Fix PR #1311). If immediate upgrade is not possible, consider the following mitigations: (1) place a front-end proxy such as nginx (with default request buffering enabled) ahead of the gateway, as it was observed to prevent the vulnerable timing in testing; (2) switch to body-parser 2.x (or Express 5 with its default body-parser), which does not assign a truthy req.body for declined media types; (3) avoid mounting fixRequestBody when body parsing is not strictly required; (4) use agent: false or a non-persistent upstream connection to prevent response smuggling, though this does not prevent the unauthorized backend request (GitHub Advisory).

Community reactions

The vulnerability was reported by researchers kagebunsher and kustundag and disclosed responsibly through GitHub's private security advisory process. The maintainer (chimurai) merged fixes across all three affected release branches (2.x, 3.x, and master/4.x) on October 24, 2026, and published patched releases promptly. The advisory includes an unusually thorough PoC with quantitative reproducibility data (10/10 success rate) and a detailed compatibility matrix across Node.js versions, body-parser versions, and upstream proxy configurations, which was noted for its technical rigor. No significant broader media coverage or social media discussion was identified at the time of disclosure (GitHub Advisory).

Additional resources


Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-140097CRITICAL9.1
  • JavaScript logoJavaScript
  • vite
NoYesNov 30, 2026
CVE-2026-140010HIGH8.7
  • JavaScript logoJavaScript
  • html-minifier
NoYesNov 30, 2026
CVE-2026-140008HIGH8.7
  • JavaScript logoJavaScript
  • minimatch
NoYesNov 30, 2026
CVE-2026-140102HIGH7.5
  • JavaScript logoJavaScript
  • http-proxy-middleware
NoNoNov 30, 2026
CVE-2026-140103MEDIUM5.4
  • JavaScript logoJavaScript
  • http-proxy-middleware
NoYesNov 30, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management