Discover how CVE-2021-24122 impacts Apache Tomcat versions 7 to 10, leading to JSP source code disclosure. Learn how to prevent and mitigate this information exposure vulnerability.
Apache Tomcat versions 7.0.0 to 10.0.0-M9 were susceptible to JSP source code disclosure when serving resources from an NTFS network location. The vulnerability stemmed from unexpected behavior in the JRE API. It was identified by Ilja Brander.
Understanding CVE-2021-24122
This CVE identifies an information exposure vulnerability in Apache Tomcat that could lead to JSP source code disclosure.
What is CVE-2021-24122?
CVE-2021-24122 is a security flaw in Apache Tomcat that allowed the disclosure of JSP source code when serving resources from an NTFS file system.
The Impact of CVE-2021-24122
The vulnerability could result in the exposure of sensitive JSP source code, potentially leading to further security risks and unauthorized access to critical information.
Technical Details of CVE-2021-24122
Apache Tomcat versions affected: 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.
Vulnerability Description
The issue was caused by the unexpected behavior of the JRE API File.getCanonicalPath() when serving resources from an NTFS network location.
Affected Systems and Versions
Versions affected include Apache Tomcat 10, 9, 8.5, and 7 running on Windows systems with resources served from an NTFS file system.
Exploitation Mechanism
Exploiting this vulnerability required specific configurations to trigger the JSP code disclosure from the network location.
Mitigation and Prevention
To address CVE-2021-24122, immediate actions are necessary to secure Apache Tomcat installations and prevent unauthorized access.
Immediate Steps to Take
Update Apache Tomcat to versions that include the necessary security patches to mitigate the information disclosure vulnerability.
Long-Term Security Practices
Regularly monitor and apply security updates to Apache Tomcat to prevent potential vulnerabilities and enhance system security.
Patching and Updates
Stay informed about security advisories from Apache Software Foundation and apply recommended patches promptly to protect against known vulnerabilities.