Cloudanix VulnDB

CVE-2017-12616

High · 7.5

CVSS

7.5

EPSS

70.1%

Published

Sep 19, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Attend

Attackers could read the private source code behind web pages or skip security rules meant to protect files on affected Tomcat servers.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Web Framework
Class
Information Disclosure
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Specially crafted requests to a VirtualDirContext allow bypassing configured security constraints and retrieving the source code of JSP resources served by that context.

Why it matters to the business

Exposure of application source code can reveal business logic, credentials, and internal paths, enabling attackers to craft more targeted follow-on attacks and increasing the risk of data or intellectual-property loss.

How an attack unfolds

An attacker identifies a Tomcat instance using VirtualDirContext, then issues HTTP requests with crafted paths or encodings that evade the container's security checks, directly retrieving JSP source instead of compiled output.

How to fix it

Upgrade Apache Tomcat to a version later than 7.0.80; if VirtualDirContext must remain in use, apply configuration changes that enforce proper security constraints on all served resources.

How to confirm the fix worked

Inventory Tomcat versions across the environment, audit web.xml and context configurations for VirtualDirContext declarations, and re-test affected paths with representative malicious requests to confirm constraints are enforced.

Typical attack path

  1. Map Tomcat deployment and confirm VirtualDirContext usage
  2. Send crafted HTTP request targeting JSP resources
  3. Receive and inspect disclosed JSP source code

How to detect it

Review Tomcat access and error logs for requests containing unusual path encodings or direct JSP references that bypass normal rendering; correlate with VirtualDirContext configuration changes.

What your security team should do

  • Prioritize upgrade of all Tomcat 7.0.x instances to a supported release
  • Disable or replace VirtualDirContext where feasible
  • Add access-log monitoring for anomalous JSP and directory traversal patterns

The record

When using a VirtualDirContext with Apache Tomcat 7.0.0 to 7.0.80 it was possible to bypass security constraints and/or view the source code of JSPs for resources served by the VirtualDirContext using a specially crafted request.

Affected packages

Ecosystem Package Introduced Fixed
Maven org.apache.tomcat:tomcat-catalina 7.0.0 7.0.81
Debian:7 tomcat7 0 7.0.28-4+deb7u15
Debian:8 tomcat7 0 7.0.56-3+really7.0.88-1
Mageia:5 tomcat 0 7.0.81-1.mga5
Mageia:6 tomcat 0 8.0.46-1.mga6
Red Hat:jboss_enterprise_web_server:3.1::el6 mod_cluster 0 0:1.3.8-2.Final_redhat_2.1.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 mod_cluster-tomcat7 0 0:1.3.8-2.Final_redhat_2.1.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 mod_cluster-tomcat8 0 0:1.3.8-2.Final_redhat_2.1.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat-native 0 0:1.2.8-11.redhat_11.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat-native-debuginfo 0 0:1.2.8-11.redhat_11.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat-vault 0 0:1.1.6-1.Final_redhat_1.1.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat-vault-tomcat7 0 0:1.1.6-1.Final_redhat_1.1.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat-vault-tomcat8 0 0:1.1.6-1.Final_redhat_1.1.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-admin-webapps 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-docs-webapp 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-el-2.2-api 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-javadoc 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-jsp-2.2-api 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-jsvc 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-lib 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-log4j 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-selinux 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-servlet-3.0-api 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat7-webapps 0 0:7.0.70-25.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-admin-webapps 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-docs-webapp 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-el-2.2-api 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-javadoc 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-jsp-2.3-api 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-jsvc 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-lib 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-log4j 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-selinux 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-servlet-3.1-api 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el6 tomcat8-webapps 0 0:8.0.36-29.ep7.el6
Red Hat:jboss_enterprise_web_server:3.1::el7 mod_cluster 0 0:1.3.8-2.Final_redhat_2.1.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 mod_cluster-tomcat7 0 0:1.3.8-2.Final_redhat_2.1.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 mod_cluster-tomcat8 0 0:1.3.8-2.Final_redhat_2.1.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat-native 0 0:1.2.8-11.redhat_11.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat-native-debuginfo 0 0:1.2.8-11.redhat_11.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat-vault 0 0:1.1.6-1.Final_redhat_1.1.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat-vault-tomcat7 0 0:1.1.6-1.Final_redhat_1.1.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat-vault-tomcat8 0 0:1.1.6-1.Final_redhat_1.1.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-admin-webapps 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-docs-webapp 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-el-2.2-api 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-javadoc 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-jsp-2.2-api 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-jsvc 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-lib 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-log4j 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-selinux 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-servlet-3.0-api 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat7-webapps 0 0:7.0.70-25.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-admin-webapps 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-docs-webapp 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-el-2.2-api 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-javadoc 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-jsp-2.3-api 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-jsvc 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-lib 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-log4j 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-selinux 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-servlet-3.1-api 0 0:8.0.36-29.ep7.el7
Red Hat:jboss_enterprise_web_server:3.1::el7 tomcat8-webapps 0 0:8.0.36-29.ep7.el7
SUSE:Linux Enterprise Server 12-LTSS tomcat 0 7.0.82-7.16.1
Ubuntu:14.04:LTS tomcat7 0 7.0.52-1ubuntu0.14
Ubuntu:16.04:LTS tomcat8 0 8.0.32-1ubuntu1.6
Ubuntu:18.04:LTS tomcat8 0 8.5.30-1ubuntu1
Ubuntu:18.04:LTS tomcat8 0 8.5.30-1ubuntu1.2
Ubuntu:Pro:16.04:LTS tomcat7 0 No fix
Ubuntu:Pro:16.04:LTS tomcat7 0 7.0.68-1ubuntu0.4+esm3
Ubuntu:Pro:18.04:LTS tomcat7 0 No fix
maven org.apache.tomcat/tomcat-catalina 7.0.0 No fix
maven org.apache.tomcat/tomcat-catalina 7.0.54 No fix
maven org.apache.tomcat/tomcat-catalina 7.0.79 No fix

Related vulnerabilities