CVE-2024-38475: Apache HTTP Server · Remote code execution
Exploitation: In the wild · CVSS 9.1 Critical · Unauthenticated · Published 2024-07-01
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.
Enclave's analysis
Apache httpd's mod_rewrite fails to escape output properly. A crafted URL can map to files the server may serve but no URL should reach. That can leak source code or run code. It needs a server-context RewriteRule whose substitution starts with a backreference or variable. CISA lists it as exploited, and EPSS is near the top. Upgrade to 2.4.60 or later and review rewrite rules.
Fix
Upgrade SonicWall SMA 200, 210, 400, 410, 500v firmware to 10.2.1.14-75sv. No fixed version is listed for Apache HTTP Server, NetApp ONTAP 9; follow the vendor advisory.
Affected versions
| Product | Vulnerable | Fixed in |
|---|---|---|
| Apache HTTP Server | 2.4.0 through 2.4.59 | Not listed |
| NetApp ONTAP 9 | No version bound given in the CPE data; default status unknown | Not listed |
| SonicWall SMA 200, 210, 400, 410, 500v firmware | Before 10.2.1.14-75sv | 10.2.1.14-75sv |