CVE-2024-38475: Apache HTTP Server mod_rewrite output escaping flaw (file mapping)

Exploited in the wild Critical 9.1 EPSS 100.0% Apache HTTP Server

Improper escaping of output in mod_rewrite lets an attacker map URLs to filesystem locations the server is allowed to serve but that no URL is meant to reach, leading to code execution or source code disclosure. Only RewriteRules in server context whose substitution starts with a backreference or variable are affected. Apache fixed it in 2.4.60 (1 July 2024); CISA added it to KEV on 1 May 2025.

What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms

What to do now

  1. Check whether you run Apache HTTP Server and which version (commands below).
  2. Install the fixed version for your system: see “Patch it” below.
  3. Restart Apache (apache2 or httpd).
  4. If you cannot patch today, apply the temporary mitigation below and patch as soon as possible.
  5. Because this flaw is being exploited, also check the server for signs of compromise.

Affected and fixed versions

Affected:

Fixed in:

Am I affected?

apache2 -v   # Debian/Ubuntu
httpd -v     # RHEL/Fedora
grep -rn 'RewriteRule' /etc/apache2 /etc/httpd 2>/dev/null

Patch it

Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.

Debian
sudo apt update
sudo apt install --only-upgrade apache2
sudo systemctl restart apache2
Ubuntu
sudo apt update
sudo apt install --only-upgrade apache2
sudo systemctl restart apache2
RHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade httpd
sudo systemctl restart httpd
Fedora
sudo dnf upgrade --refresh httpd
SUSE / openSUSE
sudo zypper refresh
sudo zypper update apache2
Amazon Linux
sudo dnf upgrade --releasever=latest httpd
Arch Linux
sudo pacman -Syu
Alpine
apk update && apk upgrade apache2
FreeBSD
pkg update && pkg upgrade apache24

General update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.

Fix status in Linux distributions

ReleasePackageStatusFixed version / advisory
Debian 12apache2fixed2.4.61-1~deb12u1
Debian 13apache2fixed2.4.60-1
Debian testingapache2fixed2.4.60-1
Ubuntu 20.04 (ESM)apache2fixed2.4.41-4ubuntu3.19
Ubuntu 22.04apache2fixed2.4.52-1ubuntu4.10
Ubuntu 18.04 (ESM)apache2fixed2.4.29-1ubuntu4.27+esm3
Ubuntu 24.04apache2fixed2.4.58-1ubuntu8.2
Red Hat Enterprise Linux 9httpd-0:2.4.57-11.el9_4fixedRHSA-2024:4726
Red Hat Enterprise Linux 8httpd:2.4-8100020240712114234.489197e6fixedRHSA-2024:4720
Debian 12 (bookworm)apache2fixed2.4.61-1~deb12u1 (DSA-5729-1)
Debian 11 (bullseye)apache2fixed2.4.61-1~deb11u1 (DSA-5729-1)
Ubuntu 24.04 LTSapache2fixed2.4.58-1ubuntu8.2 (USN-6885-1)
Ubuntu 22.04 LTSapache2fixed2.4.52-1ubuntu4.10 (USN-6885-1)
Ubuntu 20.04 LTSapache2fixed2.4.41-4ubuntu3.19 (USN-6885-1)
Ubuntu 18.04 LTS (ESM)apache2fixed2.4.29-1ubuntu4.27+esm3 (USN-6885-3)
RHEL 9httpdfixed2.4.57-11.el9_4 (RHSA-2024:4726)
RHEL 8httpd:2.4 modulefixed8100020240712114234 (RHSA-2024:4720)

From the Debian security tracker, Ubuntu CVE tracker and Red Hat Security Data API, refreshed every few hours.

If you cannot patch yet

CISA 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.

This vulnerability affects a common open-source component, third-party library, or a protocol used by different products. Please check with specific vendors for information on patching status. For more information, please see: https://httpd.apache.org/security/vulnerabilities_24.html ; https://nvd.nist.gov/vuln/detail/CVE-2024-38475

Related vulnerabilities

Sources

Page generated automatically from official sources on 2026-11-03 18:05 UTC and reviewed by an editor. Always confirm with your vendor's advisory.