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.

Severity (CVSS 3.1)9.1Critical
Exploit odds (30 days)100.0%top 0.0% of all CVEs
Exploited in the wildYesCISA KEV since May 1, 2025
Attack tooling2Nuclei, Public PoC

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

EcosystemPackageFixed inAdvisory
AlmaLinux:8httpd2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux:9httpd2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:9httpd-core2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:8httpd-devel2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux:9httpd-devel2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:8httpd-filesystem2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux:9httpd-filesystem2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:8httpd-manual2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux:9httpd-manual2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:8httpd-tools2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux:9httpd-tools2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:8mod_http21.15.7-10.module_el8.10.0+3832+564e7653ALSA-2024:4720
AlmaLinux:8mod_ldap2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux:9mod_ldap2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:9mod_lua2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:8mod_md1:2.0.8-8.module_el8.6.0+3031+fb177b09ALSA-2024:4720
AlmaLinux:8mod_md1:2.0.8-8.module_el8.6.0+2872+fe0ff7aaALSA-2024:4720
AlmaLinux:8mod_proxy_html1:2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux:9mod_proxy_html1:2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:8mod_session2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux:9mod_session2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux:8mod_ssl1:2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux:9mod_ssl1:2.4.57-11.el9_4ALSA-2024:4726
Alpine:v3.20apache22.4.60-r0ALPINE-CVE-2024-38475
Alpine:v3.21apache22.4.60-r0ALPINE-CVE-2024-38475
Alpine:v3.22apache22.4.60-r0ALPINE-CVE-2024-38475
Alpine:v3.23apache22.4.60-r0ALPINE-CVE-2024-38475
Alpine:v3.24apache22.4.60-r0ALPINE-CVE-2024-38475
Debian:12apache22.4.61-1~deb12u1DEBIAN-CVE-2024-38475
Debian:12apache22.4.61-1~deb12u1DSA-5729-1
Debian:13apache22.4.60-1DEBIAN-CVE-2024-38475
Debian:14apache22.4.60-1DEBIAN-CVE-2024-38475
Rocky Linux:8httpd0:2.4.37-65.module+el8.10.0+1842+4a9649e8.2RLSA-2024:4720
Rocky Linux:8httpd0:2.4.37-65.module+el8.10.0+1840+b070a976.1RLSA-2024:4720
Rocky Linux:8httpd0:2.4.37-65.module+el8.10.0+1938+3b7755d4.3RLSA-2024:4720
Rocky Linux:8httpd0:2.4.37-65.module+el8.10.0+1830+22f0c9e0RLSA-2024:4720
Rocky Linux:9httpd0:2.4.57-11.el9_4RLSA-2024:4726
Rocky Linux:8mod_http20:1.15.7-10.module+el8.10.0+1883+38ed6c58.1RLSA-2024:4720
Rocky Linux:8mod_http20:1.15.7-10.module+el8.10.0+1830+22f0c9e0RLSA-2024:4720
Rocky Linux:8mod_http20:1.15.7-10.module+el8.10.0+1775+6b057638RLSA-2024:4720
Rocky Linux:8mod_http20:1.15.7-10.module+el8.10.0+1938+3b7755d4.3RLSA-2024:4720
Rocky Linux:8mod_md1:2.0.8-8.module+el8.9.0+1370+89cc8ad5RLSA-2024:4720
Ubuntu:22.04:LTSapache22.4.52-1ubuntu4.10USN-6885-1
Ubuntu:22.04:LTSapache22.4.52-1ubuntu4.10UBUNTU-CVE-2024-38475
Ubuntu:24.04:LTSapache22.4.58-1ubuntu8.2UBUNTU-CVE-2024-38475
Ubuntu:24.04:LTSapache22.4.58-1ubuntu8.2USN-6885-1

Affected products (as reported)

VendorProductVersions
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