CyberSecBulletin
CVE-2017-12615Exploited in the wildNVD status: Analyzed

Apache Tomcat on Windows Remote Code Execution

CVE-2017-12615 is a high-severity unrestricted upload of file with dangerous type vulnerability in Apache Tomcat from Apache, with a CVSS 3.1 base score of 8.1 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected Apache Tomcat versions: 7.0.0 to 7.0.79. The record does not name a fixed version, so check the vendor advisory. CISA added it to the Known Exploited Vulnerabilities catalogue on March 25, 2022, which means attacks have been observed in the wild, including in ransomware campaigns.

Patch now

Attackers are already exploiting this vulnerability, according to CISA.

What to do

  1. Check which version of Apache Tomcat you run against the affected versions below, and install the vendor's latest release.
  2. CISA's required action: Apply updates per vendor instructions.
  3. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
ApacheApache Tomcat7.0.0 to 7.0.79Not stated
ApacheTomcat7.0.0 through 7.0.79Not stated
NetApp7-mode Transition ToolNot specified in the recordNot stated
NetAppOncommand BalanceNot specified in the recordNot stated
NetAppOncommand ShiftNot specified in the recordNot stated
Red HatEnterprise Linux Server Update Services For SAP Solutions7.4; 7.6; 7.7Not stated
Red HatJboss Enterprise Web Server2.0.0; 3.0.0Not stated
Red HatJboss Enterprise Web Server Text-only AdvisoriesNot specified in the recordNot stated
Red HatEnterprise Linux Desktop6.0; 7.0Not stated
Red HatEnterprise Linux EUS7.4; 7.5; 7.6; 7.7Not stated
Red HatEnterprise Linux EUS Compute Node7.4; 7.5; 7.6; 7.7Not stated
Red HatEnterprise Linux For IBM Z Systems7.0_s390xNot stated
Red HatEnterprise Linux For IBM Z Systems EUS7.4_s390x; 7.5_s390x; 7.6_s390x; 7.7_s390xNot stated
Red HatEnterprise Linux For Power Big Endian7.0_ppc64Not stated
Red HatEnterprise Linux For Power Big Endian EUS7.4_ppc64; 7.5_ppc64; 7.6_ppc64; 7.7_ppc64Not stated
Red HatEnterprise Linux For Power Little Endian7.0_ppc64leNot stated
Red HatEnterprise Linux For Power Little Endian EUS7.4_ppc64le; 7.5_ppc64le; 7.6_ppc64le; 7.7_ppc64leNot stated
Red HatEnterprise Linux For Scientific Computing7.0Not stated
Red HatEnterprise Linux Server6.0; 7.0Not stated
Red HatEnterprise Linux Server AUS7.4; 7.6; 7.7Not stated
Red HatEnterprise Linux Server For Power Little Endian Update Services For SAP Solutions7.4_ppc64le; 7.6_ppc64le; 7.7_ppc64le; 9.2_ppc64leNot stated
Red HatEnterprise Linux Server TUS7.4; 7.6; 7.7Not stated
Red HatEnterprise Linux Workstation6.0; 7.0Not stated

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
HighSuccess depends on conditions outside the attacker's control.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.18.1HighNVD
CVSS 3.18.1HighCISA (ADP)
CVSS 2.06.8MediumNVD

Official description

When running Apache Tomcat 7.0.0 to 7.0.79 on Windows with HTTP PUTs enabled (e.g. via setting the readonly initialisation parameter of the Default to false) it was possible to upload a JSP file to the server via a specially crafted request. This JSP could then be requested and any code it contained would be executed by the server.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Unrestricted Upload of File with Dangerous Type

The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.

How developers prevent this class of flaw

  • Generate a new, unique filename for an uploaded file instead of using the user-supplied filename, so that no external input is used at all.
  • When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
  • Consider storing the uploaded files outside of the web document root entirely. Then, use other mechanisms to deliver the files dynamically.

More Unrestricted Upload of File with Dangerous Type vulnerabilities (CWE-434)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
  3. Added to CISA's Known Exploited Vulnerabilities catalogue.
  4. Deadline for US federal agencies to remediate, set by CISA.
  5. Record last changed materially (score, affected products, status or references).

References

Technical write-ups (may include proof of concept)

Other vulnerabilities in Apache Tomcat

All Apache Tomcat vulnerabilities

Recent Unrestricted Upload of File with Dangerous Type vulnerabilities

Spotted an error? Tell us.