Rapid7 Vulnerability & Exploit Database

Apache Tomcat CGIServlet enableCmdLineArguments Vulnerability

Back to Search

Apache Tomcat CGIServlet enableCmdLineArguments Vulnerability

Disclosed
04/10/2019
Created
07/02/2019

Description

This module exploits a vulnerability in Apache Tomcat's CGIServlet component. When the enableCmdLineArguments setting is set to true, a remote user can abuse this to execute system commands, and gain remote code execution.

Author(s)

  • Yakov Shafranovich
  • sinn3r <sinn3r@metasploit.com>

Platform

Windows

Architectures

x86, x64

Development

References

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/windows/http/tomcat_cgi_cmdlineargs
msf exploit(tomcat_cgi_cmdlineargs) > show targets
    ...targets...
msf exploit(tomcat_cgi_cmdlineargs) > set TARGET < target-id >
msf exploit(tomcat_cgi_cmdlineargs) > show options
    ...show and set options...
msf exploit(tomcat_cgi_cmdlineargs) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;