Actively exploited · Published Jul 1, 2024 · Assigned by apache
CVE-2024-38475Apache HTTP Server weakness in mod_rewrite when first segment of substitution matches filesystem path.
Critical 9.1 Exploited
In plain English
A critical-severity security flaw in Apache HTTP Server from Apache Software Foundation. Attackers are actively exploiting it in the wild (listed by CISA on May 1, 2025). The chance it is exploited in the next 30 days is estimated at 100.0% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
CISA guidance
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Federal agencies must remediate by May 22, 2025.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | httpd | 2.4.37-65.module_el8.10.0+3872+9b8ab21e.1 | ALSA-2024:4720 |
| AlmaLinux:9 | httpd | 2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:9 | httpd-core | 2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:8 | httpd-devel | 2.4.37-65.module_el8.10.0+3872+9b8ab21e.1 | ALSA-2024:4720 |
| AlmaLinux:9 | httpd-devel | 2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:8 | httpd-filesystem | 2.4.37-65.module_el8.10.0+3872+9b8ab21e.1 | ALSA-2024:4720 |
| AlmaLinux:9 | httpd-filesystem | 2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:8 | httpd-manual | 2.4.37-65.module_el8.10.0+3872+9b8ab21e.1 | ALSA-2024:4720 |
| AlmaLinux:9 | httpd-manual | 2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:8 | httpd-tools | 2.4.37-65.module_el8.10.0+3872+9b8ab21e.1 | ALSA-2024:4720 |
| AlmaLinux:9 | httpd-tools | 2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:8 | mod_http2 | 1.15.7-10.module_el8.10.0+3832+564e7653 | ALSA-2024:4720 |
| AlmaLinux:8 | mod_ldap | 2.4.37-65.module_el8.10.0+3872+9b8ab21e.1 | ALSA-2024:4720 |
| AlmaLinux:9 | mod_ldap | 2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:9 | mod_lua | 2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:8 | mod_md | 1:2.0.8-8.module_el8.6.0+3031+fb177b09 | ALSA-2024:4720 |
| AlmaLinux:8 | mod_md | 1:2.0.8-8.module_el8.6.0+2872+fe0ff7aa | ALSA-2024:4720 |
| AlmaLinux:8 | mod_proxy_html | 1:2.4.37-65.module_el8.10.0+3872+9b8ab21e.1 | ALSA-2024:4720 |
| AlmaLinux:9 | mod_proxy_html | 1:2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:8 | mod_session | 2.4.37-65.module_el8.10.0+3872+9b8ab21e.1 | ALSA-2024:4720 |
| AlmaLinux:9 | mod_session | 2.4.57-11.el9_4 | ALSA-2024:4726 |
| AlmaLinux:8 | mod_ssl | 1:2.4.37-65.module_el8.10.0+3872+9b8ab21e.1 | ALSA-2024:4720 |
| AlmaLinux:9 | mod_ssl | 1:2.4.57-11.el9_4 | ALSA-2024:4726 |
| Alpine:v3.20 | apache2 | 2.4.60-r0 | ALPINE-CVE-2024-38475 |
| Alpine:v3.21 | apache2 | 2.4.60-r0 | ALPINE-CVE-2024-38475 |
| Alpine:v3.22 | apache2 | 2.4.60-r0 | ALPINE-CVE-2024-38475 |
| Alpine:v3.23 | apache2 | 2.4.60-r0 | ALPINE-CVE-2024-38475 |
| Alpine:v3.24 | apache2 | 2.4.60-r0 | ALPINE-CVE-2024-38475 |
| Debian:12 | apache2 | 2.4.61-1~deb12u1 | DEBIAN-CVE-2024-38475 |
| Debian:12 | apache2 | 2.4.61-1~deb12u1 | DSA-5729-1 |
| Debian:13 | apache2 | 2.4.60-1 | DEBIAN-CVE-2024-38475 |
| Debian:14 | apache2 | 2.4.60-1 | DEBIAN-CVE-2024-38475 |
| Rocky Linux:8 | httpd | 0:2.4.37-65.module+el8.10.0+1842+4a9649e8.2 | RLSA-2024:4720 |
| Rocky Linux:8 | httpd | 0:2.4.37-65.module+el8.10.0+1840+b070a976.1 | RLSA-2024:4720 |
| Rocky Linux:8 | httpd | 0:2.4.37-65.module+el8.10.0+1938+3b7755d4.3 | RLSA-2024:4720 |
| Rocky Linux:8 | httpd | 0:2.4.37-65.module+el8.10.0+1830+22f0c9e0 | RLSA-2024:4720 |
| Rocky Linux:9 | httpd | 0:2.4.57-11.el9_4 | RLSA-2024:4726 |
| Rocky Linux:8 | mod_http2 | 0:1.15.7-10.module+el8.10.0+1883+38ed6c58.1 | RLSA-2024:4720 |
| Rocky Linux:8 | mod_http2 | 0:1.15.7-10.module+el8.10.0+1830+22f0c9e0 | RLSA-2024:4720 |
| Rocky Linux:8 | mod_http2 | 0:1.15.7-10.module+el8.10.0+1775+6b057638 | RLSA-2024:4720 |
| Rocky Linux:8 | mod_http2 | 0:1.15.7-10.module+el8.10.0+1938+3b7755d4.3 | RLSA-2024:4720 |
| Rocky Linux:8 | mod_md | 1:2.0.8-8.module+el8.9.0+1370+89cc8ad5 | RLSA-2024:4720 |
| Ubuntu:22.04:LTS | apache2 | 2.4.52-1ubuntu4.10 | USN-6885-1 |
| Ubuntu:22.04:LTS | apache2 | 2.4.52-1ubuntu4.10 | UBUNTU-CVE-2024-38475 |
| Ubuntu:24.04:LTS | apache2 | 2.4.58-1ubuntu8.2 | UBUNTU-CVE-2024-38475 |
| Ubuntu:24.04:LTS | apache2 | 2.4.58-1ubuntu8.2 | USN-6885-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Apache Software Foundation | Apache HTTP Server | 2.4.0 – through 2.4.59 |
Weakness: CWE-116 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
References
- https://httpd.apache.org/security/vulnerabilities_24.html vendor-advisory
- https://security.netapp.com/advisory/ntap-20240712-0001/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-38475 government-resource
- https://www.blackhat.com/us-24/briefings/schedule/index.html#confusion-attacks-exploiting-hidden-semantic-ambiguity-in-apache-http-server-pre-recorded-40227
- https://github.com/apache/httpd/commit/9a6157d1e2f7ab15963020381054b48782bc18cf
- http://www.openwall.com/lists/oss-security/2024/07/01/8
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2024-0018