{"id":"CVE-2024-38475","state":"PUBLISHED","title":"Apache HTTP Server weakness in mod_rewrite when first segment of substitution matches filesystem path.","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. \n\nSubstitutions 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.","publishedAt":"2024-07-01T18:15:12.292Z","updatedAt":"2025-11-03T21:55:40.951Z","severity":{"score":9.1,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","source":"CISA-ADP"},"assigner":"apache","products":["Apache Software Foundation Apache HTTP Server"],"affected":[{"vendor":"Apache Software Foundation","product":"Apache HTTP Server","defaultStatus":"unaffected","versions":[{"version":"2.4.0","status":"affected","lessThanOrEqual":"2.4.59","versionType":"semver"}]}],"references":["https://httpd.apache.org/security/vulnerabilities_24.html","https://security.netapp.com/advisory/ntap-20240712-0001/","https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-38475","https://www.blackhat.com/us-24/briefings/schedule/index.html#confusion-attacks-exploiting-hidden-semantic-ambiguity-in-apache-http-server-pre-recorded-40227","https://github.com/apache/httpd/commit/9a6157d1e2f7ab15963020381054b48782bc18cf","http://www.openwall.com/lists/oss-security/2024/07/01/8","https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2024-0018"],"weaknesses":["CWE-116"],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/38xxx/CVE-2024-38475.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-38475","state":"PUBLISHED","datePublished":"2024-07-01T18:15:12.292Z","dateUpdated":"2025-11-03T21:55:40.951Z","assignerShortName":"apache","assignerOrgId":"f0158376-9dc2-43b6-827c-5f631a4d8d09","dateReserved":"2024-06-17T11:09:56.096Z"},"containers":{"cna":{"title":"Apache HTTP Server weakness in mod_rewrite when first segment of substitution matches filesystem path.","descriptions":[{"lang":"en","value":"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. \n\nSubstitutions 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."}],"affected":[{"vendor":"Apache Software Foundation","product":"Apache HTTP Server","defaultStatus":"unaffected","versions":[{"version":"2.4.0","status":"affected","lessThanOrEqual":"2.4.59","versionType":"semver"}]}],"references":[{"url":"https://httpd.apache.org/security/vulnerabilities_24.html","tags":["vendor-advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20240712-0001/"}],"metrics":[{"other":{"content":{"text":"important"},"type":"Textual description of severity"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-116","description":"CWE-116 Improper Encoding or Escaping of Output","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"apache","orgId":"f0158376-9dc2-43b6-827c-5f631a4d8d09","dateUpdated":"2024-07-12T14:06:09.772Z"},"credits":[{"lang":"en","type":"finder","value":"Orange Tsai (@orange_8361) from DEVCORE"}],"source":{"discovery":"UNKNOWN"},"timeline":[{"lang":"en","time":"2024-04-01T12:00:00.000Z","value":"reported"}],"x_generator":{"engine":"Vulnogram 0.1.0-dev"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"apache","product":"http_server","defaultStatus":"unaffected","versions":[{"version":"2.4.0","status":"affected","lessThanOrEqual":"2.4.59","versionType":"custom"}],"cpes":["cpe:2.3:a:apache:http_server:2.4.0:*:*:*:*:*:*:*"]},{"vendor":"netapp","product":"ontap_9","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"*","versionType":"custom"}],"cpes":["cpe:2.3:a:netapp:ontap_9:-:*:*:*:*:*:*:*"]}],"references":[{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-38475","tags":["government-resource"]}],"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":9.1,"attackVector":"NETWORK","baseSeverity":"CRITICAL","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"NONE","privilegesRequired":"NONE","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-38475","role":"CISA Coordinator","options":[{"Exploitation":"active"},{"Automatable":"yes"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-05-02T03:55:18.245532Z"}}},{"other":{"type":"kev","content":{"dateAdded":"2025-05-01","reference":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-38475"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-21T22:55:50.372Z"},"timeline":[{"time":"2025-05-01T00:00:00.000Z","lang":"en","value":"CVE-2024-38475 added to CISA KEV"}]},{"title":"CVE Program Container","references":[{"url":"https://www.blackhat.com/us-24/briefings/schedule/index.html#confusion-attacks-exploiting-hidden-semantic-ambiguity-in-apache-http-server-pre-recorded-40227"},{"url":"https://github.com/apache/httpd/commit/9a6157d1e2f7ab15963020381054b48782bc18cf"},{"url":"https://httpd.apache.org/security/vulnerabilities_24.html","tags":["vendor-advisory","x_transferred"]},{"url":"https://security.netapp.com/advisory/ntap-20240712-0001/","tags":["x_transferred"]},{"url":"http://www.openwall.com/lists/oss-security/2024/07/01/8"},{"url":"https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2024-0018"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T21:55:40.951Z"}}]}}}