Skip to content
Smuggling / CRLF Disclosed report Advanced CVE-2021-33193

Request line injection via HTTP/2 in Apache mod_proxy

Apache mod_proxy with HTTP/2 enabled failed to reject requests containing spaces in the :method pseudo-header, so when it downgraded to HTTP/1.1 it forwarded a malformed request line to the backend. An attacker could use this to bypass front-end security rules, poison web caches, and force protocol downgrades.

James Kettle Follow

Originally disclosed on HackerOne

Bounty$1,200 Medium View original
  • Fixed in 3 hours
  • Paid in 3 hours
  • Disclosed after 3 hours

I've written this issue up fully here: https://portswigger.net/research/http2#request

In case it's useful, here's the original report as sent to Apache:

I'd like to report a vulnerability in Apache mod_proxy when used with HTTP/2 enabled.

It fails to reject HTTP requests that contain spaces in the :method HTTP/2 pseudo-header. This leads to a request-line injection vulnerability when it downgrades the requests to HTTP/1.1 and routes them on to the backend.

Attacker HTTP/2 request:

:method: GET /anything HTTP/1.1
:path: /
:authority: psres.net
Accept-Encoding: gzip, deflate

Resulting request forwarded to the backend by mod_proxy:

GET /anything HTTP/1.1 / HTTP/1.1
Host:: psres.net
Accept-Encoding: gzip, deflate  

Provided the back-end server tolerates trailing junk in request lines, this enables attackers to bypass front-end security rules, poison web caches, and > change the protocol to HTTP/0.9 or 1.0, potentially enabling further attacks. I have identified some vulnerable systems in the wild.

Please let me know if you'd like any additional information

Impact

This lets attackers bypass front-end security rules like block-rules and escape subfolders. In some cases it may enable further attacks via protocol-downgrades and cache poisoning.

The original report as published on HackerOne, by albinowax. 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

Impact

Attackers could bypass front-end security rules, escape subfolders, poison web caches, and downgrade the protocol to HTTP/0.9 or 1.0, though this depends on the backend tolerating trailing junk in the request line.

What the attacker needed

HTTP/2 enabled on the proxy; Backend tolerates trailing junk in request line

How it was found

  1. Send an HTTP/2 request whose :method pseudo-header contains a space followed by extra request-line text.
  2. The proxy downgrades the request to HTTP/1.1 and forwards it to the backend.
  3. The backend receives a malformed request line containing the injected text.

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.

When a website sits behind a proxy, the proxy translates requests between versions of the web protocol. Here the proxy accepted a request where the 'method' field (normally just GET or POST) also contained extra text with spaces, and passed that text straight into the request it sent to the server behind it. That let an attacker smuggle extra instructions past security checks that only look at the front door.

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 James Kettle

View all

18 more disclosed reports, best first.

More from Internet Bug Bounty

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.