---
id: "CVE-2024-38475"
kind: "vulnerability"
aliases: ["CVE-2024-38475"]
title: "Improper escaping of output in mod_rewrite in Apache HTTP Server 2.4.59 and earlier allows an attacker to map URLs\u2026"
severity: "critical"
cvss: 9.1
epss: null
exploited: true
status: "open"
category: "runtime"
products: [{"name": "apache http server", "fixed": ["2.4.60"], "affected": ">= 2.4.0, < 2.4.60", "ecosystem": "vendor"}, {"name": "netapp ontap 9", "fixed": [], "affected": "", "ecosystem": "vendor"}, {"name": "sonicwall sma 200 firmware", "fixed": ["10.2.1.14-75sv"], "affected": "< 10.2.1.14-75sv", "ecosystem": "vendor"}, {"name": "sonicwall sma 210 firmware", "fixed": ["10.2.1.14-75sv"], "affected": "< 10.2.1.14-75sv", "ecosystem": "vendor"}, {"name": "sonicwall sma 400 firmware", "fixed": ["10.2.1.14-75sv"], "affected": "< 10.2.1.14-75sv", "ecosystem": "vendor"}, {"name": "sonicwall sma 410 firmware", "fixed": ["10.2.1.14-75sv"], "affected": "< 10.2.1.14-75sv", "ecosystem": "vendor"}, {"name": "sonicwall sma 500v firmware", "fixed": ["10.2.1.14-75sv"], "affected": "< 10.2.1.14-75sv", "ecosystem": "vendor"}, {"name": "Apache HTTP Server", "fixed": [], "affected": "", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["apache-httpd", "exploited", "mod_rewrite", "runtime", "self-hosted"]
not_affected_if: ["managed-hosting", "no-mod_rewrite-rules"]
published_at: "2024-07-01T19:15:04+00:00"
first_seen_at: "2026-10-23T19:11:51+00:00"
updated_at: "2026-10-24T00:09:50+00:00"
sources: [{"source": "kev", "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2024-38475", "first_seen_at": "2026-10-23T19:11:51+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-38475", "first_seen_at": "2026-10-23T22:29:05+00:00"}]
---

# Improper escaping of output in mod_rewrite in Apache HTTP Server 2.4.59 and earlier allows an attacker to map URLs…

Apache HTTP Server's mod_rewrite can be tricked into mapping URLs to filesystem locations that are served but not meant to be reached directly. An attacker can use this to get source code disclosed or run code on the server.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:apache http server affected >= 2.4.0, < 2.4.60 fixed 2.4.60
- vendor:netapp ontap 9 affected ? fixed ?
- vendor:sonicwall sma 200 firmware affected < 10.2.1.14-75sv fixed 10.2.1.14-75sv
- vendor:sonicwall sma 210 firmware affected < 10.2.1.14-75sv fixed 10.2.1.14-75sv
- vendor:sonicwall sma 400 firmware affected < 10.2.1.14-75sv fixed 10.2.1.14-75sv
- vendor:sonicwall sma 410 firmware affected < 10.2.1.14-75sv fixed 10.2.1.14-75sv
- vendor:sonicwall sma 500v firmware affected < 10.2.1.14-75sv fixed 10.2.1.14-75sv
- vendor:Apache HTTP Server affected ? fixed ?

## Fix

Upgrade Apache HTTP Server to a release that fixes CVE-2024-38475 (version not stated in the sources); CISA's required action is to apply the vendor mitigations or discontinue use if none are available.

## Timeline

- 2026-10-23T19:11:51+00:00 kev https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2024-38475
- 2026-10-23T22:29:05+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2024-38475

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
