CVEfocus › CVE database › CVE-2021-24122

CVE-2021-24122Apache Tomcat information disclosure

CVSS 5.9 MediumEPSS 22.5% (higher than 98% of CVEs)Published 2021-01-14Updated 2026-10-08Assigner: apache

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.

CWE-200

What to do

Likely to be exploited: EPSS gives a 22% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.

Fixed builds are available from Debian, Maven: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed
7Fix pending
32Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04tomcat9Not affected
vulnerable_code_not_present
Ubuntu 25.10tomcat9Not affected
vulnerable_code_not_present
Ubuntu 20.04tomcat9Fix pendingUBUNTU-CVE-2021-24122
Ubuntu 18.04tomcat8Fix pendingUBUNTU-CVE-2021-24122
Ubuntu 18.04tomcat9Fix pendingUBUNTU-CVE-2021-24122
Ubuntu 16.04tomcat6Fix pending
Ubuntu 16.04tomcat7Fix pendingUBUNTU-CVE-2021-24122
Ubuntu 16.04tomcat8Fix pendingUBUNTU-CVE-2021-24122
Ubuntu 14.04tomcat7Fix pendingUBUNTU-CVE-2021-24122
Debian 14tomcat9Fixed9.0.40-1DEBIAN-CVE-2021-24122
Debian 13tomcat9Fixed9.0.40-1DEBIAN-CVE-2021-24122
Debian 12tomcat9Fixed9.0.40-1DEBIAN-CVE-2021-24122
Red Hat Enterprise Linux 9tomcatNot affected
Red Hat Enterprise Linux 9tomcat-admin-webappsNot affected
Red Hat Enterprise Linux 9tomcat-docs-webappNot affected
Red Hat Enterprise Linux 9tomcat-el-3.0-apiNot affected
Red Hat Enterprise Linux 9tomcat-jsp-2.3-apiNot affected
Red Hat Enterprise Linux 9tomcat-libNot affected
Red Hat Enterprise Linux 9tomcat-servlet-4.0-apiNot affected
Red Hat Enterprise Linux 9tomcat-webappsNot affected
Red Hat Enterprise Linux 8pki-servlet-4.0-apiNot affected
Red Hat Enterprise Linux 8pki-servlet-engineNot affected
Red Hat Enterprise Linux 7tomcatNot affected
Red Hat Enterprise Linux 7tomcat-admin-webappsNot affected
Red Hat Enterprise Linux 7tomcat-docs-webappNot affected
Red Hat Enterprise Linux 7tomcat-el-2.2-apiNot affected
Red Hat Enterprise Linux 7tomcat-javadocNot affected
Red Hat Enterprise Linux 7tomcat-jsp-2.2-apiNot affected
Red Hat Enterprise Linux 7tomcat-jsvcNot affected
Red Hat Enterprise Linux 7tomcat-libNot affected
Red Hat Enterprise Linux 7tomcat-servlet-3.0-apiNot affected
Red Hat Enterprise Linux 7tomcat-webappsNot affected
Red Hat Enterprise Linux 6tomcat6Not affected
Red Hat Enterprise Linux 6tomcat6-admin-webappsNot affected
Red Hat Enterprise Linux 6tomcat6-docs-webappNot affected
Red Hat Enterprise Linux 6tomcat6-el-2.1-apiNot affected
Red Hat Enterprise Linux 6tomcat6-javadocNot affected
Red Hat Enterprise Linux 6tomcat6-jsp-2.1-apiNot affected
Red Hat Enterprise Linux 6tomcat6-libNot affected
Red Hat Enterprise Linux 6tomcat6-log4jNot affected
Red Hat Enterprise Linux 6tomcat6-servlet-2.5-apiNot affected
Red Hat Enterprise Linux 6tomcat6-webappsNot affected
Maven libraryorg.apache.tomcat.embed:tomcat-embed-coreFixed7.0.107GHSA-2rvv-w9r2-rg7m

What the vendor says

As published in the CVE record by apache, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.