Skip to content
Smuggling / CRLF Write-up Advanced

HTTP Desync Attacks: Request Smuggling Reborn

The paper describes HTTP request smuggling, where a front-end and back-end disagree on where a request ends, letting an attacker prepend content to other users' requests. The author used this to reach internal APIs, poison caches, upgrade reflected XSS to mass exploitation, and harvest over $70k in bounties.

portswigger.net

Published on portswigger.net

HTTP requests are traditionally viewed as isolated, standalone entities. In this paper, I'll explore forgotten techniques for remote, unauthenticated attackers to smash through this isolation and splice their requests into others, through which I was able to play puppeteer with the web infrastructure of numerous…

The author, on portswigger.net

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 parse request boundaries differently, for example one honours Transfer-Encoding while the other falls back to Content-Length, so a single message is split into two.

Impact

An attacker could reach internal APIs with admin rights, poison web caches, and serve harmful responses such as XSS to other visitors, though success depends on traffic and routing and some attempts fail.

What the attacker needed

Front-end and back-end parse differently; ability to send raw HTTP requests; traffic on the target to hit poisoned socket

The fix

Servers in a chain should parse request boundaries consistently and reject ambiguous messages that carry both Transfer-Encoding and Content-Length.

How it was found

  1. Send an ambiguous request that makes the back-end wait for more data and observe a time delay to detect a desync.
  2. Send a request designed to poison the back-end socket, followed by a victim request, and check whether the victim response changes.
  3. Use a page that reflects a POST parameter to leak the internal headers the front-end adds.
  4. Reuse the leaked headers to reach internal systems and APIs.
  5. Tweak the victim request until it resembles a normal GET to see which requests can be poisoned.
  6. Prefix a storage request so the victim's request is saved and shown back to the attacker.

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.

Websites often sit behind a front-end server that passes requests to a back-end server over one shared connection. If the two disagree about where one request stops and the next begins, an attacker can slip extra text in, which then gets glued onto another visitor's request. That lets the attacker change what other people see or reach systems that should be internal only.

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.

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.