Skip to content
Smuggling / CRLF Write-up Advanced

Desync or Die Trying: Smuggling My Way into Internal APIs

The frontend proxy and backend server disagreed on how to parse HTTP request boundaries, allowing a crafted request to smuggle a second request to an internal admin endpoint. The attacker could then read internal-only data such as configuration keys and API tokens.

medium.com

Published on medium.com

Free Link 🎈

Iski, on medium.com

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 frontend proxy and backend server interpreted conflicting Content-Length and Transfer-Encoding headers differently, creating a request smuggling desync.

Impact

The attacker could reach internal-only endpoints and read sensitive configuration data, including API tokens and an AWS secret access key.

What the attacker needed

Network access to the API host; a proxy/backend parsing mismatch

How it was found

  1. Run recon and notice odd behaviour such as missing headers, response lag, and unexplained 404s on the API host.
  2. Use a smuggling detection tool against the API host and confirm a desync on a POST endpoint.
  3. Send a crafted request with conflicting length and encoding headers, followed by a second dummy request.
  4. Observe the smuggled request to the internal admin endpoint return a 200 with internal data.
  5. Try different header combinations and find one that reaches an internal status endpoint.
  6. Send a proof-of-concept request to an internal secret-config endpoint and read the leaked configuration.

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 website sits behind a proxy, both the proxy and the server must agree on where one HTTP request ends and the next begins. Here they disagreed, so an attacker could hide a second request inside the first one and make the server process it as if it came from inside the network.

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.