Skip to content
Smuggling / CRLF Disclosed report Intermediate

Sites vulnerable to HTTP Desync attacks

The report claims that several Mozilla websites are vulnerable to HTTP request smuggling because they accept both Content-Length and Transfer-Encoding headers. An attacker could desynchronise the front-end and back-end servers, potentially causing unexpected redirects or other request handling issues.

Erlend Oftedal Follow

Originally disclosed on Mozilla

  • Fixed in 49 days
  • Paid in 49 days
  • Disclosed after 49 days
Text
Created attachment 9111392
scanner for start.mozilla.org

The following sites appear to be vulnerable to HTTP Desync Attacks:
* start.mozilla.org
* tlscanary.mozilla.org
* krakenbenchmark.mozilla.org

It is possible to push the proxy out of sync, by sending content-length and transfer-encoding: chunked at the same time. This cannot be reproduced directly with the scanning functionality of "HTTP Request smuggler" in Burp suite, but there are two ways to show this.
A) If using Burp suite, put the following payload in repeater with "HTTP Request Smuggler" and "Turbo intruder" installed, and then go directly to attack (Context-menu -> Smuggle attack):
"POST /en-us/js/ffx36.js HTTP/1.1
Host: start.mozilla.org
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
Accept: */*
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: _ga=GA1.2.209668950.1574712472; _gid=GA1.2.802424326.1574712472; _gat_UA-36116321-1=1
Content-Length: 24
Transfer-encoding: chunked

0

GET / HTTP/1.1
X:" 
You will see some requests returning a 301 rather than the expected 404.

2) it can also be reproduced using node.js. I have attached a small script that will send requests that will normally fail with a 404 due to wrong HTTP verb for the JavaScript case or the wrong path in the benign case. However you will in the response, still see some requests returning 301 (try tweaking the number of requests in the for loop if it doesn't work): 
HTTP/1.1 301 Moved Permanently
...
Redirecting to /en-US/

The two other sites can be abused in the same fashion.

The original report as published on Mozilla's Bugzilla, by Erlend Oftedal. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

Impact

An attacker could desynchronise the proxy and back-end, potentially leading to request smuggling effects such as cache poisoning or bypassing security controls, though the report only demonstrates unexpected 301 redirects.

What the attacker needed

Ability to send crafted HTTP requests

How it was found

  1. Send a request with both Content-Length and Transfer-Encoding: chunked headers to start.mozilla.org.
  2. Observe that some responses return a 301 redirect instead of the expected 404.
  3. Alternatively, use a Node.js script to send multiple such requests and observe 301 responses.

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 request is sent, the server needs to know how long it is. Two headers can say this: Content-Length and Transfer-Encoding. If a server accepts both, different parts of the system may disagree on where one request ends and the next begins. This can let an attacker sneak in a second request that the server did not expect.

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.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Request smuggling and header injection

The lesson behind this report.

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.