CVE-2015-5174 Improper Limitation of a Pathname to a Restricted Directory in Apache Tomcat

Medium 4.3 Published Updated

Authenticated attackers can bypass SecurityManager restrictions to list parent directories via path traversal in Apache Tomcat.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2015-5174?

CVE-2015-5174 is a medium-severity path traversal vulnerability in Apache Tomcat, published on 25 Feb 2016. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

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.

Weakness: CWE-22

Which versions are affected by CVE-2015-5174?

6 open source packages ship an affected version, including org.apache.tomcat:tomcat. It affects 3 products.

PackageAffectedFixed in
org.apache.tomcat:tomcat MavenFrom 6.0.06.0.45
org.apache.tomcat:tomcat MavenFrom 6.0.06.0.45
org.apache.tomcat:tomcat MavenFrom 7.0.07.0.65
org.apache.tomcat:tomcat MavenFrom 7.0.07.0.65
org.apache.tomcat:tomcat MavenFrom 8.0.0-RC18.0.27
org.apache.tomcat:tomcat MavenFrom 8.0.0-RC18.0.27
Linux distribution packages (33)
tomcat7 Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-admin-webapps Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-docs-webapp Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-el-2.2-api Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-javadoc Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-jsp-2.2-api Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-lib Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-log4j Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-maven-devel Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-servlet-3.0-api Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7-webapps Red Hat:jboss_enterprise_web_server:2::el5All versions0:7.0.54-21_patch_05.ep6.el5
tomcat7 Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-admin-webapps Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-docs-webapp Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-el-2.2-api Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-javadoc Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-jsp-2.2-api Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-lib Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-log4j Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-maven-devel Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-servlet-3.0-api Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7-webapps Red Hat:jboss_enterprise_web_server:2::el6All versions0:7.0.54-21_patch_05.ep6.el6
tomcat7 Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-admin-webapps Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-docs-webapp Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-el-2.2-api Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-javadoc Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-jsp-2.2-api Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-lib Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-log4j Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-maven-devel Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-servlet-3.0-api Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7
tomcat7-webapps Red Hat:jboss_enterprise_web_server:2::el7All versions0:7.0.54-21_patch_05.ep6.el7

Products include Apache Tomcat, Canonical Ubuntu Linux, Debian Debian Linux.

How do I fix CVE-2015-5174?

Upgrade org.apache.tomcat:tomcat to a fixed version for your release line: 6.0.45, 7.0.65 or 8.0.27.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2015-5174 being exploited?

There is no known exploitation of CVE-2015-5174 in the wild and no public exploit code.

All Apache Tomcat vulnerabilities

Sources

Also known as GHSA-6qr6-x7jm-x2q6, RHBA-2016:0090, UBUNTU-CVE-2015-5174.

Is CVE-2015-5174 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free