CVE-2021-25122: Apache Tomcat Exposure Of Sensitive Information To Vulnerability

HIGH
Advisory Identifier: GHSA-j39c-c8hj-x4j3
CVSS 7.5
CWE-200
Published
Advisory Summary

CVE-2021-25122 is a HIGH (CVSS 7.5) exposure of sensitive information to vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Apache Tomcat libraries in the Maven ecosystem. The issue involves exposure of sensitive information to an unauthorized actor in apache tomcat. Remediation is available by upgrading affected packages to version 10.0.2, 9.0.43, 8.5.63.

CVE-2021-25122 at a Glance

CVE Identifier CVE-2021-25122
GHSA Identifier GHSA-j39c-c8hj-x4j3
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Apache Tomcat
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2021-25122

To remediate this vulnerability, upgrade all affected Apache Tomcat dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.tomcat.embed:tomcat-embed-core fixed: 10.0.2
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>10.0.2</version>
</dependency>
org.apache.tomcat.embed:tomcat-embed-core fixed: 9.0.43
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>9.0.43</version>
</dependency>
org.apache.tomcat.embed:tomcat-embed-core fixed: 8.5.63
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>8.5.63</version>
</dependency>
org.apache.tomcat:tomcat-coyote fixed: 10.0.2
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-coyote</artifactId>
    <version>10.0.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.tomcat.embed

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2021-25122, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.tomcat.embed

Analyze the terminal output to locate any version of Apache Tomcat in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.0.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.tomcat.embed command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Apache Tomcat, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

When responding to new h2c connection requests, Apache Tomcat versions 10.0.0-M1 to 10.0.0, 9.0.0.M1 to 9.0.41 and 8.5.0 to 8.5.61 could duplicate request headers and a limited amount of request body from one request to another meaning user A and user B could both see the results of user A's request.

CVE-2021-25122 Affected Apache Tomcat Versions

4 component(s)
Fixed Versions:
10.0.29.0.438.5.63
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.tomcat.embed:tomcat-embed-core
Maven
≥ 10.0.0-M1
< 10.0.2
10.0.2
org.apache.tomcat.embed:tomcat-embed-core
Maven
≥ 9.0.0-M1
< 9.0.43
9.0.43
org.apache.tomcat.embed:tomcat-embed-core
Maven
≥ 8.5.0
< 8.5.63
8.5.63
org.apache.tomcat:tomcat-coyote
Maven
≥ 10.0.0-M1
< 10.0.2
10.0.2

References

NVD — CVE-2021-25122 NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-25122
Apache Tomcat Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2021.html
Apache Tomcat Security Information SECURITY
https://www.oracle.com/security-alerts/cpujan2022.html
Apache Tomcat Security Information SECURITY
https://www.oracle.com//security-alerts/cpujul2021.html
Apache Tomcat Security Information SECURITY
https://www.debian.org/security/2021/dsa-4891
Apache Tomcat Security Information SECURITY
https://security.netapp.com/advisory/ntap-20210409-0002
Apache Tomcat Security Information SECURITY
https://security.gentoo.org/glsa/202208-34
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2021/03/msg00018.html
lists.apache.org/thread.html/rf6d5d5... WEB
https://lists.apache.org/thread.html/rf6d5d57b114678d8898005faef31e9fd6d7c981fcc4ccfc3bc272fc9@%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/rf6d5d5... WEB
https://lists.apache.org/thread.html/rf6d5d57b114678d8898005faef31e9fd6d7c981fcc4ccfc3bc272fc9%40%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/rd0463f... WEB
https://lists.apache.org/thread.html/rd0463f9a5cbc02a485404c4b990f0da452e5ac5c237808edba11c947@%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/rd0463f... WEB
https://lists.apache.org/thread.html/rd0463f9a5cbc02a485404c4b990f0da452e5ac5c237808edba11c947%40%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/rcd90bf... WEB
https://lists.apache.org/thread.html/rcd90bf36b1877e1310b87ecd14ed7bbb15da52b297efd9f0e7253a3b@%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/rcd90bf... WEB
https://lists.apache.org/thread.html/rcd90bf36b1877e1310b87ecd14ed7bbb15da52b297efd9f0e7253a3b%40%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/r7b95bc... WEB
https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7@%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/r7b95bc... WEB
https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7@%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/r7b95bc... WEB
https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7@%3Cannounce.tomcat.apache.org%3E
lists.apache.org/thread.html/r7b95bc... WEB
https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7@%3Cannounce.apache.org%3E
lists.apache.org/thread.html/r7b95bc... WEB
https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7%40%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/r7b95bc... WEB
https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7%40%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/r7b95bc... WEB
https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7%40%3Cannounce.tomcat.apache.org%3E
lists.apache.org/thread.html/r7b95bc... WEB
https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7%40%3Cannounce.apache.org%3E
Apache Tomcat Source Repository REPOSITORY
https://github.com/apache/tomcat
Apache Tomcat Security Information SECURITY
http://www.openwall.com/lists/oss-security/2021/03/01/1

Frequently Asked Questions

What is CVE-2021-25122?
CVE-2021-25122 is a security vulnerability in Apache Tomcat involving Exposure of Sensitive Information to an Unauthorized Actor in Apache Tomcat under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Apache Tomcat versions are affected?
Affected versions include releases prior to 10.0.2, 9.0.43, 8.5.63 across affected packages: org.apache.tomcat.embed:tomcat-embed-core, org.apache.tomcat:tomcat-coyote.
What version fixes CVE-2021-25122?
Upgrading to 10.0.2, 9.0.43, 8.5.63 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tomcat-embed-core affected?
Yes, org.apache.tomcat.embed:tomcat-embed-core is affected in releases prior to 10.0.2, 9.0.43, 8.5.63. Upgrade your dependency to 10.0.2, 9.0.43, 8.5.63 or later.
Is tomcat-coyote affected?
Yes, org.apache.tomcat:tomcat-coyote is affected in releases prior to 10.0.2. Upgrade your dependency to 10.0.2 or later.
What is the CVSS score of CVE-2021-25122?
CVE-2021-25122 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2021-25122?
CVE-2021-25122 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check Maven dependencies for CVE-2021-25122?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.tomcat.embed'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j39c-c8hj-x4j3",
  "modified" : "2026-08-25T18:31:34Z",
  "published" : "2021-06-16T17:45:29Z",
  "aliases" : [ "CVE-2021-25122" ],
  "summary" : "Exposure of Sensitive Information to an Unauthorized Actor in Apache Tomcat",
  "details" : "When responding to new h2c connection requests, Apache Tomcat versions 10.0.0-M1 to 10.0.0, 9.0.0.M1 to 9.0.41 and 8.5.0 to 8.5.61 could duplicate request headers and a limited amount of request body from one request to another meaning user A and user B could both see the results of user A's request.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat.embed:tomcat-embed-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0-M1"
      }, {
        "fixed" : "10.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat.embed:tomcat-embed-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0-M1"
      }, {
        "fixed" : "9.0.43"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat.embed:tomcat-embed-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.5.0"
      }, {
        "fixed" : "8.5.63"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat-coyote"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0-M1"
      }, {
        "fixed" : "10.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-25122"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2022.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com//security-alerts/cpujul2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2021/dsa-4891"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20210409-0002"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202208-34"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2021/03/msg00018.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rf6d5d57b114678d8898005faef31e9fd6d7c981fcc4ccfc3bc272fc9@%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rf6d5d57b114678d8898005faef31e9fd6d7c981fcc4ccfc3bc272fc9%40%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rd0463f9a5cbc02a485404c4b990f0da452e5ac5c237808edba11c947@%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rd0463f9a5cbc02a485404c4b990f0da452e5ac5c237808edba11c947%40%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rcd90bf36b1877e1310b87ecd14ed7bbb15da52b297efd9f0e7253a3b@%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rcd90bf36b1877e1310b87ecd14ed7bbb15da52b297efd9f0e7253a3b%40%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7@%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7@%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7@%3Cannounce.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7@%3Cannounce.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7%40%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7%40%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7%40%3Cannounce.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7b95bc248603360501f18c8eb03bb6001ec0ee3296205b34b07105b7%40%3Cannounce.apache.org%3E"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/tomcat"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2021/03/01/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-24T19:53:13Z",
    "nvd_published_at" : "2021-03-01T12:15:00Z"
  }
}