Rapid7 Vulnerability & Exploit Database

Apache Tika Header Command Injection

Back to Search

Apache Tika Header Command Injection

Disclosed
04/25/2018
Created
08/15/2019

Description

This module exploits a command injection vulnerability in Apache Tika 1.15 - 1.17 on Windows. A file with the image/jp2 content-type is used to bypass magic bytes checking. When OCR is specified in the request, parameters can be passed to change the parameters passed at command line to allow for arbitrary JScript to execute. A JScript stub is passed to execute arbitrary code. This module was verified against version 1.15 - 1.17 on Windows 2012. While the CVE and finding show more versions vulnerable, during testing it was determined only > 1.14 was exploitable due to jp2 support being added.

Author(s)

  • h00die
  • David Yesland
  • Tim Allison

Platform

Windows

Development

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/apache_tika_jp2_jscript
msf exploit(apache_tika_jp2_jscript) > show targets
    ...targets...
msf exploit(apache_tika_jp2_jscript) > set TARGET < target-id >
msf exploit(apache_tika_jp2_jscript) > show options
    ...show and set options...
msf exploit(apache_tika_jp2_jscript) > 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

;