CVE-2015-5174: Apache Tomcat Improper Limitation Of A Pathname Vulnerability

MODERATE
Advisory Identifier: GHSA-6qr6-x7jm-x2q6
CVSS 4.3
CWE-22
Published
Advisory Summary

CVE-2015-5174 is a MODERATE (CVSS 4.3) improper limitation of a pathname vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Apache Tomcat libraries in the Maven ecosystem. The issue involves improper limitation of a pathname to a restricted directory in apache tomcat. Remediation is available by upgrading affected packages to version 8.0.27, 7.0.65, 6.0.45.

CVE-2015-5174 at a Glance

CVE Identifier CVE-2015-5174
GHSA Identifier GHSA-6qr6-x7jm-x2q6
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Apache Tomcat
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.3

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

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

How to Fix CVE-2015-5174

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: 8.0.27
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat</artifactId>
    <version>8.0.27</version>
</dependency>
org.apache.tomcat:tomcat fixed: 7.0.65
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat</artifactId>
    <version>7.0.65</version>
</dependency>
org.apache.tomcat:tomcat fixed: 6.0.45
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat</artifactId>
    <version>6.0.45</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-5174, 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 8.0.27), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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

Directory traversal vulnerability in RequestUtil.java in Apache Tomcat 6.x before 6.0.45, 7.x before 7.0.65, and 8.x before 8.0.27 allows remote authenticated users to bypass intended SecurityManager restrictions and list a parent directory via a /.. (slash dot dot) in a pathname used by a web application in a getResource, getResourceAsStream, or getResourcePaths call, as demonstrated by the $CATALINA_BASE/webapps directory.

CVE-2015-5174 Affected Apache Tomcat Versions

3 component(s)
Fixed Versions:
8.0.277.0.656.0.45
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.tomcat:tomcat
Maven
≥ 8.0.0-RC1
< 8.0.27
8.0.27
org.apache.tomcat:tomcat
Maven
≥ 7.0.0
< 7.0.65
7.0.65
org.apache.tomcat:tomcat
Maven
≥ 6.0.0
< 6.0.45
6.0.45

References

NVD — CVE-2015-5174 NVD
https://nvd.nist.gov/vuln/detail/CVE-2015-5174
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/rd4863c... WEB
https://lists.apache.org/thread.html/rd4863c79bf729aabb95571fd845a9ea4ee3ae3fcee48f35aba007350@%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/r9136ff... WEB
https://lists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19c@%3Cdev.tomcat.apache.org%3E
access.redhat.com/errata/rhsa-2016:14... WEB
https://access.redhat.com/errata/RHSA-2016:1434
lists.apache.org/thread.html/r587e50... WEB
https://lists.apache.org/thread.html/r587e50b86c1a96ee301f751d50294072d142fd6dc08a8987ae9f3a9b@%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/r409efd... WEB
https://lists.apache.org/thread.html/r409efdf706c2077ae5c37018a87da725a3ca89570a9530342cdc53e4@%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/r1c6263... WEB
https://lists.apache.org/thread.html/r1c62634b7426bee5f553307063457b99c84af73b078ede4f2592b34e@%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/r15695e... WEB
https://lists.apache.org/thread.html/r15695e6203b026c9e9070ca9fa95fb17dd4cd88e5342a7dc5e1e7b85@%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/r0b24f2... WEB
https://lists.apache.org/thread.html/r0b24f2c7507f702348e2c2d64e8a5de72bad6173658e8d8e45322ac2@%3Cusers.tomcat.apache.org%3E
lists.apache.org/thread.html/r03c597... WEB
https://lists.apache.org/thread.html/r03c597a64de790ba42c167efacfa23300c3d6c9fe589ab87fe02859c@%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/b8a1bf1... WEB
https://lists.apache.org/thread.html/b8a1bf18155b552dcf9a928ba808cbadad84c236d85eab3033662cfb@%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/b84ad12... WEB
https://lists.apache.org/thread.html/b84ad1258a89de5c9c853c7f2d3ad77e5b8b2930be9e132d5cef6b95@%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/39ae1f0... WEB
https://lists.apache.org/thread.html/39ae1f0bd5867c15755a6f959b271ade1aea04ccdc3b2e639dcd903b@%3Cdev.tomcat.apache.org%3E
lists.apache.org/thread.html/3722040... WEB
https://lists.apache.org/thread.html/37220405a377c0182d2afdbc36461c4783b2930fbeae3a17f1333113@%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
h20566.www2.hpe.com/portal/site/hpsc/pu... WEB
https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05054964
access.redhat.com/errata/rhsa-2016:14... WEB
https://access.redhat.com/errata/RHSA-2016:1433
access.redhat.com/errata/rhsa-2016:14... WEB
https://access.redhat.com/errata/RHSA-2016:1432
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/msg00082.html
Apache Tomcat Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00085.html
marc.info/ WEB
http://marc.info/?l=bugtraq&m=145974991225029&w=2
Apache Tomcat Security Information SECURITY
http://packetstormsecurity.com/files/135883/Apache-Tomcat-Limited-Directory-Traversal.html
rhn.redhat.com/errata/rhsa-2016-14... WEB
http://rhn.redhat.com/errata/RHSA-2016-1435.html
rhn.redhat.com/errata/rhsa-2016-20... WEB
http://rhn.redhat.com/errata/RHSA-2016-2045.html
rhn.redhat.com/errata/rhsa-2016-25... WEB
http://rhn.redhat.com/errata/RHSA-2016-2599.html
seclists.org/bugtraq/2016/feb/14... WEB
http://seclists.org/bugtraq/2016/Feb/149
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1696281
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1696284
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1700897
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1700898
svn.apache.org/viewvc WEB
http://svn.apache.org/viewvc?view=revision&revision=1700900
Apache Tomcat Security Information SECURITY
http://tomcat.apache.org/security-6.html
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://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/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-5174?
CVE-2015-5174 is a security vulnerability in Apache Tomcat involving Improper Limitation of a Pathname to a Restricted Directory in Apache Tomcat under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Apache Tomcat versions are affected?
Affected versions include releases prior to 8.0.27, 7.0.65, 6.0.45 across affected packages: org.apache.tomcat:tomcat.
What version fixes CVE-2015-5174?
Upgrading to 8.0.27, 7.0.65, 6.0.45 (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 8.0.27, 7.0.65, 6.0.45. Upgrade your dependency to 8.0.27, 7.0.65, 6.0.45 or later.
What is the CVSS score of CVE-2015-5174?
CVE-2015-5174 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2015-5174?
CVE-2015-5174 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Maven dependencies for CVE-2015-5174?
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-6qr6-x7jm-x2q6",
  "modified" : "2025-08-28T20:16:28Z",
  "published" : "2022-05-14T01:10:16Z",
  "aliases" : [ "CVE-2015-5174" ],
  "summary" : "Improper Limitation of a Pathname to a Restricted Directory in Apache Tomcat",
  "details" : "Directory traversal vulnerability in RequestUtil.java in Apache Tomcat 6.x before 6.0.45, 7.x before 7.0.65, and 8.x before 8.0.27 allows remote authenticated users to bypass intended SecurityManager restrictions and list a parent directory via a /.. (slash dot dot) in a pathname used by a web application in a getResource, getResourceAsStream, or getResourcePaths call, as demonstrated by the $CATALINA_BASE/webapps directory.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0-RC1"
      }, {
        "fixed" : "8.0.27"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 8.0.26"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.0.65"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.0.64"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.45"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.0.44"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-5174"
  }, {
    "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/rd4863c79bf729aabb95571fd845a9ea4ee3ae3fcee48f35aba007350@%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19c@%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r587e50b86c1a96ee301f751d50294072d142fd6dc08a8987ae9f3a9b@%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r409efdf706c2077ae5c37018a87da725a3ca89570a9530342cdc53e4@%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r1c62634b7426bee5f553307063457b99c84af73b078ede4f2592b34e@%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r15695e6203b026c9e9070ca9fa95fb17dd4cd88e5342a7dc5e1e7b85@%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r0b24f2c7507f702348e2c2d64e8a5de72bad6173658e8d8e45322ac2@%3Cusers.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r03c597a64de790ba42c167efacfa23300c3d6c9fe589ab87fe02859c@%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/b8a1bf18155b552dcf9a928ba808cbadad84c236d85eab3033662cfb@%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/b84ad1258a89de5c9c853c7f2d3ad77e5b8b2930be9e132d5cef6b95@%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/39ae1f0bd5867c15755a6f959b271ade1aea04ccdc3b2e639dcd903b@%3Cdev.tomcat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/37220405a377c0182d2afdbc36461c4783b2930fbeae3a17f1333113@%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" : "WEB",
    "url" : "https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05054964"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2016:1434"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2016:1433"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2016:1432"
  }, {
    "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/msg00082.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00085.html"
  }, {
    "type" : "WEB",
    "url" : "http://marc.info/?l=bugtraq&m=145974991225029&w=2"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/135883/Apache-Tomcat-Limited-Directory-Traversal.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-1435.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-2045.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-2599.html"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/bugtraq/2016/Feb/149"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1696281"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1696284"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1700897"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1700898"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc?view=revision&revision=1700900"
  }, {
    "type" : "WEB",
    "url" : "http://tomcat.apache.org/security-6.html"
  }, {
    "type" : "WEB",
    "url" : "http://tomcat.apache.org/security-7.html"
  }, {
    "type" : "WEB",
    "url" : "http://tomcat.apache.org/security-8.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/linuxbulletinoct2016-3090545.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-3024-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-06T20:13:55Z",
    "nvd_published_at" : "2016-02-25T01:59:00Z"
  }
}