← Vulnerability feed

Vulnerability record · CVE-2024-38475 · published 1 July 2024

CVE-2024-38475: Apache HTTP Server mod_rewrite improper escaping enables code execution

Apache · Http Server

Apache HTTP Server 2.4.59 and earlier has an improper output escaping flaw in mod_rewrite. Substitutions in server context that use a backreference or variable as the first segment of the substitution can map URLs to filesystem locations that are served but not intentionally reachable by any URL. This can lead to code execution or source code disclosure.

9.1 CVSS 3.1 Critical CISA KEV since 1 May 2025 EPSS 100% · top 0.1% CWE-116 · CWE-116
9.1CVSS 3.1 base score
100%EPSS exploitation probability, 30 days
YesIn CISA KEV, fix deadline passed
7Affected product versions listed by NVD
9References
17 Jun 2026Last modified by NVD

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 16 September 2026. Confidence: high.

critical priorityCVSS 9.1, CISA KEV listing, and near-maximum EPSS probability indicate severe, actively exploited risk.

What it is

Apache HTTP Server 2.4.59 and earlier has an improper output escaping flaw in mod_rewrite. Substitutions in server context that use a backreference or variable as the first segment of the substitution can map URLs to filesystem locations that are served but not intentionally reachable by any URL. This can lead to code execution or source code disclosure.

Impact

An attacker can reach files that the server is permitted to serve but that are not meant to be directly URL-accessible, potentially executing code or disclosing source code.

Attack surface

Reachable over the network via HTTP requests to a server with an affected mod_rewrite configuration; the CVSS vector indicates no authentication and no user interaction are required.

Exploitation

CISA added this to the Known Exploited Vulnerabilities catalog on 2025-05-01, and EPSS shows a 30-day probability of 0.99957 (99.974th percentile), indicating active exploitation is expected.

What to do

  • Upgrade Apache HTTP Server to a version later than 2.4.59 that contains the fix.
  • Apply the vendor patch referenced in the Apache HTTP Server security advisory and the linked commit.
  • Review mod_rewrite rules that use a backreference or variable as the first segment of a substitution in server context and constrain them appropriately.
  • Avoid using the UnsafePrefixStat rewrite flag unless the substitution is verified to be safely constrained.
  • For NetApp and SonicWall products that bundle the affected server, apply the respective vendor advisories.

Detection

  • Monitor HTTP access logs for requests that resolve to filesystem paths not normally exposed by the application.
  • Audit mod_rewrite configurations for substitutions beginning with a backreference or variable in server context.
  • Watch for unexpected execution of files or disclosure of source code in web server responses.
  • Correlate web server activity with CISA KEV guidance and vendor advisories for signs of exploitation attempts.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2024-38475 to the Known Exploited Vulnerabilities catalog on 1 May 2025 as "Apache HTTP Server Improper Escaping of Output Vulnerability". Required action: 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 deadline 22 May 2025.

Affected products

7 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2024-38475 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2021-20038SonicWall SMA 100 appliances stack buffer overflow in mod_cgiA stack-based buffer overflow in the Apache httpd mod_cgi module of SonicWall SMA 100 series appliances lets a remote unauthenticated attacker overwr…KEVEPSS 100%analysed9.8CVE-2021-42013Apache HTTP Server path traversal and RCE via incomplete fixThe fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient, leaving a path traversal flaw that lets attackers map URLs to files outside…KEVEPSS 100%analysed9.8CVE-2021-41773Apache HTTP Server 2.4.49 path traversal and RCEA path normalization flaw introduced in Apache HTTP Server 2.4.49 lets attackers map URLs to files outside directories configured by Alias-like direc…KEVEPSS 100%analysed9.8CVE-2021-20028SonicWall SRA appliances SQL injection in end-of-life firmwareSonicWall Secure Remote Access (SRA) appliances running all 8.x firmware and 9.0.0.9-26sv or earlier fail to neutralize SQL commands, allowing SQL in…KEVEPSS 30%analysed9.8CVE-2021-20016SonicWall SMA100 SSLVPN SQL injection allows unauthenticated accessSonicWall SSLVPN SMA100 firmware 10.x contains a SQL injection flaw in its SSLVPN interface. A remote attacker with no credentials can inject SQL to …KEVEPSS 40%analysed9.0CVE-2021-40438Apache HTTP Server mod_proxy SSRF via crafted URI pathA crafted request URI path can make mod_proxy forward the request to an origin server chosen by the remote user, an SSRF flaw in Apache HTTP Server 2…KEVEPSS 100%analysed7.8CVE-2019-0211Apache HTTP Server scoreboard use-after-free local privilege escalationApache HTTP Server 2.4.17 through 2.4.38 with MPM event, worker or prefork contains a use-after-free in scoreboard handling. Code running in a less-p…KEVEPSS 65%analysed7.2CVE-2023-44221SonicWall SMA100 SSL-VPN management interface OS command injectionThe SMA100 SSL-VPN management interface fails to neutralize special elements, allowing command injection. A remote attacker who already holds adminis…KEVEPSS 76%analysed

Source: NIST National Vulnerability Database (record CVE-2024-38475), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.