Skip to content
Server Security Center
KEVhigh8.1

CVE-2017-12617: Apache Tomcat Remote Code Execution

Apache Tomcat · listed in the CISA catalog of actively exploited vulnerabilities since 2022-03-25.

CVSS v3.1 (CVE record)
8.1
high
EPSS (exploit probability, 30 days)
>99.9%
among the highest 0.1% of all CVEs
Added to CISA KEV
2022-03-25
US federal due date 2022-04-15
Ubuntu priority
high

CVE-2017-12617 explained

CVE-2017-12617 is a remote code execution flaw in Apache Tomcat. When HTTP PUTs are enabled, for example by setting the Default servlet's readonly parameter to false, a crafted request can upload a JSP file that the server then executes. It is listed in the CISA Known Exploited Vulnerabilities catalog.

Impact

A remote, unauthenticated attacker can upload a JSP file and have the server execute its code. This can compromise the confidentiality, integrity and availability of the Tomcat server. No user interaction is needed. Attack complexity is rated high. The server is only exposed when HTTP PUTs are enabled, for example when the Default servlet's readonly initialisation parameter is set to false.

Who is affected

For tomcat7, Ubuntu 14.04 LTS has a fix in 7.0.52-1ubuntu0.14 and Ubuntu 16.04 LTS has a fix in 7.0.68-1ubuntu0.4+esm3, which is available only through Ubuntu Pro (ESM). For tomcat8, Ubuntu 16.04 LTS has a fix in 8.0.32-1ubuntu1.6. Ubuntu 18.04 LTS tomcat7 has no fixed version published. Ubuntu 14.04 LTS and 16.04 LTS are end of life. Ubuntu 18.04 LTS receives fixes only through Ubuntu Pro (ESM).

Written with AI from the data on this page and checked against it automatically.

Official description

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.

CISA required action: Apply updates per vendor instructions.

CISA notes

Upstream versions (CVE record)

From the CVE record published by the vendor or CVE numbering authority.

  • Apache Software Foundation Apache Tomcat
    Affected
    • 9.0.0.M1 to 9.0.0
    • 8.5.0 to 8.5.22
    • 8.0.0.RC1 to 8.0.46
    • 7.0.0 to 7.0.81
    Fixed in
    not stated

    Version statement as published by the CNA (free text).

Ubuntu and Debian releases

A server is vulnerable if it has a package built from the listed source package installed in a version lower than the fixed version for its release.

What to do

  1. Identify hosts running tomcat7 or tomcat8 and check the installed package versions.
  2. Update to the fixed version for your release. On Ubuntu 16.04 LTS, tomcat7 requires Ubuntu Pro (ESM).
  3. Restart Tomcat after updating so the patched code is loaded.
  4. Check whether HTTP PUTs are enabled and keep the Default servlet's readonly parameter set to true unless PUTs are required.
  5. Plan upgrades of end-of-life releases, Ubuntu 14.04 LTS and 16.04 LTS, to a supported Ubuntu release.

Ubuntu 18.04 LTS tomcat7 has no fixed version published. Make sure HTTP PUTs are disabled by keeping the Default servlet's readonly parameter at true. Restrict network access to Tomcat. Watch Ubuntu Pro (ESM) for a fix, or migrate the workload to a supported release.

Written with AI from the data on this page and checked against it automatically.

Check and fix on a server

Run on each Ubuntu or Debian server. Replace tomcat7 with the source package from the table above (this CVE affects 2 source packages).

1. Show installed packages built from the source package, with their versions

dpkg-query -W -f='${binary:Package} ${Version} ${source:Package}\n' | awk '$3=="tomcat7"'

2. Compare each installed version with the fixed version for your release from the table (releases with a fixed version only)

I=INSTALLED_VERSION; F=FIXED_VERSION   # replace both
dpkg --compare-versions "$I" lt "$F"; case $? in 0) echo vulnerable ;; 1) echo "fixed or newer" ;; *) echo "check the versions" ;; esac

3. Install the fix

sudo apt update && sudo apt install --only-upgrade $(dpkg-query -W -f='${binary:Package} ${source:Package}\n' | awk '$2=="tomcat7"{print $1}')

Services keep running the old code until they are restarted – restart the affected service or check with needrestart.

No fixed version yet on one release

Ubuntu 18.04 LTS: no fixed version of the affected packages yet, so every installed version there is affected. Until a fix is published:

  • Follow the vendor's advisory for a mitigation or patch: lists.apache.org/thread.html/3fd341a604c4e9eab39e7eaabbba…
  • If the server does not need the package, remove it, or replace it with a maintained alternative.
  • Restrict exposure: keep the affected service off the internet, limit access with a firewall or VPN, and turn off the vulnerable feature where you can.

This page updates automatically when Ubuntu or Debian publish a fix.

Rows marked “fix via Ubuntu Pro”: these fixes are only installable with an Ubuntu Pro subscription (ESM). Attach the machine first (sudo pro attach, then sudo pro enable esm-infra esm-apps), then run the commands above.

CISA's assessment (SSVC)

Exploitation
Exploited in the wild
Automatable
No – each attack needs manual steps
Technical impact
Total – full control of the component or total information disclosure

Weakness: CWE-434 Unrestricted Upload of File with Dangerous Type

Questions about CVE-2017-12617

Is my Tomcat server vulnerable if HTTP PUT is disabled?
According to the description, the flaw requires HTTP PUTs to be enabled, for example by setting the Default servlet's readonly parameter to false. Even so, you should still apply the update.
Is this vulnerability exploited in the wild?
Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2022-03-25. The required action is to apply updates per vendor instructions. Whether it has been used in ransomware campaigns is unknown.
Do I need to restart anything after updating?
Yes. Restart Tomcat. Running services keep executing the old code until they are restarted.

Written with AI from the data on this page and checked against it automatically.

References

Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-22. Always confirm with the vendor's or distribution's advisory before patching.