Patchfirst
CVE-2017-12617 KEVPublic exploit High · 8.1 EPSS >99.9%

Apache Tomcat Remote Code Execution Vulnerability

Apache · Tomcat

Summary

The flaw is an unrestricted file upload in Apache Tomcat's Default servlet, which affects the 9.0, 8.5, 8.0 and 7.0 release lines within the listed version ranges. An unauthenticated remote attacker can exploit it over the network without user interaction, but only when HTTP PUT is enabled, for example by setting the Default servlet's readonly initialisation parameter to false, to upload a JSP file that the server then executes when requested.

Official description · NVD

When running Apache Tomcat versions 9.0.0.M1 to 9.0.0, 8.5.0 to 8.5.22, 8.0.0.RC1 to 8.0.46 and 7.0.0 to 7.0.81 with HTTP PUTs enabled (e.g. via setting the readonly initialisation parameter of the Default servlet 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.

Breakdown
72.5 / 100
Exploited
Yes, in CISA KEV
Reports
1
Tactics
3/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. How attackers get in

  2. What they do

First seen exploited 18 months after disclosure. Public exploit code (Metasploit) was available 1 day before disclosure.

  1. Public exploit codeMetasploit1 day before
  2. Disclosedday 0
  3. First seen exploitedVulnCheck KEV evidenceNamed in a threat reportblog.talosintelligence.com+18 mo
  4. Added to CISA KEVEU database agrees+4 yrs

CISA KEV listing is when exploitation was confirmed, not necessarily the first attack.

See the family tree

3 related vulnerabilities in the same code over 3 years. The latest fix listed for tomcat-embed-core is 9.0.17.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. CVE-2017-12615Tomcat on Windows Remote Code Execution19 Sep 2017KEV
  2. Next fix in the same packageMedium

    Why these are linked:

    • Fixed one release later7.0.79 → 7.0.82 (org.apache.tomcat.embed:tomcat-embed-core)
    • Similar weakness in the same product (machine-matched)same product + CWE + description similarity
    This CVECVE-2017-12617Tomcat Remote Code Execution4 Oct 2017KEV
  3. relatedMedium

    Why these are linked:

    CVE-2021-24122Tomcat information disclosure14 Jan 2021

Fixes in tomcat-embed-coreMaven package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 7.0.79CVE-2017-1261519 Sep 2017KEV
  2. 8.0.4CVE-2014-009531 May 2014
  3. 9.0.0.M18CVE-2017-564817 Apr 2017
  4. 9.0.0.M19CVE-2017-565117 Apr 2017
  5. 9.0.1CVE-2017-126174 Oct 2017KEV
  6. 9.0.5CVE-2018-130523 Feb 2018
  7. 9.0.5CVE-2018-130428 Feb 2018
  8. 9.0.8CVE-2018-13362 Aug 2018
  9. 9.0.17CVE-2019-022128 May 2019Latest listed

techniques

3 , grouped by in kill-chain order, 3 cited passages 3

Initial AccessTA0001

Exploit Public-Facing Application T1190 Medium
AI mapping from the description · how it is exploited

Remote unauthenticated exploit of public-facing web server

it was possible to upload a JSP file to the server via a specially crafted request
From the official description (NVD) Original (opens in a new tab) ↗

ExecutionTA0002

Command and Scripting Interpreter T1059 Medium
AI mapping from the description · primary impact

Uploaded JSP enables server-side code execution

any code it contained would be executed by the server
From the official description (NVD) Original (opens in a new tab) ↗

PersistenceTA0003

Web Shell T1505.003 Medium
AI mapping from the description · primary impact

Uploaded JSP web shell persists on server

This JSP could then be requested and any code it contained would be executed by the server
From the official description (NVD) Original (opens in a new tab) ↗

Detection

0 rules for this CVE · 279 general rules for its techniques

Rules for this CVE

0 that reference CVE-2017-12617 directly.

CVE-specific rules are not available in this build. Search SigmaHQ ↗

General rules for this CVE’s techniques

These detect the technique in general, not this specific vulnerability.

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

2 packages in 1 ecosystem. No single main package: each of these ships the affected code.

  • Mavenorg.apache.tomcat:tomcat-catalina
    Affected: 9.0.0.M1 up to 9.0.1; 8.5.0 up to 8.5.23; 8.0.0-RC1 up to 8.0.47; 7.0.0 up to 7.0.82Upgrade to 9.0.109 or later (older lines: 8.5.55, 8.0.47, 7.0.104)
  • Mavenorg.apache.tomcat.embed:tomcat-embed-core
    Affected: 9.0.0.M1 up to 9.0.1; 8.5.0 up to 8.5.23; 8.0.0-RC1 up to 8.0.47; 7.0.0 up to 7.0.82Upgrade to 9.0.109 or later (older lines: 8.5.94, 8.0.47, 7.0.104)

Check your lockfile against all CVEs

What security researchers reported

Named in 1 threat report
1 reportCisco TalosApr 2019

Reports are matched by finding the exact id CVE-2017-12617 in their text; nobody has reviewed the match. One passage is shown per report, at most 320 characters, linked to the original.

Also mentioned in 50 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

45 links, grouped by NVD tag (44 duplicates merged)

Patch 20

oracle.com/technetwork/security-advisory/cpuapr2018-3678067.htmloracle.com/technetwork/security-advisory/cpujan2018-3236628.htmloracle.com/technetwork/security-advisory/cpujul2018-4258247.htmllists.apache.org/thread.html/1dd0a59c1295cc08ce4c9e7edae5ad2268acc9ba55adcefa0532e5ba%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/343558d982879bf88ec20dbf707f8c11255f8e219e81d45c4f8d0551%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/388a323769f1dff84c9ec905455aa73fbcb20338e3c7eb131457f708%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/3d19773b4cf0377db62d1e9328bf9160bf1819f04f988315086931d7%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/5c0e00fd31efc11e147bf99d0f03c00a734447d3b131ab0818644cdb%40%3Cdev.tomcat.apache.org%3E
Show 12 moreShow fewerlists.apache.org/thread.html/6af47120905aa7d8fe12f42e8ff2284fb338ba141d3b77b8c7cb61b3%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/845312a10aabbe2c499fca94003881d2c79fc993d85f34c1f5c77424%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/88855876c33f2f9c532ffb75bfee570ccf0b17ffa77493745af9a17a%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/b5e3f51d28cd5d9b1809f56594f2cf63dcd6a90429e16ea9f83bbedc%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/e85e83e9954f169bbb77b44baae5a33d8de878df557bb32b7f793661%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/eb6efa8d59c45a7a9eff94c4b925467d3b3fec8ba7697f3daa314b04%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/r3bbb800a816d0a51eccc5a228c58736960a9fffafa581a225834d97d%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/r48c1444845fe15a823e1374674bfc297d5008a5453788099ea14caf0%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/r6ccee4e849bc77df0840c7f853f6bd09d426f6741247da2b7429d5d9%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19c%40%3Cdev.tomcat.apache.org%3Elists.apache.org/thread.html/raba0fabaf4d56d4325ab2aca8814f0b30a237ab83d8106b115ee279a%40%3Cdev.tomcat.apache.org%3Eoracle.com/technetwork/security-advisory/cpuapr2019-5072813.html
↑ ↓ chooseEnter openEsc close