CVE-2011-4858: Apache Tomcat Improper Input Validation Vulnerability

MODERATE
Advisory Identifier: GHSA-wr3m-gw98-mc3j
CWE-20
Published
Advisory Summary

CVE-2011-4858 is a MODERATE improper input validation vulnerability (CWE-20: Improper Input Validation) affecting Apache Tomcat libraries in the Maven ecosystem. The issue involves improper input validation in apache tomcat. Remediation is available by upgrading affected packages to version 5.5.35, 6.0.35, 7.0.23.

CVE-2011-4858 at a Glance

CVE Identifier CVE-2011-4858
GHSA Identifier GHSA-wr3m-gw98-mc3j
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-20: Improper Input Validation
Affected Product Apache Tomcat
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2011-4858

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:tomcat fixed: 5.5.35
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat</artifactId>
    <version>5.5.35</version>
</dependency>
org.apache.tomcat:tomcat fixed: 6.0.35
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat</artifactId>
    <version>6.0.35</version>
</dependency>
org.apache.tomcat:tomcat fixed: 7.0.23
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat</artifactId>
    <version>7.0.23</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

How to Check if You Are Affected

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

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

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 5.5.35), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.tomcat 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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

Apache Tomcat before 5.5.35, 6.x before 6.0.35, and 7.x before 7.0.23 computes hash values for form parameters without restricting the ability to trigger hash collisions predictably, which allows remote attackers to cause a denial of service (CPU consumption) by sending many crafted parameters.

CVE-2011-4858 Affected Apache Tomcat Versions

3 component(s)
Fixed Versions:
5.5.356.0.357.0.23
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.tomcat:tomcat
Maven
≥ 5.5.0
< 5.5.35
5.5.35
org.apache.tomcat:tomcat
Maven
≥ 6.0.0
< 6.0.35
6.0.35
org.apache.tomcat:tomcat
Maven
≥ 7.0.0
< 7.0.23
7.0.23

References

NVD — CVE-2011-4858 NVD
https://nvd.nist.gov/vuln/detail/CVE-2011-4858
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=750521
Apache Tomcat Source Repository REPOSITORY
https://github.com/FireFart/HashCollision-DOS-POC/blob/master/HashtablePOC.py
Apache Tomcat Source Repository REPOSITORY
https://github.com/apache/tomcat
Apache Tomcat Security Information SECURITY
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A18886
mail-archives.apache.org/mod_mbox/tomcat-ann... WEB
http://mail-archives.apache.org/mod_mbox/tomcat-announce/201112.mbox/%3c4EFB9800.5010106@apache.org%3e
marc.info/ WEB
http://marc.info/?l=bugtraq&m=132871655717248&w=2
marc.info/ WEB
http://marc.info/?l=bugtraq&m=133294394108746&w=2
marc.info/ WEB
http://marc.info/?l=bugtraq&m=136485229118404&w=2
rhn.redhat.com/errata/rhsa-2012-00... WEB
http://rhn.redhat.com/errata/RHSA-2012-0074.html
rhn.redhat.com/errata/rhsa-2012-00... WEB
http://rhn.redhat.com/errata/RHSA-2012-0075.html
rhn.redhat.com/errata/rhsa-2012-00... WEB
http://rhn.redhat.com/errata/RHSA-2012-0076.html
tomcat.apache.org/tomcat-7.0-doc/chan... WEB
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html
Apache Tomcat Security Information SECURITY
http://www.debian.org/security/2012/dsa-2401
www.kb.cert.org/vuls/id/903934 WEB
http://www.kb.cert.org/vuls/id/903934
www.nruns.com/_downloads/advisory... WEB
http://www.nruns.com/_downloads/advisory28122011.pdf
www.ocert.org/advisories/ocert-20... WEB
http://www.ocert.org/advisories/ocert-2011-003.html

Frequently Asked Questions

What is CVE-2011-4858?
CVE-2011-4858 is a security vulnerability in Apache Tomcat involving Improper Input Validation in Apache Tomcat under CWE-20: Improper Input Validation.
Which Apache Tomcat versions are affected?
Affected versions include releases prior to 5.5.35, 6.0.35, 7.0.23 across affected packages: org.apache.tomcat:tomcat.
What version fixes CVE-2011-4858?
Upgrading to 5.5.35, 6.0.35, 7.0.23 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tomcat affected?
Yes, org.apache.tomcat:tomcat is affected in releases prior to 5.5.35, 6.0.35, 7.0.23. Upgrade your dependency to 5.5.35, 6.0.35, 7.0.23 or later.
What CWE is associated with CVE-2011-4858?
CVE-2011-4858 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Maven dependencies for CVE-2011-4858?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.tomcat'. 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-wr3m-gw98-mc3j",
  "modified" : "2022-07-13T18:25:49Z",
  "published" : "2022-05-14T03:52:45Z",
  "aliases" : [ "CVE-2011-4858" ],
  "summary" : "Improper Input Validation in Apache Tomcat",
  "details" : "Apache Tomcat before 5.5.35, 6.x before 6.0.35, and 7.x before 7.0.23 computes hash values for form parameters without restricting the ability to trigger hash collisions predictably, which allows remote attackers to cause a denial of service (CPU consumption) by sending many crafted parameters.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.5.0"
      }, {
        "fixed" : "5.5.35"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.35"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.0.23"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2011-4858"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=750521"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FireFart/HashCollision-DOS-POC/blob/master/HashtablePOC.py"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/tomcat"
  }, {
    "type" : "WEB",
    "url" : "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A18886"
  }, {
    "type" : "WEB",
    "url" : "http://mail-archives.apache.org/mod_mbox/tomcat-announce/201112.mbox/%3c4EFB9800.5010106@apache.org%3e"
  }, {
    "type" : "WEB",
    "url" : "http://marc.info/?l=bugtraq&m=132871655717248&w=2"
  }, {
    "type" : "WEB",
    "url" : "http://marc.info/?l=bugtraq&m=133294394108746&w=2"
  }, {
    "type" : "WEB",
    "url" : "http://marc.info/?l=bugtraq&m=136485229118404&w=2"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2012-0074.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2012-0075.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2012-0076.html"
  }, {
    "type" : "WEB",
    "url" : "http://tomcat.apache.org/tomcat-7.0-doc/changelog.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2012/dsa-2401"
  }, {
    "type" : "WEB",
    "url" : "http://www.kb.cert.org/vuls/id/903934"
  }, {
    "type" : "WEB",
    "url" : "http://www.nruns.com/_downloads/advisory28122011.pdf"
  }, {
    "type" : "WEB",
    "url" : "http://www.ocert.org/advisories/ocert-2011-003.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-13T18:25:49Z",
    "nvd_published_at" : "2012-01-05T19:55:00Z"
  }
}