CVE-2021-24122: Infoleak

Published Jan 14, 2021
·
Updated

A flaw was found in Apache Tomcat. When serving resources from a network location using the NTFS file system, it was possible to bypass security constraints and view the source code for JSPs in some configurations. The root cause was the unexpected behavior of the JRE API File.getCanonicalPath(), which was caused by the inconsistent behavior of the Windows API (FindFirstFileW) in some circumstances. The highest threat from this vulnerability is to confidentiality.

Other sources

When serving resources from a network location using the NTFS file system it was possible to bypass security constraints and/or view the source code for JSPs 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.

Upstream commits: Tomcat 9.0: https://github.com/apache/tomcat/commit/935fc5582dc25ae10bab6f9d5629ff8d996cb533 Tomcat 8.5: https://github.com/apache/tomcat/commit/920dddbdb981f92e8d5872a4bb126a10af5ca8a9 Tomcat 7.0: https://github.com/apache/tomcat/commit/800b03140e640f8892f27021e681645e8e320177

Reference: http://mail-archives.apache.org/modmbox/tomcat-announce/202101.mbox/%3Cf3765f21-969d-7f21-e34a-efc106175373%40apache.org%3E http://tomcat.apache.org/security-9.html#FixedinApacheTomcat9.0.40 http://tomcat.apache.org/security-8.html#FixedinApacheTomcat8.5.60 http://tomcat.apache.org/security-7.html#FixedinApacheTomcat7.0.107

Red Hat

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 Software

53 affected componentsFixes available
redhat/jws5-tomcat<0:9.0.36-9.redhat_8.1.el7
0:9.0.36-9.redhat_8.1.el7
redhat/jws5-tomcat-native<0:1.2.25-3.redhat_3.el7
0:1.2.25-3.redhat_3.el7
redhat/jws5-tomcat<0:9.0.36-9.redhat_8.1.el8
0:9.0.36-9.redhat_8.1.el8
redhat/jws5-tomcat-native<0:1.2.25-3.redhat_3.el8
0:1.2.25-3.redhat_3.el8
maven/org.apache.tomcat.embed:tomcat-embed-core>=7.0.0<7.0.107
7.0.107
maven/org.apache.tomcat.embed:tomcat-embed-core>=8.5.0<8.5.60
8.5.60
maven/org.apache.tomcat.embed:tomcat-embed-core>=9.0.0<9.0.40
9.0.40
maven/org.apache.tomcat.embed:tomcat-embed-core>=10.0.0-M1<=10.0.0-M9
10.0.0-M10
Apache Tomcat>=7.0.0<=7.0.106
Apache Tomcat>=8.5.0<=8.5.59
Apache Tomcat>=9.0.1<=9.0.39
Apache Tomcat=9.0.0-milestone1
Apache Tomcat=9.0.0-milestone10
Apache Tomcat=9.0.0-milestone11
Apache Tomcat=9.0.0-milestone12
Apache Tomcat=9.0.0-milestone13
Apache Tomcat=9.0.0-milestone14
Apache Tomcat=9.0.0-milestone15
Apache Tomcat=9.0.0-milestone16
Apache Tomcat=9.0.0-milestone17
Apache Tomcat=9.0.0-milestone18
Apache Tomcat=9.0.0-milestone19
Apache Tomcat=9.0.0-milestone2
Apache Tomcat=9.0.0-milestone20
Apache Tomcat=9.0.0-milestone21
Apache Tomcat=9.0.0-milestone22
Apache Tomcat=9.0.0-milestone23
Apache Tomcat=9.0.0-milestone24
Apache Tomcat=9.0.0-milestone25
Apache Tomcat=9.0.0-milestone26
Apache Tomcat=9.0.0-milestone27
Apache Tomcat=9.0.0-milestone3
Apache Tomcat=9.0.0-milestone4
Apache Tomcat=9.0.0-milestone5
Apache Tomcat=9.0.0-milestone6
Apache Tomcat=9.0.0-milestone7
Apache Tomcat=9.0.0-milestone8
Apache Tomcat=9.0.0-milestone9
Apache Tomcat=10.0.0-milestone1
Apache Tomcat=10.0.0-milestone2
Apache Tomcat=10.0.0-milestone3
Apache Tomcat=10.0.0-milestone4
Apache Tomcat=10.0.0-milestone5
Apache Tomcat=10.0.0-milestone6
Apache Tomcat=10.0.0-milestone7
Apache Tomcat=10.0.0-milestone8
Apache Tomcat=10.0.0-milestone9
Debian Debian Linux=9.0
Oracle Agile PLM=9.3.3
Oracle Agile PLM=9.3.6
redhat/tomcat<9.0.40
9.0.40
redhat/tomcat<8.5.60
8.5.60
redhat/tomcat<7.0.107
7.0.107

Event History

Jan 14, 2021
CVE Published
12:00 AM
Jan 18, 2021
Data Sourced
via Red Hat·02:24 AM
DescriptionSeverityAffected Software
May 13, 2021
Advisory Published
via GitHub·10:30 PM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203