cbcvebase.
CVE-2021-24122
published 2021-01-14

CVE-2021-24122: When serving resources from a network location using the NTFS file system, Apache Tomcat versions 10.0.0-M1 to 10.0.0-M9, 9.0.0.M1 to 9.0.39, 8.5.0 to 8.5.59…

PriorityP346medium5.9CVSS 3.1
AVNACHPRNUINSUCHINAN
EPSS
22.85%
97.5th percentile
When serving resources from a network location using the NTFS file system, Apache Tomcat versions 10.0.0-M1 to 10.0.0-M9, 9.0.0.M1 to 9.0.39, 8.5.0 to 8.5.59 and 7.0.0 to 7.0.106 were susceptible to JSP source code disclosure in some configurations. The root cause was the unexpected behaviour of the JRE API File.getCanonicalPath() which in turn was caused by the inconsistent behaviour of the Windows API (FindFirstFileW) in some circumstances.

Affected

14 ranges
VendorProductVersion rangeFixed in
apachetomcat
apachetomcat
apachetomcat
apachetomcat7.0.0 – 7.0.106
apachetomcat8.5.0 – 8.5.59
apachetomcat9.0.1 – 9.0.39
apache_software_foundationapache_tomcat>= Apache Tomcat 10 < 10.0.0-M1010.0.0-M10
apache_software_foundationapache_tomcat>= Apache Tomcat 7 < 7.0.1067.0.106
apache_software_foundationapache_tomcat>= Apache Tomcat 8.5 < 8.5.608.5.60
apache_software_foundationapache_tomcat>= Apache Tomcat 9 < 9.0.409.0.40
debiandebian_linux
debiantomcat9< tomcat9 9.0.40-1 (bookworm)tomcat9 9.0.40-1 (bookworm)
oracleagile_plm
oracleagile_plm

Detection & IOCsextracted from sources · hover to see the quote

  • Vulnerability is exploitable only when Apache Tomcat serves resources from a network location using the NTFS file system — detection should focus on Windows hosts with Tomcat serving content over UNC/network NTFS paths
  • The attack vector is HTTP and the exploit is remote; monitor HTTP responses from Tomcat for raw JSP source code leakage (e.g., responses containing '<%' tags with Java code rather than rendered output)
  • Root cause is Windows API FindFirstFileW behaving inconsistently, leading File.getCanonicalPath() to return unexpected paths — on Windows, monitor for anomalous path canonicalization results in Tomcat JVM that could bypass security constraints
  • Security constraints bypass is also possible, not just source disclosure — monitor for HTTP 200 responses to requests for .jsp files that should be protected by security-constraint elements in web.xml
  • ·Vulnerability only affects Tomcat running on Windows with resources served from a network (NTFS) location; Linux/RHEL deployments are not affected because FindFirstFileW() is Windows-native code and RHEL does not ship NTFS support
  • ·Affected Apache Tomcat version ranges: 10.0.0-M1 to 10.0.0-M9, 9.0.0.M1 to 9.0.39, 8.5.0 to 8.5.59, and 7.0.0 to 7.0.106; fixed in 9.0.40, 8.5.60, 7.0.107

CVSS provenance

nvdv3.15.9MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
nvdv2.04.3MEDIUMAV:N/AC:M/Au:N/C:P/I:N/A:N
osv5.9MEDIUM
vendor_apache5.9MEDIUM
vendor_debian5.9LOW
vendor_oracle5.9MEDIUM
vendor_redhat5.9MEDIUM
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.