Skip to content
Smuggling / CRLF Write-up Advanced

Trailing Danger: exploring HTTP Trailer parsing discrepancies

Several open-source HTTP implementations mishandle trailer fields, either by merging them into the main header section or by parsing them incorrectly, which can allow an attacker to smuggle headers or entire requests past intermediaries. This can lead to access control bypass, host header spoofing, cache poisoning, or HTTP request smuggling.

sebsrt.xyz

Published on sebsrt.xyz

With the introduction of chunked transfer encoding in HTTP/1.1, agents gained the ability to send additional headers after the request body, known as trailers or trailer fields. Although rarely used in modern applications, these are defined in the standard and handled inconsistently across HTTP implementations.

Sebastiano Sartor, on sebsrt.xyz

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 root cause is that some HTTP implementations merge trailer fields into the main header section without proper validation, or parse trailers incorrectly, violating RFC 9112's requirement not to merge unless explicitly permitted.

Impact

Attackers could bypass access controls, spoof the Host header to poison password reset links, poison caches, or smuggle requests to the backend, though some exploits require specific conditions like a flawed connection header parser or short timeouts.

What the attacker needed

Attacker can send HTTP requests; vulnerable HTTP implementation in chain

How it was found

  1. The attacker sends an HTTP request with a trailer section containing malicious header fields.
  2. The proxy parses and validates headers, then forwards the request including trailers.
  3. The backend receives and parses the request, then merges trailers into the headers.
  4. Smuggled headers are used in application logic, modifying or injecting values like Host or X-Forwarded-For.

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.

HTTP trailers are extra headers sent after the body of a request, like a note attached at the end. Some servers incorrectly treat these notes as if they were part of the main headers, so an attacker can hide important instructions (like 'I am localhost') in the trailer and trick the server into trusting them. This can let attackers bypass security checks or sneak in extra requests.

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.