cve.bz

CVE-2024-38474 Improper Encoding or Escaping of Output

9.8 criticalEPSS 2.5%

Critical (9.8). EPSS 2.5% estimated probability of exploitation activity in the next 30 days.

On this page
Substitution encoding issue in mod_rewrite in Apache HTTP Server 2.4.59 and earlier allows attacker to execute scripts in directories permitted by the configuration but not directly reachable by any URL or source disclosure of scripts meant to only to be executed as CGI. Users are recommended to upgrade to version 2.4.60, which fixes this issue. Some RewriteRules that capture and substitute unsafely will now fail unless rewrite flag "UnsafeAllow3F" is specified.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
2.5% (unchanged from 2.5% a week ago; 2.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 85th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-07-09. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-116 Improper Encoding or Escaping of Output
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-38474 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-38474?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-38474?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-38474 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Apache Software Foundation Apache HTTP Serverfrom 2.4.0 through 2.4.59

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11apache22.4.61-1~deb11u1DSA-5729-1
Debian12apache22.4.61-1~deb12u1DEBIAN-CVE-2024-38474 DSA-5729-1
Debian13, 14apache22.4.60-1DEBIAN-CVE-2024-38474
Ubuntu20.04:LTSapache22.4.41-4ubuntu3.23UBUNTU-CVE-2024-38474 USN-6885-1
Ubuntu22.04:LTSapache22.4.52-1ubuntu4.16UBUNTU-CVE-2024-38474 USN-6885-1
Ubuntu24.04:LTSapache22.4.58-1ubuntu8.8UBUNTU-CVE-2024-38474 USN-6885-1
UbuntuPro:14.04:LTSapache22.4.7-1ubuntu4.22+esm10UBUNTU-CVE-2024-38474 USN-6885-5
UbuntuPro:16.04:LTSapache22.4.18-2ubuntu3.17+esm14UBUNTU-CVE-2024-38474 USN-6885-3
UbuntuPro:18.04:LTSapache22.4.29-1ubuntu4.27+esm4UBUNTU-CVE-2024-38474 USN-6885-3
Red Hatenterprise_linux:8::appstreamhttpd, mod_ldap, httpd-devel and 9 more0:2.4.37-65.module+el8.10.0+22069+b47f5c72.1RHSA-2024:4720
Red Hatenterprise_linux:8::appstreammod_http2, mod_http2-debuginfo, mod_http2-debugsource0:1.15.7-10.module+el8.10.0+21653+eaff63f0RHSA-2024:4720
Red Hatenterprise_linux:8::appstreammod_md, mod_md-debuginfo, mod_md-debugsource1:2.0.8-8.module+el8.9.0+19080+567b90f8RHSA-2024:4720
Red Hatenterprise_linux:8::appstreammod_ssl, mod_proxy_html, mod_ssl-debuginfo and 1 more1:2.4.37-65.module+el8.10.0+22069+b47f5c72.1RHSA-2024:4720
Red Hatenterprise_linux:9::appstreamhttpd, mod_lua, mod_ldap and 13 more0:2.4.57-11.el9_4RHSA-2024:4726
Red Hatenterprise_linux:9::appstreammod_ssl, mod_proxy_html, mod_ssl-debuginfo and 1 more1:2.4.57-11.el9_4RHSA-2024:4726
Red Hatjboss_core_services:1::el7jbcs-httpd24-httpd, jbcs-httpd24-mod_ldap, jbcs-httpd24-httpd-devel and 5 more0:2.4.57-13.el7jbcsRHSA-2024:5239
Red Hatjboss_core_services:1::el7jbcs-httpd24-mod_http2, jbcs-httpd24-mod_http2-debuginfo0:1.15.19-41.el7jbcsRHSA-2024:5239
Red Hatjboss_core_services:1::el7jbcs-httpd24-mod_jk, jbcs-httpd24-mod_jk-ap24, jbcs-httpd24-mod_jk-debuginfo0:1.2.49-11.redhat_1.el7jbcsRHSA-2024:5239
Red Hatjboss_core_services:1::el7jbcs-httpd24-mod_md, jbcs-httpd24-mod_md-debuginfo1:2.4.24-11.el7jbcsRHSA-2024:5239
Red Hatjboss_core_services:1::el7jbcs-httpd24-mod_proxy_cluster, jbcs-httpd24-mod_proxy_cluster-debuginfo0:1.3.20-8.el7jbcsRHSA-2024:5239
Red Hatjboss_core_services:1::el7jbcs-httpd24-mod_security, jbcs-httpd24-mod_security-debuginfo0:2.9.3-40.el7jbcsRHSA-2024:5239
32 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 4 moreapache22.4.51-150200.3.73.1SUSE-SU-2024:2997-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 5 moreapache22.4.66-150400.6.57.1SUSE-SU-2026:2686-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Module for Basesystem 15 SP5 and 7 moreapache22.4.51-150400.6.34.1SUSE-SU-2024:3173-1
SUSELinux Enterprise Module for Basesystem 15 SP6apache2, apache2-prefork2.4.58-150600.5.23.1SUSE-SU-2024:3172-1
SUSELinux Enterprise Module for Package Hub 15 SP6apache2, apache2-event2.4.58-150600.5.23.1SUSE-SU-2024:3172-1
SUSELinux Enterprise Module for Server Applications 15 SP6apache2-devel, apache2-utils, apache2-worker2.4.58-150600.5.23.1SUSE-SU-2024:3172-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5apache22.4.51-35.57.1SUSE-SU-2024:2999-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5apache2-tls132.4.51-35.57.2SUSE-SU-2024:2999-1
openSUSELeap 15.5apache22.4.51-150400.6.34.1SUSE-SU-2024:3173-1
openSUSELeap 15.6apache2, apache2-devel, apache2-event and 4 more2.4.58-150600.5.23.1SUSE-SU-2024:3172-1
openSUSETumbleweedapache22.4.61-1.1openSUSE-SU-2024:14116-1
AlmaLinux8httpd, mod_ldap, httpd-devel and 4 more2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux8mod_http21.15.7-10.module_el8.10.0+3832+564e7653ALSA-2024:4720
AlmaLinux8mod_md1:2.0.8-8.module_el8.6.0+2872+fe0ff7aaALSA-2024:4720
AlmaLinux8mod_md1:2.0.8-8.module_el8.6.0+3031+fb177b09ALSA-2024:4720
AlmaLinux8mod_ssl, mod_proxy_html1:2.4.37-65.module_el8.10.0+3872+9b8ab21e.1ALSA-2024:4720
AlmaLinux9httpd, mod_lua, mod_ldap and 6 more2.4.57-11.el9_4ALSA-2024:4726
AlmaLinux9mod_ssl, mod_proxy_html1:2.4.57-11.el9_4ALSA-2024:4726
Rocky Linux8httpd0:2.4.37-65.module+el8.10.0+1830+22f0c9e0RLSA-2024:4720
Rocky Linux8httpd0:2.4.37-65.module+el8.10.0+1840+b070a976.1RLSA-2024:4720
Rocky Linux8httpd0:2.4.37-65.module+el8.10.0+1842+4a9649e8.2RLSA-2024:4720
Rocky Linux8httpd0:2.4.37-65.module+el8.10.0+1938+3b7755d4.3RLSA-2024:4720
Rocky Linux8mod_http20:1.15.7-10.module+el8.10.0+1775+6b057638RLSA-2024:4720
Rocky Linux8mod_http20:1.15.7-10.module+el8.10.0+1830+22f0c9e0RLSA-2024:4720
Rocky Linux8mod_http20:1.15.7-10.module+el8.10.0+1883+38ed6c58.1RLSA-2024:4720
Rocky Linux8mod_http20:1.15.7-10.module+el8.10.0+1938+3b7755d4.3RLSA-2024:4720
Rocky Linux8mod_md1:2.0.8-8.module+el8.9.0+1370+89cc8ad5RLSA-2024:4720
Rocky Linux9httpd0:2.4.57-11.el9_4RLSA-2024:4726
Alpinev3.17, v3.18, v3.19 and 5 moreapache22.4.60-r0ALPINE-CVE-2024-38474
Alpaquita23, streamapache22.4.61-r0BELL-CVE-2024-38474

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This issue only affects configurations with unsafe rules used in the RewriteRule directive. Also, to exploit this flaw, an attacker must be able to upload files to the server. For these reasons, this flaw was rated with an important and not critical severity.

Additionally, this flaw requires mod_rewrite to be loaded and used. This module can be disabled if its functionality is not needed.

Red Hat Enterprise Linux 6 is not affected by this vulnerability because the vulnerable code was introduced in a newer version of httpd.

Red Hat's mitigation

Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.

ProductPackageStateAdvisory
JBoss Core Services for RHEL 8jbcs-httpd24-httpd-0:2.4.57-13.el8jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services for RHEL 8jbcs-httpd24-mod_http2-0:1.15.19-41.el8jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services for RHEL 8jbcs-httpd24-mod_jk-0:1.2.49-11.redhat_1.el8jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services for RHEL 8jbcs-httpd24-mod_md-1:2.4.24-11.el8jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services for RHEL 8jbcs-httpd24-mod_proxy_cluster-0:1.3.20-8.el8jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services for RHEL 8jbcs-httpd24-mod_security-0:2.9.3-40.el8jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services on RHEL 7jbcs-httpd24-httpd-0:2.4.57-13.el7jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services on RHEL 7jbcs-httpd24-mod_http2-0:1.15.19-41.el7jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services on RHEL 7jbcs-httpd24-mod_jk-0:1.2.49-11.redhat_1.el7jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services on RHEL 7jbcs-httpd24-mod_md-1:2.4.24-11.el7jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services on RHEL 7jbcs-httpd24-mod_proxy_cluster-0:1.3.20-8.el7jbcsFixed 2024-08-13RHSA-2024:5239
JBoss Core Services on RHEL 7jbcs-httpd24-mod_security-0:2.9.3-40.el7jbcsFixed 2024-08-13RHSA-2024:5239
Red Hat Enterprise Linux 7.7 Advanced Update Supporthttpd-0:2.4.6-90.el7_7.4Fixed 2024-07-31RHSA-2024:4938
Red Hat Enterprise Linux 7 Extended Lifecycle Supporthttpd-0:2.4.6-99.el7_9.2Fixed 2024-07-31RHSA-2024:4943
Red Hat Enterprise Linux 8httpd:2.4-8100020240712114234.489197e6Fixed 2024-07-23RHSA-2024:4720
Red Hat Enterprise Linux 8.2 Advanced Update Supporthttpd:2.4-8020020240720043142.4cda2c84Fixed 2024-07-24RHSA-2024:4820
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supporthttpd:2.4-8040020240720035525.522a0ee4Fixed 2024-07-24RHSA-2024:4830
Red Hat Enterprise Linux 8.4 Telecommunications Update Servicehttpd:2.4-8040020240720035525.522a0ee4Fixed 2024-07-24RHSA-2024:4830
Red Hat Enterprise Linux 10httpdNot affected
Red Hat Enterprise Linux 6httpdNot affected
8 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-38474.

Attack patterns (CAPEC)

  • CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-104 Cross Zone Scripting Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON