CVE-2015-5346: Apache Tomcat Improper Neutralization Of Input During Vulnerability

HIGH
Advisory Identifier: GHSA-jrcp-c39h-r29x
CVSS 8.1
CWE-79
Published
Advisory Summary

CVE-2015-5346 is a HIGH (CVSS 8.1) improper neutralization of input during vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Apache Tomcat libraries in the Maven ecosystem. The issue involves improper neutralization of input during web page generation in apache tomcat. Remediation is available by upgrading affected packages to version 9.0.0.M2, 8.0.31, 7.0.66.

CVE-2015-5346 at a Glance

CVE Identifier CVE-2015-5346
GHSA Identifier GHSA-jrcp-c39h-r29x
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Apache Tomcat
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

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

How to Fix CVE-2015-5346

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: 9.0.0.M2
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat</artifactId>
    <version>9.0.0.M2</version>
</dependency>
org.apache.tomcat:tomcat fixed: 8.0.31
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat</artifactId>
    <version>8.0.31</version>
</dependency>
org.apache.tomcat:tomcat fixed: 7.0.66
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat</artifactId>
    <version>7.0.66</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-2015-5346, 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 9.0.0.M2), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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

Session fixation vulnerability in Apache Tomcat 7.x before 7.0.66, 8.x before 8.0.30, and 9.x before 9.0.0.M2, when different session settings are used for deployments of multiple versions of the same web application, might allow remote attackers to hijack web sessions by leveraging use of a requestedSessionSSL field for an unintended request, related to CoyoteAdapter.java and Request.java.

CVE-2015-5346 Affected Apache Tomcat Versions

3 component(s)
Fixed Versions:
9.0.0.M28.0.317.0.66
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.tomcat:tomcat
Maven
≥ 9.0.0.M1
< 9.0.0.M2
All 1 versions
9.0.0.M1
9.0.0.M2
org.apache.tomcat:tomcat
Maven
≥ 8.0.0.RC1
< 8.0.31
8.0.31
org.apache.tomcat:tomcat
Maven
≥ 7.0.0
< 7.0.66
7.0.66

References

NVD — CVE-2015-5346 NVD
https://nvd.nist.gov/vuln/detail/CVE-2015-5346
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat/commit/04164c1f01b973e548d95511d417f414ca723cb8
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat/commit/6287be37d8d06c320215c45f7e2b8380411692e0
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat/commit/83679b99cd40caa401d173c8f8e72fc98eb5d5be
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat80/commit/41fbee7ba15435a831f765597ff907c56ebf2169
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat80/commit/c39b7ffc2145644f7f3cf9e3cd4aada5048e56a0
Apache Tomcat Security Information SECURITY
https://web.archive.org/web/20160912063818/http://www.securityfocus.com/bid/83323
Apache Tomcat Security Information SECURITY
https://web.archive.org/web/20160321234551/http://www.securitytracker.com/id/1035069
Apache Tomcat Security Information SECURITY
https://security.netapp.com/advisory/ntap-20180531-0001
Apache Tomcat Security Information SECURITY
https://security.gentoo.org/glsa/201705-09
lists.apache.org/thread.html/r9136ff... WEB
https://lists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19c@%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/r9136ff... WEB
https://lists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19c%40%3Cdev.tomcat.apache.org%3E
h20566.www2.hpe.com/portal/site/hpsc/pu... WEB
https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05158626
h20566.www2.hpe.com/portal/site/hpsc/pu... WEB
https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05150442
Apache Tomcat Source Repository REPOSITORY
https://github.com/apache/tomcat
bz.apache.org/bugzilla/show_bug.c... WEB
https://bz.apache.org/bugzilla/show_bug.cgi?id=58809
Apache Tomcat Security Information SECURITY
https://bto.bluecoat.com/security-advisory/sa118
access.redhat.com/errata/rhsa-2016:10... WEB
https://access.redhat.com/errata/RHSA-2016:1088
access.redhat.com/errata/rhsa-2016:10... WEB
https://access.redhat.com/errata/RHSA-2016:1087
Apache Tomcat Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00047.html
Apache Tomcat Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00069.html
Apache Tomcat Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00085.html
Apache Tomcat Security Information SECURITY
http://packetstormsecurity.com/files/135890/Apache-Tomcat-Session-Fixation.html
rhn.redhat.com/errata/rhsa-2016-10... WEB
http://rhn.redhat.com/errata/RHSA-2016-1089.html
rhn.redhat.com/errata/rhsa-2016-20... WEB
http://rhn.redhat.com/errata/RHSA-2016-2046.html
rhn.redhat.com/errata/rhsa-2016-28... WEB
http://rhn.redhat.com/errata/RHSA-2016-2807.html
rhn.redhat.com/errata/rhsa-2016-28... WEB
http://rhn.redhat.com/errata/RHSA-2016-2808.html
seclists.org/bugtraq/2016/feb/14... WEB
http://seclists.org/bugtraq/2016/Feb/143
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1713184
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1713185
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1713187
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1723414
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1723506
Apache Tomcat Security Information SECURITY
http://tomcat.apache.org/security-7.html
Apache Tomcat Security Information SECURITY
http://tomcat.apache.org/security-8.html
Apache Tomcat Security Information SECURITY
http://tomcat.apache.org/security-9.html
Apache Tomcat Security Information SECURITY
http://www.debian.org/security/2016/dsa-3530
Apache Tomcat Security Information SECURITY
http://www.debian.org/security/2016/dsa-3552
Apache Tomcat Security Information SECURITY
http://www.debian.org/security/2016/dsa-3609
Apache Tomcat Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html
Apache Tomcat Security Information SECURITY
http://www.oracle.com/technetwork/topics/security/bulletinjan2016-2867206.html
Apache Tomcat Security Information SECURITY
http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2016-3090545.html
www.ubuntu.com/usn/usn-3024-1 WEB
http://www.ubuntu.com/usn/USN-3024-1

Frequently Asked Questions

What is CVE-2015-5346?
CVE-2015-5346 is a security vulnerability in Apache Tomcat involving Improper Neutralization of Input During Web Page Generation in Apache Tomcat under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Apache Tomcat versions are affected?
Affected versions include releases prior to 9.0.0.M2, 8.0.31, 7.0.66 across affected packages: org.apache.tomcat:tomcat.
What version fixes CVE-2015-5346?
Upgrading to 9.0.0.M2, 8.0.31, 7.0.66 (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 9.0.0.M2, 8.0.31, 7.0.66. Upgrade your dependency to 9.0.0.M2, 8.0.31, 7.0.66 or later.
What is the CVSS score of CVE-2015-5346?
CVE-2015-5346 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2015-5346?
CVE-2015-5346 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Maven dependencies for CVE-2015-5346?
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-jrcp-c39h-r29x",
  "modified" : "2024-02-22T18:33:36Z",
  "published" : "2022-05-14T03:13:01Z",
  "aliases" : [ "CVE-2015-5346" ],
  "summary" : "Improper Neutralization of Input During Web Page Generation in Apache Tomcat",
  "details" : "Session fixation vulnerability in Apache Tomcat 7.x before 7.0.66, 8.x before 8.0.30, and 9.x before 9.0.0.M2, when different session settings are used for deployments of multiple versions of the same web application, might allow remote attackers to hijack web sessions by leveraging use of a requestedSessionSSL field for an unintended request, related to CoyoteAdapter.java and Request.java.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0.M1"
      }, {
        "fixed" : "9.0.0.M2"
      } ]
    } ],
    "versions" : [ "9.0.0.M1" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0.RC1"
      }, {
        "fixed" : "8.0.31"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 8.0.30"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.0.66"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.0.65"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-5346"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat/commit/04164c1f01b973e548d95511d417f414ca723cb8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat/commit/6287be37d8d06c320215c45f7e2b8380411692e0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat/commit/83679b99cd40caa401d173c8f8e72fc98eb5d5be"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat80/commit/41fbee7ba15435a831f765597ff907c56ebf2169"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat80/commit/c39b7ffc2145644f7f3cf9e3cd4aada5048e56a0"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20160912063818/http://www.securityfocus.com/bid/83323"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20160321234551/http://www.securitytracker.com/id/1035069"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20180531-0001"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201705-09"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19c@%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19c%40%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05158626"
  }, {
    "type" : "WEB",
    "url" : "https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05150442"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/tomcat"
  }, {
    "type" : "WEB",
    "url" : "https://bz.apache.org/bugzilla/show_bug.cgi?id=58809"
  }, {
    "type" : "WEB",
    "url" : "https://bto.bluecoat.com/security-advisory/sa118"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2016:1088"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2016:1087"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00047.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00069.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00085.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/135890/Apache-Tomcat-Session-Fixation.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-1089.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-2046.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-2807.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-2808.html"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/bugtraq/2016/Feb/143"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1713184"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1713185"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1713187"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1723414"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1723506"
  }, {
    "type" : "WEB",
    "url" : "http://tomcat.apache.org/security-7.html"
  }, {
    "type" : "WEB",
    "url" : "http://tomcat.apache.org/security-8.html"
  }, {
    "type" : "WEB",
    "url" : "http://tomcat.apache.org/security-9.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2016/dsa-3530"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2016/dsa-3552"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2016/dsa-3609"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/topics/security/bulletinjan2016-2867206.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2016-3090545.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-3024-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-06T20:12:06Z",
    "nvd_published_at" : "2016-02-25T01:59:00Z"
  }
}