# CVE-2024-38475: Apache HTTP Server weakness in mod\_rewrite when first segment of substitution matches filesystem path.

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.1
- **CVSS:** 9.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Yes: in CISA KEV since 2025-05-01; federal due date 2025-05-22
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 77.94% (percentile 100, 2026-11-26)
- **CWE:** CWE-116
- **Published:** 2024-07-01T18:15:12.292Z
- **Modified:** 2026-06-17T07:40:21.380Z

## Who should check

- Anyone running Apache Software Foundation Apache HTTP Server \>= 2.4.0, \<= 2.4.59

## 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 and fixed versions

- Apache Software Foundation Apache HTTP Server: \>= 2.4.0, \<= 2.4.59 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Timeline

- 2024-07-01: Published
- 2025-05-01: Added to CISA KEV (exploited in the wild)
- 2025-05-22: CISA remediation due date for US federal agencies
- 2026-06-17: Last modified

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-38475. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-38475.md
Affected: Apache Software Foundation Apache HTTP Server >= 2.4.0, <= 2.4.59
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for Apache Software Foundation Apache HTTP Server: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-38475 being exploited?

Yes. CISA lists CVE-2024-38475 in its Known Exploited Vulnerabilities catalog since 2025-05-01, which means attacks have been seen. No public exploit code is known. EPSS estimates a 77.94% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-38475?

Critical: CVSS 9.1 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-38475?

Apache Software Foundation Apache HTTP Server \>= 2.4.0, \<= 2.4.59.

### Is there a fix for CVE-2024-38475?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-38475?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://httpd.apache.org/security/vulnerabilities_24.html>
- patch: <https://github.com/apache/httpd/commit/9a6157d1e2f7ab15963020381054b48782bc18cf>
- other: <https://security.netapp.com/advisory/ntap-20240712-0001/>
- other: <https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-38475>
- other: <https://www.blackhat.com/us-24/briefings/schedule/index.html#confusion-attacks-exploiting-hidden-semantic-ambiguity-in-apache-http-server-pre-recorded-40227>
- other: <http://www.openwall.com/lists/oss-security/2024/07/01/8>
- other: <https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2024-0018>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-38475>
- CISA KEV: CISA Known Exploited Vulnerabilities Catalog <https://www.cisa.gov/known-exploited-vulnerabilities-catalog>

HTML: <https://flawdb.com/CVE-2024-38475> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-38475>
