important: Apache HTTP Server may use exploitable/malicious backend application output to run local handlers via internal redirect (CVE-2024-38476)
Apache HTTP Server 2.4.59 and earlier could be tricked by malicious response headers from a backend application into running local handlers via an internal redirect. This could lead to information disclosure, SSRF, or local script execution.
Originally disclosed on HackerOne
- Fixed in 37 hours
- Paid in 37 hours
- Disclosed after 10 days
Summary by the program
###important: Apache HTTP Server may use exploitable/malicious backend application output to run local handlers via internal redirect (CVE-2024-38476)
Vulnerability in core of Apache HTTP Server 2.4.59 and earlier are vulnerably to information disclosure, SSRF or local script execution via backend applications whose response headers are malicious or exploitable.
Note: Some legacy uses of the 'AddType' directive to connect a request to a handler must be ported to 'SetHandler' after this fix.
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 r1918560 in 2.4.x: 2024-07-01 Update 2.4.60 released: 2024-07-01 Affects: 2.4.0 through 2.4.59
The report
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:
Impact
Vulnerability in core of Apache HTTP Server 2.4.59 and earlier are vulnerably to information disclosure, SSRF or local script execution via backend applications whose response headers are malicious or exploitable.
Note: Some legacy uses of the 'AddType' directive to connect a request to a handler must be ported to 'SetHandler' after this fix.
Users are recommended to upgrade to version 2.4.60, which fixes this issue.
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
What the attacker needed
Apache HTTP Server 2.4.0–2.4.59; backend application with malicious headers
The fix
The issue was fixed in Apache HTTP Server 2.4.60; users should upgrade, and some legacy uses of the 'AddType' directive must be ported to 'SetHandler'.
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.
Apache is a web server that can pass requests to other programs (backend applications). If one of those programs sends back a specially crafted response header, Apache could be fooled into treating the request as a new internal request and running a local handler, which might expose files, make server-side requests, or execute scripts.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.