CVE-2018-17197: Tika parsers Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-3448-vfvv-xp9g
CVSS 6.5
CWE-835
Published
Advisory Summary

CVE-2018-17197 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Tika parsers libraries in the Maven ecosystem. The issue involves apache tika denial of service due to infinite loop in tika's sqlite3parser. Remediation is available by upgrading affected packages to version 1.20.

CVE-2018-17197 at a Glance

CVE Identifier CVE-2018-17197
GHSA Identifier GHSA-3448-vfvv-xp9g
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product Tika parsers
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2018-17197

To remediate this vulnerability, upgrade all affected Tika parsers dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.tika:tika-parsers fixed: 1.20
<dependency>
    <groupId>org.apache.tika</groupId>
    <artifactId>tika-parsers</artifactId>
    <version>1.20</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.tika

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2018-17197, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.tika

Analyze the terminal output to locate any version of Tika parsers in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.20), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.tika command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Tika parsers, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A carefully crafted or corrupt sqlite file can cause an infinite loop in Apache Tika's SQLite3Parser in versions 1.8-1.19.1 of Apache Tika.

CVE-2018-17197 Affected Tika parsers Versions

1 component(s)
Fixed Versions:
1.20
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.tika:tika-parsers
Maven
≥ 1.8
< 1.20
1.20

References

Frequently Asked Questions

What is CVE-2018-17197?
CVE-2018-17197 is a security vulnerability in Tika parsers involving Apache Tika Denial of Service due to Infinite Loop in Tika's SQLite3Parser under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which Tika parsers versions are affected?
Affected versions include releases prior to 1.20 across affected packages: org.apache.tika:tika-parsers.
What version fixes CVE-2018-17197?
Upgrading to 1.20 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tika-parsers affected?
Yes, org.apache.tika:tika-parsers is affected in releases prior to 1.20. Upgrade your dependency to 1.20 or later.
What is the CVSS score of CVE-2018-17197?
CVE-2018-17197 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2018-17197?
CVE-2018-17197 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check Maven dependencies for CVE-2018-17197?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.tika'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3448-vfvv-xp9g",
  "modified" : "2023-09-27T11:10:06Z",
  "published" : "2018-12-26T17:45:07Z",
  "aliases" : [ "CVE-2018-17197" ],
  "summary" : "Apache Tika Denial of Service due to Infinite Loop in Tika's SQLite3Parser",
  "details" : "A carefully crafted or corrupt sqlite file can cause an infinite loop in Apache Tika's SQLite3Parser in versions 1.8-1.19.1 of Apache Tika.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tika:tika-parsers"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8"
      }, {
        "fixed" : "1.20"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-17197"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-3448-vfvv-xp9g"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/7c021a4ea2037e52e74628e17e8e0e2acab1f447160edc8be0eae6d3@%3Cdev.tika.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r204ba2a9ea750f38d789d2bb429cc0925ad6133deea7cbc3001d96b5@%3Csolr-user.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/106293"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:53:58Z",
    "nvd_published_at" : null
  }
}