HTTP Request Smuggling in Hiawatha - CVE-2026-51785
Hiawatha mishandled requests containing both Transfer-Encoding and Content-Length headers, prioritising Content-Length and forwarding both headers downstream. An unauthenticated attacker could desynchronise front-end and back-end connections, enabling access-control bypass, cache poisoning, denial of service, and potential disclosure of other users' traffic.
fenrisk.com
Published on fenrisk.com
As part of our ongoing research into request smuggling, we identified an HTTP Request Smuggling vulnerability (CWE-444) in Hiawatha ≤ 12.1. Hiawatha is an open-source, security-focused web server for Unix-like systems, used to serve websites and host web applications.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Hiawatha's parser checked Content-Length before Transfer-Encoding, contrary to RFC 9112, and its reverse proxy forwarded both headers without stripping Content-Length.
Impact
An unauthenticated attacker could bypass ACL restrictions, poison the cache so a public page serves restricted content, cause denial of service, and, when Hiawatha is a back-end behind a connection-pooling proxy, potentially disclose other users' traffic; the lab reproduced the front-end cases only.
What the attacker needed
Hiawatha <= 12.1; For TE.CL: non-compliant front-end proxy; For CL.TE: RFC-compliant back-end server; Attacker can send requests on same connection
The fix
Hiawatha 12.2 rejects any request carrying both Content-Length and Transfer-Encoding with a 400 at the parsing stage, before it reaches the reverse-proxy forwarding path.
How it was found
- Set up Hiawatha 12.1 as a reverse proxy in front of a Caddy back-end.
- Send a request with both Transfer-Encoding and Content-Length headers, where the chunked body contains a smuggled request prefix.
- Send a second normal request on the same connection.
- Observe that the second request is answered as if it targeted the smuggled path.
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 write-up has not been written yet. The Original tab links to the source.
When a web request has a body, the server needs to know how long it is. Two headers can say this: Content-Length gives a number, and Transfer-Encoding says the body is split into chunks. If a request has both, servers must agree on which one to trust. Hiawatha trusted the wrong one and passed both headers on, so two servers in a chain could disagree about where one request ends and the next begins. An attacker can hide a second request inside the first, and the next person's request gets glued onto it.
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.