HexBrain

Internet Bug Bounty · Report #2585374

moderate: Apache HTTP Server: mod_rewrite proxy handler substitution (CVE-2024-39573) CWE-20 Improper Input Validation

Validstatus
mediumseverity
$2,600bounty
89upvotes
12 Aug 2024disclosed

Summary

moderate: Apache HTTP Server proxy encoding problem (CVE-2024-38473)

Encoding problem in mod_proxy in Apache HTTP Server 2.4.59 and earlier allows request URLs with incorrect encoding to be sent to backend services, potentially bypassing authentication via crafted requests. This affects configurations where mechanisms other than ProxyPass/ProxyPassMatch or RewriteRule with the 'P' flag are used to configure a request to be proxied, such as SetHandler or inadvertent proxying via CVE-2024-39573. Note that these alternate mechanisms may be used within .htaccess.

Users are recommended to upgrade to version 2.4.60, which fixes this issue.

Acknowledgements: finder: Orange Tsai (@orange_8361) from DEVCORE

Reported to security team: 2024-04-01 fixed by r1918559, r1918666, r1918600, r1918625, r1918668 in 2.4.x: 2024-07-01 Update 2.4.60 released: 2024-07-01 Affects: 2.4.0 through 2.4.59

How it was found

I reported this vulnerability through the official Apache HTTP Server security email on April 1, 2024, and received a fix along with a CVE number on July 1, 2024. You can check detailed information from there:

https://httpd.apache.org/security/vulnerabilities_24.html

Impact

Potential SSRF in mod_rewrite in Apache HTTP Server 2.4.59 and earlier allows an attacker to cause unsafe RewriteRules to unexpectedly setup URL's to be handled by mod_proxy.

Users are recommended to upgrade to version 2.4.60, which fixes this issue.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original