# CVE-2024-38475

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.

- Page: https://www.vulneraibility.com/cve/CVE-2024-38475
- CVSS: 9.1
- Known exploited: yes, in CISA KEV since 2025-05-01; CISA due date 2025-05-22
- EPSS: 99.96%
- Unvetted proof-of-concept code on GitHub: 6 GitHub proofs of concept · 1 Nuclei template (first 2024-08-18)
- CISA SSVC: exploitation active, automatable yes, technical impact total (assessed 2025-05-02)
- Weakness: CWE-116
- Published: 2024-07-01

## Affected versions

- Apache Software Foundation Apache HTTP Server: affected >= 2.4.0 and <= 2.4.59

A version outside these ranges is not a statement that it is unaffected.

## References

- [advisory] https://httpd.apache.org/security/vulnerabilities_24.html
- [other] https://security.netapp.com/advisory/ntap-20240712-0001/
- [other] https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-38475
- [other] https://www.blackhat.com/us-24/briefings/schedule/index.html#confusion-attacks-exploiting-hidden-semantic-ambiguity-in-apache-http-server-pre-recorded-40227
- [other] https://github.com/apache/httpd/commit/9a6157d1e2f7ab15963020381054b48782bc18cf
- [other] http://www.openwall.com/lists/oss-security/2024/07/01/8
- [other] https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2024-0018

---
Summary, impact and action are written by the vulneraibility.com AI analysis pipeline from the CVE record, NVD, CISA and FIRST data; verify against the references.
