Apache Tika core: Improper Restriction of XML External Entity Reference
CVE-2025-66516 is a critical-severity improper restriction of XML external entity reference vulnerability in Apache Tika core from Apache, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected Apache Tika core versions: 1.13 through 3.2.1. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 89% chance of exploitation within 30 days, which is in the top 0.22% of all scored CVEs.
Exploitation in the next 30 days is more likely than not, according to EPSS.
What to do
- Update Apache Tika parsers to 2.0.0 or a later version.
- Update Tika to 3.2.2 or a later version.
- Read the advisory on lists.apache.org for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Apache | Apache Tika core | 1.13 through 3.2.1 | Not stated |
| Apache | Apache Tika parsers | 1.13 up to, but not including, 2.0.0 | 2.0.0 |
| Apache | Apache Tika PDF parser module | 2.0.0 through 3.2.1 | Not stated |
| Apache | Tika | 1.13 up to, but not including, 3.2.2 | 3.2.2 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.4 | High | CNA (apache.org) |
| CVSS 3.1 | 9.8 | Critical | NVD |
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: 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 developers prevent this class of flaw
- Many XML parsers and validators can be configured to disable external entity expansion.
More Improper Restriction of XML External Entity Reference vulnerabilities (CWE-611)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Third-party and government advisories
- cve.org/CVERecord?id=CVE-2025-54988Third Party Advisory
Recent Improper Restriction of XML External Entity Reference vulnerabilities
- 9.8 Critical severity
- 7.1 High severity
- 7.5 High severity
- 7.5 High severity
- 9.1 Critical severity
- 9.1 Critical severity
Spotted an error? Tell us.