# CVE-2025-66516: Apache Tika has XXE vulnerability

> Attackers can exploit XML External Entity injection in Apache Tika via crafted PDFs to read sensitive data or cause denial of service.

- **Severity:** High 8.4 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Dec 2025
- **Updated:** 26 Feb 2026
- **Also known as:** CLEANSTART-2026-HF44570, CLEANSTART-2026-TY92460, DEBIAN-CVE-2025-66516, GHSA-f58c-gq56-vjjf, MINI-4x4r-vj96-gqmj, MINI-544p-mwgc-mh5g, MINI-5q4j-f2qv-59xg, MINI-76c2-w3hj-36p4, MINI-94fx-f84v-2vjr, MINI-f7c9-pf88-pg23, MINI-mh68-53jr-53ff, MINI-qw3j-wr6c-8m3g, MINI-whq5-c289-8gqq, MINI-wr7v-5f3w-v7cw, MINI-xgxp-cqqc-j47x, ROOT-APP-MAVEN-CVE-2025-66516, UBUNTU-CVE-2025-66516

## What is CVE-2025-66516?

CVE-2025-66516 is a high-severity vulnerability in Apache Tika PDF parser module, published on 4 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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.

Weakness: CWE-611 (Improper Restriction of XML External Entity Reference)

## Which versions are affected by CVE-2025-66516?

6 open source packages ship an affected version, including org.apache.tika:tika-parser-pdf-module, org.apache.tika:tika-core and org.apache.tika:tika-parsers. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.tika:tika-parser-pdf-module` | Maven | From 2.0.0 | 3.2.2 |
| `org.apache.tika:tika-parser-pdf-module` | Maven | From 2.0.0 | 3.2.2 |
| `org.apache.tika:tika-core` | Maven | From 1.13 | 3.2.2 |
| `org.apache.tika:tika-core` | Maven | From 1.13 | 3.2.2 |
| `org.apache.tika:tika-parsers` | Maven | From 1.13 | 2.0.0 |
| `org.apache.tika:tika-parsers` | Maven | From 1.13 | 2.0.0 |

Products: Apache Tika.

## How do I fix CVE-2025-66516?

Upgrade org.apache.tika:tika-parser-pdf-module to 3.2.2 or later.

## Is CVE-2025-66516 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66516 exists.

Public exploit code:

- CVE-2025-66516 working exploit, scanner, explanation. (github_poc): https://github.com/chasingimpact/CVE-2025-66516-Writeup-POC
- A POC for the CVE-2025-66516 Apache Tika Vulnerability for educational purposes only (github_poc): https://github.com/sid6224/CVE-2025-66516-POC
- Elasticsearch ingest-attachment Apache Tika XFA XXE Local File Read (metasploit)
- https://github.com/intSheep/Tika-CVE-2025-66516-Lab (github_poc): https://github.com/intSheep/Tika-CVE-2025-66516-Lab
- Apache Tika - XML External Entity Injection (nuclei): http/cves/2025/CVE-2025-66516.yaml

## Other vulnerabilities in Apache Tika PDF parser module

- [CVE-2019-10088](https://insights.sbomify.com/CVE-2019-10088/): Allocation of Resources Without Limits or Throttling in Apache Tika (high 8.8)
- [CVE-2025-54988](https://insights.sbomify.com/CVE-2025-54988/): Apache Tika PDF parser module: XXE vulnerability in PDFParser's handling of XFA (high 8.4)
- [CVE-2018-1335](https://insights.sbomify.com/CVE-2018-1335/): Command injection in org.apache.tika:tika-core (high 8.1)
- [CVE-2019-10094](https://insights.sbomify.com/CVE-2019-10094/): Allocation of Resources Without Limits or Throttling in Apache Tika (high 7.8)
- [CVE-2016-4434](https://insights.sbomify.com/CVE-2016-4434/): Apache Tika does not properly initialize the XML parser or choose handlers (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-66516 and fix it if it is affected.

What it is: CVE-2025-66516 is a high-severity vulnerability in Apache Tika PDF parser module, published on 4 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66516 exists.

Affected packages and fixed versions:
- org.apache.tika:tika-parser-pdf-module (Maven): affected from 2.0.0; fixed in 3.2.2
- org.apache.tika:tika-parser-pdf-module (Maven): affected from 2.0.0; fixed in 3.2.2
- org.apache.tika:tika-core (Maven): affected from 1.13; fixed in 3.2.2
- org.apache.tika:tika-core (Maven): affected from 1.13; fixed in 3.2.2
- org.apache.tika:tika-parsers (Maven): affected from 1.13; fixed in 2.0.0
- org.apache.tika:tika-parsers (Maven): affected from 1.13; fixed in 2.0.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-66516/ (Markdown: https://insights.sbomify.com/CVE-2025-66516/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-66516
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-66516
- OSV: https://osv.dev/vulnerability/CVE-2025-66516

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-66516/
Summaries are generated and may contain mistakes; the official description above is the record.
