Exploiting HTTP request smuggling to capture other users’ reque
The front-end server does not support chunked encoding while the back-end does, creating a CL.TE request smuggling desync. An attacker can smuggle a partial request so that the next user's request is appended to a blog comment, capturing the victim's session cookie and taking over their account.
This lab demonstrates how to exploit HTTP request smuggling in a setup with a front-end and back-end server, where the front-end does not support chunked encoding. By smuggling a crafted request to the back-end, we can cause the next user’s request to be stored by the application.
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
Likely the front-end and back-end disagree on how to interpret Content-Length versus Transfer-Encoding, so the front-end forwards a request the back-end treats as two, leaving a leftover fragment that prefixes the next user's request.
Impact
An attacker could capture another user's request, including an administrator's session cookie, and use it to access that account; the exploit depends on timing so that a victim request arrives between the attacker's two requests.
What the attacker needed
A front-end that ignores chunked encoding; a back-end that honours it; victim request arrives between the two sends
The fix
Servers and proxies should handle Content-Length and Transfer-Encoding consistently, reject ambiguous or malformed requests, and disable unsupported HTTP features.
How it was found
- Send the root request to Repeater and downgrade it to HTTP/1.1, keeping only Host, Content-Type and Content-Length.
- Add a Transfer-Encoding: chunked header with an invalid chunk size and a matching Content-Length, then send and observe a timeout.
- Create a normal request without Transfer-Encoding and an attack request with a smuggled body, send the attack request then the normal one, and see a 404 on the normal request.
- Post a comment on a blog post, copy that comment request into the attack request, and move the comment parameter to the end.
- Set the attack Content-Length to the sum of the comment body length and the root request length, and pad the normal request so its length exceeds that value.
- Resend the attack then normal request, increasing Content-Length until the victim's session cookie appears in the stored comment, then use that cookie to access the admin account.
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 website sits behind a proxy, two servers read the same request. If they disagree about where one request ends and the next begins, an attacker can hide part of a request so it gets glued onto the next visitor's request. Here the smuggled piece made the site store the next visitor's request (including their login cookie) as a blog comment, which the attacker then read.
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.