Apache Tomcat Remote Code Execution
CVE-2017-12617 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: 9.0.0.M1 to 9.0.0; 8.5.0 to 8.5.22; 8.0.0.RC1 to 8.0.46, and others listed below. 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.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Tomcat to 7.0.82 or 8.0.47 or 8.5.23 or 9.0.1, whichever matches your release line, or a later version.
- CISA's required action: Apply updates per vendor instructions.
- Read the advisory on oracle.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Apache | Apache Tomcat | 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 | Not stated |
| Apache | Tomcat | 7.0.0 up to, but not including, 7.0.82; 8.0 up to, but not including, 8.0.47; 8.5.0 up to, but not including, 8.5.23; 9.0.0 up to, but not including, 9.0.1 | 7.0.82, 8.0.47, 8.5.23, 9.0.1 |
| Canonical | Ubuntu Linux | 12.04; 16.04; 17.10; 18.04 | Not stated |
| Oracle | Agile Product Lifecycle Management | 9.3.3; 9.3.4; 9.3.5; 9.3.6 | Not stated |
| Oracle | Communications Instant Messaging Server | 10.0.1 | Not stated |
| Oracle | Endeca Information Discovery Integrator | 3.1.0; 3.2.0 | Not stated |
| Oracle | Enterprise Manager For MySQL Database | 12.1.0.4.0 | Not stated |
| Oracle | Financial Services Analytical Applications Infrastructure | 7.3.3.0.0 through 7.3.5.3.0; 8.0.0.0.0 through 8.0.9.0.0 | Not stated |
| Oracle | Fmw Platform | 12.2.1.2.0; 12.2.1.3.0 | Not stated |
| Oracle | Health Sciences Empirica Inspections | 1.0.1.1 | Not stated |
| Oracle | Hospitality Guest Access | 4.2.0; 4.2.1 | Not stated |
| Oracle | Instantis Enterprisetrack | 17.1; 17.2 | Not stated |
| Oracle | Management Pack | 11.2.1.0.13 | Not stated |
| Oracle | Micros Lucas | 2.9.5 | Not stated |
| Oracle | Micros Retail Xbri Loss Prevention | 10.0.1; 10.5.0; 10.6.0; 10.7.0; 10.8.0; 10.8.1 | Not stated |
| Oracle | MySQL Enterprise Monitor | 3.3.6.3293 and earlier; 3.4.0 through 3.4.4.4226; 4.0.0 through 4.0.0.5135 | Not stated |
| Oracle | Retail Advanced Inventory Planning | 13.2; 13.4; 14.1; 15.0 | Not stated |
| Oracle | Retail Back Office | 14.0.4; 14.1.3 | Not stated |
| Oracle | Retail Central Office | 14.0.4; 14.1.3 | Not stated |
| Oracle | Retail Convenience And Fuel Pos Software | 2.1.132 | Not stated |
| Oracle | Retail Eftlink | 1.1.124; 15.0.1; 16.0.2 | Not stated |
| Oracle | Retail Insights | 14.0; 14.1; 15.0; 16.0 | Not stated |
| Oracle | Retail Invoice Matching | 12.0; 13.0; 13.1; 13.2; 14.0; 14.1; 15.0; 16.0 | Not stated |
| Oracle | Retail Order Broker | 5.0; 5.1; 5.2; 15.0; 16.0 | Not stated |
| Oracle | Retail Order Management System | 4.0; 4.5; 4.7; 5.0 | Not stated |
Version data comes from the organisation that assigned the CVE; 34 further products are omitted here. 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 system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.1 | High | NVD |
| CVSS 3.1 | 8.1 | High | CISA (ADP) |
| CVSS 2.0 | 6.8 | Medium | NVD |
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.
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
- CVE record published.
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- Deadline for US federal agencies to remediate, set by CISA.
- CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- oracle.com/technetwork/security-advisory/cpuapr2018-3678067.htmlThird Party Advisory
- oracle.com/technetwork/security-advisory/cpujan2018-3236628.htmlThird Party Advisory
- oracle.com/technetwork/security-advisory/cpujul2018-4258247.htmlThird Party Advisory
- oracle.com/technetwork/security-advisory/cpuapr2019-5072813.htmlThird Party Advisory
Patches and release notes
- lists.apache.org/thread.html/1dd0a59c1295cc08ce4c9e7edae5ad2268acc9ba55adcefa0532e5ba%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/343558d982879bf88ec20dbf707f8c11255f8e219e81d45c4f8d0551%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/388a323769f1dff84c9ec905455aa73fbcb20338e3c7eb131457f708%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/3d19773b4cf0377db62d1e9328bf9160bf1819f04f988315086931d7%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/5c0e00fd31efc11e147bf99d0f03c00a734447d3b131ab0818644cdb%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/6af47120905aa7d8fe12f42e8ff2284fb338ba141d3b77b8c7cb61b3%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/845312a10aabbe2c499fca94003881d2c79fc993d85f34c1f5c77424%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/88855876c33f2f9c532ffb75bfee570ccf0b17ffa77493745af9a17a%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/b5e3f51d28cd5d9b1809f56594f2cf63dcd6a90429e16ea9f83bbedc%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/e85e83e9954f169bbb77b44baae5a33d8de878df557bb32b7f793661%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/eb6efa8d59c45a7a9eff94c4b925467d3b3fec8ba7697f3daa314b04%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/r3bbb800a816d0a51eccc5a228c58736960a9fffafa581a225834d97d%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/r48c1444845fe15a823e1374674bfc297d5008a5453788099ea14caf0%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/r6ccee4e849bc77df0840c7f853f6bd09d426f6741247da2b7429d5d9%40%3Cdev.tomcat.apache…Mailing List
- lists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19c%40%3Cdev.tomcat.apache…Mailing List
Third-party and government advisories
- access.redhat.com/errata/RHSA-2017:3080Third Party Advisory
- access.redhat.com/errata/RHSA-2017:3081Third Party Advisory
- access.redhat.com/errata/RHSA-2017:3113Third Party Advisory
- access.redhat.com/errata/RHSA-2017:3114Third Party Advisory
- access.redhat.com/errata/RHSA-2018:0268Third Party Advisory
- access.redhat.com/errata/RHSA-2018:0269Third Party Advisory
- access.redhat.com/errata/RHSA-2018:0270Third Party Advisory
- access.redhat.com/errata/RHSA-2018:0271Third Party Advisory
- access.redhat.com/errata/RHSA-2018:0275Third Party Advisory
- access.redhat.com/errata/RHSA-2018:0465Third Party Advisory
- access.redhat.com/errata/RHSA-2018:0466Third Party Advisory
- access.redhat.com/errata/RHSA-2018:2939Third Party Advisory
- lists.debian.org/debian-lts-announce/2017/11/msg00009.htmlMailing List, Third Party Advisory
- security.netapp.com/advisory/ntap-20171018-0002/Third Party Advisory
- security.netapp.com/advisory/ntap-20180117-0002/Third Party Advisory
Technical write-ups (may include proof of concept)
- exploit-db.com/exploits/42966/Exploit, Third Party Advisory, VDB Entry
- exploit-db.com/exploits/43008/Exploit, Third Party Advisory, VDB Entry
Other references
- lists.apache.org/thread.html/3fd341a604c4e9eab39e7eaabbbac39c30101a022acc11dd09d7ebcb%40%3Cannounce.tomcat.ap…Issue Tracking, Mailing List
Other vulnerabilities in Apache Tomcat
- 7.5 High severity
- 7.5 High severity
- 8.1 High severity
- 9.1 Critical severity
- 9.1 Critical severity
- 8.1 High severity
Recent Unrestricted Upload of File with Dangerous Type vulnerabilities
- 8.1 High severity
- 9.8 Critical severity
- 9.8 Critical severity
Spotted an error? Tell us.