CVE-2024-38475

Apache HTTP Server weakness in mod_rewrite when first segment of substitution matches filesystem path.

At a glance

Severity
CRITICAL 9.1
Exploitation
Known exploited (CISA KEV) · added 2025-05-01
Exploited per ENISA since 2025-05-01
EPSS
EPSS 99.96 % · percentile 100 (2026-10-27)
State
PUBLISHED
Published
Updated
Assigner
apache
NVD status
Analyzed

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.

Scores

VersionScoreVectorScored by
CVSS 3.1CRITICAL 9.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NCISA-ADP
CVSS 3.1CRITICAL 9.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NNVD · nvd@nist.gov (Primary)
CVSS 3.1CRITICAL 9.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NNVD · 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary)

Weaknesses (CWE)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Apache Software Foundation · Apache HTTP Serveraffected 2.4.0 ≤ 2.4.59

References

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
CISA Known Exploited VulnerabilitiesCC0 1.0
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD