CVE-2025-66516 is an XML external entity injection in Apache Tika, triggered by a crafted XFA file inside a PDF. It covers tika-core 1.13 to 3.2.1, tika-pdf-module 2.0.0 to 3.2.1 and tika-parsers 1.13 to 1.28.5. The fix is in tika-core 3.2.2 or later. The record scores it 8.4.
What's affected
- Products: Apache Tika modules tika-core (1.13 to 3.2.1), tika-pdf-module (2.0.0 to 3.2.1) and tika-parsers (1.13 to 1.28.5).
- Fixed: the record says the vulnerability and its fix are in tika-core, and that users who upgraded the PDF module but not tika-core to 3.2.2 or later are still vulnerable.
- 1.x line: the record notes that in Tika 1.x releases the PDF parser lives in tika-parsers. It does not give a fixed 1.x version, so check the Apache announcement.
- Relationship: this CVE covers the same bug as CVE-2025-54988 but widens the list of affected packages.
Wording and score differ. The description calls it a "Critical XXE" while the record's CVSS score is 8.4, which is High, with a local attack vector. We used the score. We could not read the Apache mailing list thread from a script, so we relied on the record for versions, and you should confirm them in the Apache announcement.
How to check if you're exposed
List which Tika artifacts and versions your build resolves.
mvn dependency:tree -Dincludes=org.apache.tika
gradle dependencies | grep -i tika
Look for tika-core below 3.2.2 even when your PDF module looks current. Also check bundled copies, for example inside application servers, search engines or document pipelines such as Solr or Elasticsearch ingest tools that embed Tika, and inside container images.
What to do now
- Upgrade tika-core to 3.2.2 or later, and upgrade tika-pdf-module with it.
- On the 1.x line, check the Apache announcement for the fix path, because the record does not state a fixed 1.x release. Plan a move to a supported line.
- Search for transitive and shaded copies of Tika in your applications and container images.
- Until you upgrade, avoid parsing PDFs from untrusted sources with Tika, or isolate the parser in a sandbox without network or file access.
- Disable external entity resolution in any XML parser you control.
- Run a full dependency scan. Paste your manifests into the free in-browser scan at gold.safeguard.sh/scan to see which of your dependencies carry this CVE, and use reachability analysis to separate the services that actually call the affected code from the ones that only list the package.
Why it matters
XML external entity injection happens when an XML parser is allowed to follow references to external resources defined inside the document. The record tags it CWE-611. In Tika, a PDF can carry an XFA form, which is XML, and a crafted one can make the parser fetch or read things it should not, such as local files.
The lesson from this CVE is about where a fix lives. The first CVE named the PDF module, but the code that needed fixing was in tika-core, so teams who upgraded only the module stayed exposed. Always upgrade the whole family of related artifacts together. The record does not list exploitation in the wild, and the CVE is not on CISA KEV.
Try it yourself
Click through it at your own pace, or open it full screen.
Quick check
Is upgrading only the PDF module enough?
No. The record says the fix is in tika-core 3.2.2 or later, and a PDF module upgrade alone leaves you vulnerable.
How does this relate to CVE-2025-54988?
It covers the same underlying bug and expands the affected packages to include tika-core and tika-parsers 1.x.
Sources
Last reviewed: 18 October 2026.