Skip to content
OpenAdvisories
High · 8.1 Scanner template Public exploit CVE-2019-0232 EUVD-2019-0411GHSA-8vmx-qmch-mpqg

Apache Tomcat OS Command Injection vulnerability

Published Apr 15, 2019 · Updated Nov 2, 2026 · Assigned by apache

Description

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/).

Affected products

VendorProductAffectedFixed
Apache Tomcat 9.0.0.M1 to 9.0.17, 8.5.0 to 8.5.39, 7.0.0 to 7.0.93 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Red Hat JBoss Web Server 5 jws5-ecj 4.12.0-1.redhat_1.1.el6jws RHSA-2019:3929
Red Hat JBoss Web Server 5 jws5-javapackages-tools +1 3.4.1-5.15.11.el6jws RHSA-2019:3929
Red Hat JBoss Web Server 5 jws5-jboss-logging 3.3.2-1.Final_redhat_00001.1.el6jws RHSA-2019:3929
Red Hat JBoss Web Server 5 jws5-mod_cluster +1 1.4.1-1.Final_redhat_00001.2.el6jws RHSA-2019:3929
Red Hat JBoss Web Server 5 jws5-tomcat +9 9.0.21-10.redhat_4.1.el6jws RHSA-2019:3929
Red Hat JBoss Web Server 5 jws5-tomcat-native 1.2.21-34.redhat_34.el6jws RHSA-2019:3929
Red Hat JBoss Web Server 5 jws5-tomcat-vault +1 1.1.8-1.Final_redhat_1.1.el6jws RHSA-2019:3929

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

Exploit-DB 1

GitHub 15 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.apache.tomcat.embed:tomcat-embed-core >= 9.0.0.M1, < 9.0.17 9.0.17 GHSA-8vmx-qmch-mpqg
Maven org.apache.tomcat.embed:tomcat-embed-core >= 8.0.0, < 8.5.40 8.5.40 GHSA-8vmx-qmch-mpqg
Maven org.apache.tomcat.embed:tomcat-embed-core >= 7.0.0, < 7.0.94 7.0.94 GHSA-8vmx-qmch-mpqg

Advisories 2

References