CVE-2024-38475 Apache HTTP Server Improper Escaping of Output
Attackers can exploit improper escaping in mod_rewrite to access restricted filesystem paths, leading to code execution or source code disclosure.
- Exploited in the wild
- Since 1 May 2025
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-38475?
CVE-2024-38475 is a critical path traversal vulnerability in Apache Http Server, published on 1 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Improper escaping of output in mod_rewrite in Apache HTTP Server 2.4.59 and earlier allows an attacker to map URLs to filesystem locations that are permitted to be served by the server but are not intentionally/directly reachable by any URL, resulting in code execution or source code disclosure.
Substitutions in server context that use a backreferences or variables as the first segment of the substitution are affected. Some unsafe RewiteRules will be broken by this change and the rewrite flag "UnsafePrefixStat" can be used to opt back in once ensuring the substitution is appropriately constrained.
Weakness: CWE-116
Which versions are affected by CVE-2024-38475?
1 open source package ship an affected version, including apache. It affects 7 products.
| Package | Affected | Fixed in |
|---|---|---|
apache Bitnami | From 2.4.0 | 2.4.60 |
Products include Apache Http Server, Netapp Ontap 9, Sonicwall Sma 200 Firmware, Sonicwall Sma 210 Firmware, Sonicwall Sma 400 Firmware, Sonicwall Sma 410 Firmware and 1 more.
How do I fix CVE-2024-38475?
Upgrade apache to 2.4.60 or later. US federal agencies must fix it by 22 May 2025.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2024-38475 being exploited?
Yes. Attackers have exploited CVE-2024-38475 in the wild since at least 1 May 2025.
Public exploit code: 1 Nuclei template and 6 proofs of concept on GitHub.
Other vulnerabilities in Apache Http Server
Sources
Also known as ALPINE-CVE-2024-38475, BELL-CVE-2024-38475, BIT-apache-2024-38475, CLEANSTART-2026-JH66547, DEBIAN-CVE-2024-38475, GHSA-pf44-j75v-mhr8 and 1 more.