CVE-2024-38475
Reported by apache · Published July 1, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| mod_lua | Amazon Linux | 2.4.61-1.amzn2023 |
| mod_md | Amazon Linux | 2.4.61-1.amzn2.0.1 |
| mod_ldap | Amazon Linux | 2.4.61-1.amzn2023, 2.4.61-1.amzn2.0.1 |
| apache2 | Alpine | 2.4.60-r0 |
| httpd-devel | Amazon Linux | 2.4.61-1.amzn2023, 2.4.61-1.amzn2.0.1 |
| httpd-manual | Amazon Linux | 2.4.61-1.amzn2023, 2.4.61-1.amzn2.0.1 |
| apache | Bitnami | 2.4.60 |
| mod_ssl | Amazon Linux | 1:2.4.61-1.amzn2023, 1:2.4.61-1.amzn2.0.1 |
| httpd-tools | Amazon Linux | 2.4.61-1.amzn2023, 2.4.61-1.amzn2.0.1 |
| mod_session | Amazon Linux | 2.4.61-1.amzn2023, 2.4.61-1.amzn2.0.1 |
| httpd-filesystem | Amazon Linux | 2.4.61-1.amzn2023, 2.4.61-1.amzn2.0.1 |
| httpd | Amazon Linux | 2.4.61-1.amzn2023, 2.4.61-1.amzn2.0.1 |
10 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Apache Software Foundation | Apache HTTP Server | 2.4.0 |
| amazon:2023 | mod_lua | 0 |
| amazon:2 | mod_md | 0 |
| amazon:2 | mod_ldap | 0 |
| alpine | apache2 | 0 |
| amazon:2023 | httpd-devel | 0 |
| amazon:2 | httpd-manual | 0 |
| apache | http_server | 2.4.0 |
| netapp | ontap_9 | 0 |
| amazon:2 | mod_ssl | 0 |
| amazon:2 | httpd-devel | 0 |
| Apache Software Foundation | Apache HTTP Server | 2.4.0 |
| amazon:2023 | httpd-tools | 0 |
| amazon:2 | mod_session | 0 |
| amazon:2 | httpd-filesystem | 0 |
| amazon:2023 | httpd-manual | 0 |
| amazon:2023 | httpd-filesystem | 0 |
| amazon:2 | httpd | 0 |
| amazon:2023 | httpd-core | 0 |
| amazon:2 | httpd-tools | 0 |
…and 6 more
Timeline
- Jul 1, 2024 CVE Published
- Jul 2, 2024 EPSS Score (30 in total, the first dated here)
- Jul 13, 2024 PoC Published (3 in total, the first dated here)
- Aug 18, 2024 VulnCheck XDB Entry (5 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (30 in total, the first dated here)
- Apr 29, 2025 VulnCheck KEV Exploitation (275 in total, the first dated here)
- May 1, 2025 CISA KEV Added
- Oct 12, 2025 CrowdSec Sighting (92 in total, the first dated here)
- Jun 2, 2026 Security Advisory (50 in total, the first dated here)
- Nov 15, 2026 Distribution Patch (48 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-38475
vulnetix vdb fixes CVE-2024-38475
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-38475/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- vendor-advisory
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-38475 advisory
- https://www.blackhat.com/us-24/briefings/schedule/index.html#confusion-attacks-exploiting-hidden-semantic-ambiguity-in-apache-http-server-pre-recorded-40227 url
- http://www.openwall.com/lists/oss-security/2024/07/01/8 url
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2024-0018 url
- https://github.com/apache/httpd/commit/9a6157d1e2f7ab15963020381054b48782bc18cf fix