HTTP Desync Attack (Request Smuggling) Mass Session Hijacking
The front-end server used the Content-Length header while the back-end server used Transfer-Encoding to determine request length, so a crafted ambiguous request left part of the body in the connection buffer. The next legitimate user's request was then appended to the attacker's smuggled request and stored in the attacker's cart, exposing that user's session cookie and other data.
bugcrowd.com
Published on bugcrowd.com
I've found an HTTP Desync (Request Smuggling) vulnerability affecting the Foxycart asset -bugcrowd.foxycart.com. It was observed that the front end server is using Content-Length while the back end server is making use of Transfer-Encoding header to determine the length of HTTP request.
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 servers disagreed on how to parse the request length because one honoured Content-Length and the other honoured Transfer-Encoding, allowing a smuggled request to poison the connection.
Impact
Any user visiting the instance could have their session hijacked without interaction, and the attacker could capture many buyers' sessions across carts, though the text notes Cloudfront was later fixed and now rejects such ambiguous requests.
What the attacker needed
Attacker-controlled Foxycart instance; victim sends any request to the instance; no victim interaction needed
The fix
The text says the issue was resolved and that AWS fixed Cloudfront so it now rejects requests exhibiting this ambiguity.
How it was found
- Send an ambiguous request with both Content-Length and Transfer-Encoding headers to the cart endpoint, repeatedly, against your own instance.
- From a different IP address, send ordinary POST requests to the same instance and observe the injected response instead of the expected one.
- Craft a single smuggled request whose body ends with a trailing form parameter, so the next user's request is appended to it.
- Wait briefly, then open your own cart page and read the captured request, including the victim's session cookie.
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 browser sends a request to a website, it states how long the request body is so the server knows where it ends. Here two servers in the chain disagreed about that length, so one of them left extra data waiting on the connection. The next visitor's request got glued onto that leftover data and saved into the attacker's shopping cart, which revealed the visitor's login cookie.
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.