HTTP Request Smuggling via Silent Header Truncation in Node.js HTTP Parser
Node.js can silently drop headers beyond its configured header-count limit from the header objects exposed to application code, while still using those headers internally to frame the HTTP message. A Node.js-based forwarding proxy that rebuilds outbound headers from the visible headers but pipes the original body could therefore desynchronise requests on a reused backend connection.
Originally disclosed on HackerOne
- Triaged in 37 days
- Fixed in 5 months
- Disclosed after 6 months
Summary by the program
A flaw in Node.js HTTP client can cause a request desynchronization for Node.js-based forwarding proxies that rebuild outbound headers from the visible IncomingMessage headers while piping the original body to a reused backend connection.
Node.js can omit headers beyond maxHeadersCount / maxHeaderPairs from req.headers, req.rawHeaders, and req.headersDistinct, while still using those omitted headers internally for HTTP message framing. In particular, Content-Length can be hidden from userland while the request body is still delivered.
This vulnerability affects all supported release lines: Node.js 22, Node.js 24, and Node.js 26.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the parser enforces a header-count limit only when populating the userland header collections, while continuing to parse and act on the omitted headers for message framing.
Impact
A Node.js-based forwarding proxy that rebuilds headers from the visible set while piping the original body could cause request desynchronisation on a reused backend connection, though the text does not demonstrate a working exploit.
What the attacker needed
Node.js-based forwarding proxy; Proxy rebuilds headers from visible set; Backend connection is reused
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a web server receives a request, it reads the headers at the top (things like Content-Length, which says how big the body is). Node.js has a limit on how many headers it will show to the application, but it still uses the hidden ones to work out where the body ends. If a proxy program rebuilds the request from only the headers it can see, it can disagree with the backend about where one request stops and the next begins, which is called request smuggling.
What is Smuggling / CRLF?
A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.