Skip to content
Smuggling / CRLF Write-up Advanced

Exploiting HTTP Request Smuggling (TE.CL)— XSS to website takeover

The application reflected the User-Agent header without sanitisation, allowing an attacker to inject a script. By combining this with a TE.CL HTTP request smuggling vulnerability, the attacker could poison the back-end server's response queue, causing the malicious script to be served to other users and effectively taking over the website.

Kleiton Kurti Follow

Published on kleiton0x00.github.io

Even though HTTP Request Smuggling is documented back on 2005, it is still one of the least known Webapp vulnerability out there.

kleiton0x7e, on kleiton0x00.github.io

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 Transfer-Encoding header, allowing a smuggled request to poison the back-end's response queue, combined with unsanitised reflection of the User-Agent header.

Impact

An attacker could poison the back-end server's response queue, causing the malicious script to be served to other users, leading to website takeover.

What the attacker needed

HTTP request smuggling vulnerability (TE.CL); User-Agent header reflected without sanitisation; Ability to send crafted requests

How it was found

  1. Identify that the User-Agent header is reflected in the response.
  2. Use Burp Suite's Smuggle probe to detect HTTP request smuggling.
  3. Craft a TE.CL request with an obfuscated Transfer-Encoding header and a smuggled request containing the XSS payload in the User-Agent.
  4. Send the crafted request repeatedly using Turbo-Intruder to poison the back-end server's response queue.
  5. Observe that the XSS payload is served to other users, achieving website takeover.

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.

The website took text from a part of the request called the User-Agent (which identifies the browser) and put it directly into the page without cleaning it. Normally this only affects the person making the request, but by using a technique called HTTP request smuggling, the attacker could make the server store the malicious script and show it to other visitors. This is like slipping a nasty note into a pile of papers that the server hands out to everyone.

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 by Kleiton Kurti

View all

4 more disclosed reports, best first.

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.