cbcvebase.
CVE-2018-1335
published 2018-04-25

CVE-2018-1335: From Apache Tika versions 1.7 to 1.17, clients could send carefully crafted headers to tika-server that could be used to inject commands into the command line…

PriorityP186high8.1CVSS 3.0
AVNACHPRNUINSUCHIHAH
ITWEXPLOITVulnCheck KEVInitial access
Exploited in the wild
EPSS
93.97%
99.8th percentile
From Apache Tika versions 1.7 to 1.17, clients could send carefully crafted headers to tika-server that could be used to inject commands into the command line of the server running tika-server. This vulnerability only affects those running tika-server on a server that is open to untrusted clients. The mitigation is to upgrade to Tika 1.18.

Affected

5 ranges
VendorProductVersion rangeFixed in
apachetika< 1.181.18
apachetika
apachetika>= 0 < 1.18-11.18-1
apache_software_foundationapache_tika
debiantika< tika 1.18-1 (bullseye)tika 1.18-1 (bullseye)

Detection & IOCsextracted from sources · hover to see the quote

port9998
url/meta
otherX-Tika-OCRTesseractPath: "cscript"
otherX-Tika-OCRLanguage: //E:Jscript
otherContent-type: image/jp2
commandvar oShell = WScript.CreateObject('WScript.Shell');var oExec = oShell.Exec("cmd /c whoami");
sigma
matchers: Content-Type: text/csv in response header AND org.apache.tika.parser.DefaultParser OR org.apache.tika.parser.gdal.GDALParse in body AND HTTP 200
  • Look for HTTP PUT requests to the /meta endpoint on port 9998 (default tika-server port) containing the headers X-Tika-OCRTesseractPath and X-Tika-OCRLanguage simultaneously — this is the exploit delivery pattern.
  • The exploit uses Content-type: image/jp2 to bypass magic bytes checking on the tika-server; flag PUT requests to /meta with this content type as suspicious.
  • The payload body contains a JScript stub using WScript.CreateObject('WScript.Shell') and oShell.Exec to run arbitrary commands; inspect PUT request bodies to /meta for WScript references.
  • Detect Apache Tika version exposure via the root endpoint response body matching 'Apache Tika (\d.[\d]+)' to identify vulnerable 1.15–1.17 instances.
  • The exploit uses certutil as the CmdStagerFlavor for staging payloads on Windows; monitor for certutil.exe spawned as a child process of tika-server (java.exe).
  • ·The vulnerability only affects tika-server exposed to untrusted clients; tika-core (library-only) usage is not affected, as confirmed by multiple Red Hat package assessments.
  • ·Although the CVE covers Tika 1.7–1.17, practical exploitation via the jp2 bypass was only confirmed for versions > 1.14 due to jp2 support being added in that version.
  • ·The Metasploit module and PoC exploit target Windows only; Linux/other OS exploitation paths are not demonstrated in available sources.

CVSS provenance

nvdv3.08.1HIGHCVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.09.3CRITICALAV:N/AC:M/Au:N/C:C/I:C/A:C
osv8.1HIGH
vulncheck8.1HIGH
vendor_apache8.1HIGH
vendor_debian8.1HIGH
vendor_redhat8.1HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.