Skip to content
Smuggling / CRLF Disclosed report Advanced

Pause-based desync in Apache HTTPD

Apache HTTP Server 2.4.52 and earlier failed to close inbound connections when errors occurred while discarding the request body, allowing a pause-based desync. This enabled server-side HTTP request smuggling when Apache was used as a back-end server, and allowed man-in-the-middle attackers to inject arbitrary JavaScript despite TLS.

James Kettle Follow

Originally disclosed on HackerOne

Bounty$4,000 High View original
  • Triaged in under an hour
  • Fixed in 12 days
  • Paid in 12 days
  • Disclosed after 13 days

Summary by the program

important: HTTP request smuggling vulnerability in Apache HTTP Server 2.4.52 and earlier (CVE-2022-22720)

Apache HTTP Server 2.4.52 and earlier fails to close inbound connection when errors are encountered discarding the request body, exposing the server to HTTP Request Smuggling

Acknowledgements: James Kettle <james.kettle portswigger.net>

Reported to security team: 2021-12-17 fixed by r1898692 in 2.4.x: 2022-03-07 Update 2.4.53 released: 2022-03-14 Affects: <=2.4.52

Link to Security Advisory: https://httpd.apache.org/security/vulnerabilities_24.html#CVE-2022-22720

Summary by the researcher

While researching browser-powered desync attacks, I discovered that Apache was vulnerable to a pause-based desync.

This vulnerability is detailed in full in the whitepaper: https://portswigger.net/research/browser-powered-desync-attacks#pause

We've also published a vulnerable lab based on the finding: https://portswigger.net/web-security/request-smuggling/browser/pause-based-desync

The bounty will be donated to charity.

The report

Apache was vulnerable to a pause-based desync. This vulnerability is described in detail in my whitepaper here: https://portswigger.net/research/browser-powered-desync-attacks#pause

Impact

This enables server-side HTTP Request Smuggling when Apache is deployed as a back-end server, and it also enables MITM attackers to inject arbitrary JavaScript in spite of TLS.

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

Root cause

Likely, Apache failed to close the inbound connection when an error occurred while discarding the request body, leading to a pause-based desync.

Impact

This enables server-side HTTP Request Smuggling when Apache is deployed as a back-end server, and it also enables MITM attackers to inject arbitrary JavaScript in spite of TLS.

What the attacker needed

Apache as back-end server; or MITM position

The fix

Fixed by r1898692 in the 2.4.x branch, with 2.4.53 released afterwards.

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 web server receives a request with a body, it sometimes needs to discard that body if there is an error. Apache did not properly close the connection in that situation, leaving the connection in an inconsistent state. An attacker could exploit this to sneak extra requests through, which is called request smuggling, and in some setups even inject malicious JavaScript.

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.