CVE-2024-38475Apache HTTP Server weakness in mod_rewrite when first segment of substitution matches filesystem path.
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.
Overview
Severity
| Score | Severity | Version | Vector String |
|---|---|---|---|
| 9.1 | CRITICAL | 3.1NVD | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
CISA required action
⚡ Known exploited · remediation due May 22, 2025
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Details
- CVE ID
- CVE-2024-38475
- Status
- Analyzed
- Assigner (CNA)
- apache
- Published
- Jul 1, 2024
- Last modified
- 2026-06-17 07:40 UTC
- Weaknesses
- CWE-116 · Improper Encoding or Escaping of Output
Affected Products
As published by the CNA in the CVE record.
Apache Software FoundationApache HTTP Server1 version range
- 2.4.0 through 2.4.59
References
- httpd.apache.org https://httpd.apache.org/security/vulnerabilities_24.html
- security.netapp.com https://security.netapp.com/advisory/ntap-20240712-0001/
- openwall.com http://www.openwall.com/lists/oss-security/2024/07/01/8
- github.com https://github.com/apache/httpd/commit/9a6157d1e2f7ab15963020381054b48782bc18cf
- psirt.global.sonicwall.com https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2024-0018
- blackhat.com https://www.blackhat.com/us-24/briefings/schedule/index.html#confusion-attacks-exploiting-hidden-semantic-ambiguity-in-apache-http-server-pre-recorded-40227
- cisa.gov https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-38475