When running on Windows with enableCmdLineArguments enabled, the CGI Servlet in Apache Tomcat 9.0.0.M1 to 9.0.17, 8.5.0 to 8.5.39 and 7.0.0
When running on Windows with enableCmdLineArguments enabled, the CGI Servlet in Apache Tomcat 9.0.0.M1 to 9.0.17, 8.5.0 to 8.5.39 and 7.0.0 to 7.0.93 is vulnerable to Remote Code Execution due to a bug in the way the JRE passes command line arguments to Windows. The CGI Servlet is disabled by default. The CGI option enableCmdLineArguments is disable by default in Tomcat 9.0.x (and will be disabled by default in all versions in response to this vulnerability). For a detailed explanation of the JRE behaviour, see Markus Wulftange's blog (https://codewhitesec.blogspot.com/2016/02/java-and-command-line-injections-in-windows.html) and this archived MSDN blog (https://web.archive.org/web/20161228144344/https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/).
- Published
- Apr 15, 2019
- Updated
- Jun 16, 2026
- EPSS
- 99.9% · 100th percentile
- CWE
- CWE-78
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
62
This week
Don’t wait for the next maintenance window.
- CVSS
- 32 / 40 · 8.1 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 30 / 30 · 99.9%
Affected systems
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- apache tomcat7.0.0 and later · up to 7.0.93 inclusive
- apache tomcat8.5.0 and later · up to 8.5.39 inclusive
- apache tomcat9.0.1 and later · up to 9.0.17 inclusive
- apache tomcat9.0.0
Versions reported by the vendor
Affected version ranges reported by the assigning authority (apache). Independent of NVD's CPE analysis and usually ahead of it.
Apache Tomcat
- 9.0.0.M1 to 9.0.17, 8.5.0 to 8.5.39, 7.0.0 to 7.0.93affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Maven | org.apache.tomcat.embed:tomcat-embed-core | from 7.0.0 · before 7.0.94 | 7.0.94 |
| Maven | org.apache.tomcat.embed:tomcat-embed-core | from 8.0.0 · before 8.5.40 | 8.5.40 |
| Maven | org.apache.tomcat.embed:tomcat-embed-core | from 9.0.0.M1 · before 9.0.17 | 9.0.17 |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-ecj | before 0:4.12.0-1.redhat_1.1.el6jws | 0:4.12.0-1.redhat_1.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-javapackages-tools | before 0:3.4.1-5.15.11.el6jws | 0:3.4.1-5.15.11.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-jboss-logging | before 0:3.3.2-1.Final_redhat_00001.1.el6jws | 0:3.3.2-1.Final_redhat_00001.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-mod_cluster | before 0:1.4.1-1.Final_redhat_00001.2.el6jws | 0:1.4.1-1.Final_redhat_00001.2.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-mod_cluster-tomcat | before 0:1.4.1-1.Final_redhat_00001.2.el6jws | 0:1.4.1-1.Final_redhat_00001.2.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-python-javapackages | before 0:3.4.1-5.15.11.el6jws | 0:3.4.1-5.15.11.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-admin-webapps | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-docs-webapp | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-el-3.0-api | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-javadoc | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-jsp-2.3-api | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-lib | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-native | before 0:1.2.21-34.redhat_34.el6jws | 0:1.2.21-34.redhat_34.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-native-debuginfo | before 0:1.2.21-34.redhat_34.el6jws | 0:1.2.21-34.redhat_34.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-selinux | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-servlet-4.0-api | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-vault | before 0:1.1.8-1.Final_redhat_1.1.el6jws | 0:1.1.8-1.Final_redhat_1.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-vault-javadoc | before 0:1.1.8-1.Final_redhat_1.1.el6jws | 0:1.1.8-1.Final_redhat_1.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el6 | jws5-tomcat-webapps | before 0:9.0.21-10.redhat_4.1.el6jws | 0:9.0.21-10.redhat_4.1.el6jws |
| Red Hat:jboss_enterprise_web_server:5.2::el7 | jws5-ecj | before 0:4.12.0-1.redhat_1.1.el7jws | 0:4.12.0-1.redhat_1.1.el7jws |
+39
Same product
apache: all recordsOther highest-scoring records for the same primary product.
- CVE-2025-24813Apache Tomcat: Potential RCE and/or information disclosure and/or information corruption with partial PUTKEV99Now
- CVE-2016-8735Remote code execution is possible with Apache Tomcat before 6.0.48, 7.x before 7.0.73, 8.x before 8.0.39, 8.5.x before 8.5.7, and 9.x beforeKEV96Now
- CVE-2017-12617When 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.KEV92Now
- CVE-2017-12615When running Apache Tomcat 7.0.0 to 7.0.79 on Windows with HTTP PUTs enabled (e.g.KEV92Now
- CVE-2026-34486Apache Tomcat: Fix for CVE-2026-29146 allowed bypass of EncryptInterceptorKEV62This week
- CVE-2020-13935The payload length in a WebSocket frame was not correctly validated in Apache Tomcat 10.0.0-M1 to 10.0.0-M6, 9.0.0.M1 to 9.0.36, 8.5.0 to 8.56Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Maven:org.apache.tomcat.embed:tomcat-embed-core | 7.0.94 | Package registry (OSV) |
| Maven:org.apache.tomcat.embed:tomcat-embed-core | 8.5.40 | Package registry (OSV) |
| Maven:org.apache.tomcat.embed:tomcat-embed-core | 9.0.17 | Package registry (OSV) |
| red hat:jws5-ecj | 0:4.12.0-1.redhat_1.1.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-javapackages-tools | 0:3.4.1-5.15.11.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-jboss-logging | 0:3.3.2-1.Final_redhat_00001.1.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-mod_cluster | 0:1.4.1-1.Final_redhat_00001.2.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-mod_cluster-tomcat | 0:1.4.1-1.Final_redhat_00001.2.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-python-javapackages | 0:3.4.1-5.15.11.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-tomcat | 0:9.0.21-10.redhat_4.1.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-tomcat-admin-webapps | 0:9.0.21-10.redhat_4.1.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-tomcat-docs-webapp | 0:9.0.21-10.redhat_4.1.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-tomcat-el-3.0-api | 0:9.0.21-10.redhat_4.1.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-tomcat-javadoc | 0:9.0.21-10.redhat_4.1.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
| red hat:jws5-tomcat-jsp-2.3-api | 0:9.0.21-10.redhat_4.1.el6jws · Red Hat:jboss_enterprise_web_server:5.2::el6 | Package registry (OSV) |
Exploit status
Weaponized
A ready exploit tool or active in-the-wild use is known for this vulnerability. This should be your top priority.
Evidence
- Metasploit module ×1
- Exploit-DB entry ×1
- Nuclei detection template ×1
- Proof-of-concept repository on GitHub ×15
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Exploit-DB entry | remote | 2019-07-03 |
| Metasploit module | exploit/windows/http/tomcat_cgi_cmdlineargsApache Tomcat CGIServlet enableCmdLineArguments Vulnerabilityexploit | 2019-04-10 |
| Nuclei detection template | Nuclei template CVE-2019-0232 | — |
| Proof-of-concept repository on GitHub | stars:190 | 2019-04-15 |
| Proof-of-concept repository on GitHub | stars:82 | 2019-04-16 |
| Proof-of-concept repository on GitHub | stars:3 | 2019-05-23 |
| Proof-of-concept repository on GitHub | stars:20 | 2019-11-21 |
| Proof-of-concept repository on GitHub | stars:1 | 2021-02-20 |
| Proof-of-concept repository on GitHub | stars:1 | 2021-02-21 |
| Proof-of-concept repository on GitHub | stars:33 | 2021-03-25 |
| Proof-of-concept repository on GitHub | stars:0 | 2024-05-02 |
| Proof-of-concept repository on GitHub | stars:2 | 2024-12-29 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Metasploit-5 d
- First PoCsame day
- Published
- TodaySep 30, 2026+2725 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')CVSS vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Root cause
User input is inserted as text into a shell command. The shell may interpret special characters in the input as part of the command.
The bug in code
The whole CWE-78 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const host = req.body.host;exec("ping -c 1 " + host, onResult);Fixed
const host = req.body.host;if (!/^[a-z0-9.-]{1,253}$/i.test(host)) return res.sendStatus(400);execFile("ping", ["-c", "1", host], onResult);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Command DelimitersCAPEC-15likelihood: High · High
- Exploiting Multiple Input Interpretation LayersCAPEC-43likelihood: Medium · High
- Argument InjectionCAPEC-6likelihood: High · High
- OS Command InjectionCAPEC-88likelihood: High · High
ATT&CK techniques
—
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- packetstormsecurity.com/files/153506/Apache-Tomcat-CGIServlet-enableCmdLineArguments-Remote-Code-Execution.html
- seclists.org/fulldisclosure/2019/May/4
- www.securityfocus.com/bid/107906
- access.redhat.com/errata/RHSA-2019:1712
- blog.trendmicro.com/trendlabs-security-intelligence/uncovering-cve-2019-0232-a-remote-code-execution-vulnerability-in-apache-tomcat/
- codewhitesec.blogspot.com/2016/02/java-and-command-line-injections-in-windows.html
- lists.apache.org/thread.html/1dd0a59c1295cc08ce4c9e7edae5ad2268acc9ba55adcefa0532e5ba%40%3Cdev.tomcat.apache.org%3E
- lists.apache.org/thread.html/3d19773b4cf0377db62d1e9328bf9160bf1819f04f988315086931d7%40%3Cdev.tomcat.apache.org%3E
- lists.apache.org/thread.html/52ffb9fbf661245386a83a661183d13f1de2e5779fa23837a08e02ac%40%3Ccommits.ofbiz.apache.org%3E
- lists.apache.org/thread.html/5f297a4b9080b5f65a05bc139596d0e437d6a539b25e31d29d028767%40%3Cannounce.tomcat.apache.org%3E
- lists.apache.org/thread.html/673b6148d92cd7bc99ea2dcf85ad75d57da44fc322d51f37fb529a2a%40%3Ccommits.ofbiz.apache.org%3E
- lists.apache.org/thread.html/6af47120905aa7d8fe12f42e8ff2284fb338ba141d3b77b8c7cb61b3%40%3Cdev.tomcat.apache.org%3E
- lists.apache.org/thread.html/96849486813a95dfd542e1618b7923ca945508aaf4a4341f674d83e3%40%3Cnotifications.ofbiz.apache.org%3E
- lists.apache.org/thread.html/a6c87a09a71162fd563ab1c4e70a08a103e0b7c199fc391f1c9c4c35%40%3Ccommits.ofbiz.apache.org%3E
- lists.apache.org/thread.html/dd4b325cdb261183dbf5ce913c102920a8f09c26dae666a98309165b%40%3Cnotifications.ofbiz.apache.org%3E
- lists.apache.org/thread.html/f4d48b32ef2b6aa49c8830241a9475da5b46e451f964b291c7a0a715%40%3Cdev.tomcat.apache.org%3E
- lists.apache.org/thread.html/r3bbb800a816d0a51eccc5a228c58736960a9fffafa581a225834d97d%40%3Cdev.tomcat.apache.org%3E
- lists.apache.org/thread.html/r48c1444845fe15a823e1374674bfc297d5008a5453788099ea14caf0%40%3Cdev.tomcat.apache.org%3E
- lists.apache.org/thread.html/r6ccee4e849bc77df0840c7f853f6bd09d426f6741247da2b7429d5d9%40%3Cdev.tomcat.apache.org%3E
- lists.apache.org/thread.html/r6d03e45b81eab03580cf7f8bb51cb3e9a1b10a2cc0c6a2d3cc92ed0c%40%3Cannounce.apache.org%3E
Vendor advisories and official records. Exploit/PoC links are deliberately left out.