CVE-2024-38475: Unintended filesystem mapping in Apache HTTP Server mod_rewrite
- Vendors
- Apache Software FoundationNetAppSonicwall
CVE-2024-38475 is an improper output-escaping vulnerability in Apache HTTP Server mod_rewrite affecting version 2.4.59 and earlier. Server-context RewriteRule substitutions beginning with a backreference or variable can map attacker-controlled URLs to filesystem locations that Apache permits serving but that are not intentionally exposed through a URL. Depending on rewrite rules, directory permissions, and handler configuration, exploitation can disclose source code or enable code execution. Apache HTTP Server 2.4.60 introduced protective behavior and the UnsafePrefixStat compatibility flag.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Exploitation can expose source code and sensitive files outside the intended URL-accessible namespace, including files outside the document root when Apache directory permissions allow access. Code execution is possible under suitable application and handler configurations; it is not an unconditional outcome for every affected installation. In affected SonicWall SMA 100 deployments, the embedded Apache flaw permits unauthenticated access to sensitive data and has been used in exploitation chains.
Mitigation
If you can’t patch tonight, do this now.
Disable or constrain unsafe server-context RewriteRules so user-controlled substitution prefixes cannot resolve to unintended filesystem locations. Restrict Apache directory access to locations intentionally served, and review symbolic-link access that could extend those permissions. Keep UnsafePrefixStat disabled unless the rewrite target has been verified as safe. For affected SonicWall SMA appliances awaiting updates, restrict external exposure, segment appliances from internal networks, enforce least privilege, and enable available exploit protection.
Remediation
Patch, then assume compromise.
Upgrade Apache HTTP Server to version 2.4.60 or later, or install the applicable vendor-backported security update. Review server- and virtual-host-scoped RewriteRules that begin their substitutions with variables or backreferences, because the fix can break unsafe rules. Do not enable UnsafePrefixStat unless the resulting substitution is appropriately constrained against attacker-controlled filesystem mapping. For affected SonicWall SMA 200, 210, 400, 410, and 500v appliances, apply the fixes associated with SNWLID-2024-0018 by upgrading to firmware 10.2.1.14-75sv or later.
Exploits
4 exploits validated by Mallory's analysis. Hidden: 4 rejected by Mallory's analysis as not a working exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2024-38475 exploited in the wild?
- Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on May 1, 2025.
- Is there a public exploit for CVE-2024-38475?
- Yes. Mallory tracks 4 public exploits or proofs of concept for CVE-2024-38475, the earliest disclosed Aug 18, 2024.
- Is there a patch for CVE-2024-38475?
- Upgrade Apache HTTP Server to version 2.4.60 or later, or install the applicable vendor-backported security update. Review server- and virtual-host-scoped RewriteRules that begin their substitutions with variables or backreferences, because the fix can break unsafe rules.
- What products are affected by CVE-2024-38475?
- Apache Software Foundation Apache HTTP Server, NetApp Ontap 9, Sonicwall Sma 200 Firmware, Sonicwall Sma 210 Firmware, Sonicwall Sma 400 Firmware, and 2 more.
- How severe is CVE-2024-38475?
- CVE-2024-38475 has a CVSS v3.1 score of 9.1 (Critical) and an EPSS score of 100.0% (100th percentile) as of Oct 16, 2026.
Recent activity
67 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.