Vulnerabilities in pkg:maven/org.apache.tika/tika-parser-pdf-module

PACKAGE
Advisory Identifier: GHSA-f58c-gq56-vjjf
Advisory Summary

CVE-2025-66516 is a CRITICAL apache tika has xxe vulnerability vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Tika core libraries in the Maven ecosystem. The issue involves apache tika has xxe vulnerability. Remediation is available by upgrading affected packages to version 3.2.2, 2.0.0.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.tika/tika-parser-pdf-module

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.tika/tika-parser-pdf-module. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-f58c-gq56-vjjf CVE-2025-66516 CRITICAL Apache Tika has XXE vulnerability
GHSA-p72g-pv48-7w9x CVE-2025-54988 CRITICAL Apache Tika XXE Vulnerability via Crafted XFA File Inside a PDF

CVE-2025-66516 at a Glance

CVE Identifier CVE-2025-66516
GHSA Identifier GHSA-f58c-gq56-vjjf
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Tika core
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2025-66516

To remediate this vulnerability, upgrade all affected Tika core 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-core fixed: 3.2.2
<dependency>
    <groupId>org.apache.tika</groupId>
    <artifactId>tika-core</artifactId>
    <version>3.2.2</version>
</dependency>
org.apache.tika:tika-parsers fixed: 2.0.0
<dependency>
    <groupId>org.apache.tika</groupId>
    <artifactId>tika-parsers</artifactId>
    <version>2.0.0</version>
</dependency>
org.apache.tika:tika-parser-pdf-module fixed: 3.2.2
<dependency>
    <groupId>org.apache.tika</groupId>
    <artifactId>tika-parser-pdf-module</artifactId>
    <version>3.2.2</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-2025-66516, 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 core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.2), 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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Tika core, 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

Critical XXE in Apache Tika tika-core (1.13-3.2.1), tika-pdf-module (2.0.0-3.2.1) and tika-parsers (1.13-1.28.5) modules on all platforms allows an attacker to carry out XML External Entity injection via a crafted XFA file inside of a PDF. This CVE covers the same vulnerability as in CVE-2025-54988. However, this CVE expands the scope of affected packages in two ways. First, while the entrypoint for the vulnerability was the tika-parser-pdf-module as reported in CVE-2025-54988, the vulnerability and its fix were in tika-core. Users who upgraded the tika-parser-pdf-module but did not upgrade tika-core to >= 3.2.2 would still be vulnerable. Second, the original report failed to mention that in the 1.x Tika releases, the PDFParser was in the "org.apache.tika:tika-parsers" module.

CVE-2025-66516 Affected Tika core Versions

3 component(s)
Fixed Versions:
3.2.22.0.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.tika:tika-core
Maven
≥ 1.13
< 3.2.2
3.2.2
org.apache.tika:tika-parsers
Maven
≥ 1.13
< 2.0.0
2.0.0
org.apache.tika:tika-parser-pdf-module
Maven
≥ 2.0.0
< 3.2.2
3.2.2

References

Frequently Asked Questions

What is CVE-2025-66516?
CVE-2025-66516 is a security vulnerability in Tika core involving Apache Tika has XXE vulnerability under CWE-611: Improper Restriction of XML External Entity Reference.
Which Tika core versions are affected?
Affected versions include releases prior to 3.2.2, 2.0.0 across affected packages: org.apache.tika:tika-core, org.apache.tika:tika-parsers, org.apache.tika:tika-parser-pdf-module.
What version fixes CVE-2025-66516?
Upgrading to 3.2.2, 2.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tika-core affected?
Yes, org.apache.tika:tika-core is affected in releases prior to 3.2.2. Upgrade your dependency to 3.2.2 or later.
Is tika-parsers affected?
Yes, org.apache.tika:tika-parsers is affected in releases prior to 2.0.0. Upgrade your dependency to 2.0.0 or later.
What CWE is associated with CVE-2025-66516?
CVE-2025-66516 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check Maven dependencies for CVE-2025-66516?
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-f58c-gq56-vjjf",
  "modified" : "2025-12-05T02:26:56Z",
  "published" : "2025-12-04T18:30:54Z",
  "aliases" : [ "CVE-2025-66516" ],
  "summary" : "Apache Tika has XXE vulnerability",
  "details" : "Critical XXE in Apache Tika tika-core (1.13-3.2.1), tika-pdf-module (2.0.0-3.2.1) and tika-parsers (1.13-1.28.5) modules on all platforms allows an attacker to carry out XML External Entity injection via a crafted XFA file inside of a PDF. \n\nThis CVE covers the same vulnerability as in CVE-2025-54988. However, this CVE expands the scope of affected packages in two ways. \n\nFirst, while the entrypoint for the vulnerability was the tika-parser-pdf-module as reported in CVE-2025-54988, the vulnerability and its fix were in tika-core. Users who upgraded the tika-parser-pdf-module but did not upgrade tika-core to >= 3.2.2 would still be vulnerable. \n\nSecond, the original report failed to mention that in the 1.x Tika releases, the PDFParser was in the \"org.apache.tika:tika-parsers\" module.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tika:tika-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.13"
      }, {
        "fixed" : "3.2.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.2.1"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tika:tika-parsers"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.13"
      }, {
        "fixed" : "2.0.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tika:tika-parser-pdf-module"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "3.2.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.2.1"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66516"
  }, {
    "type" : "WEB",
    "url" : "https://cve.org/CVERecord?id=CVE-2025-54988"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/tika"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/s5x3k93nhbkqzztp1olxotoyjpdlps9k"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-05T02:24:30Z",
    "nvd_published_at" : "2025-12-04T17:15:57Z"
  }
}