CVE‑2025‑66516: Critical XXE in Apache Tika (PDF Uploads at R
Apache Tika's XML parser did not sufficiently restrict external entity resolution when processing XFA content inside PDFs, allowing a crafted PDF to make the parser read local files or call internal HTTP endpoints. An attacker could use this to disclose server files, perform SSRF against internal services, and in some setups potentially reach code execution.
CVE‑2025‑66516 is a maximum‑severity XXE vulnerability in Apache Tika that lets attackers weaponize PDFs with malicious XFA content to exfiltrate data, perform SSRF, and potentially reach remote code execution. It carries a CVSS v4 score of 10.0, has broad impact across multiple Tika modules, and is especially…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the XML parser used for XFA content in tika-core did not disable or sufficiently restrict external entity resolution, so attacker-controlled XML inside a PDF could define external entities.
Impact
An attacker could read local files from the server, make requests to internal services and cloud metadata endpoints, and potentially cause denial of service or remote code execution depending on the environment; the text notes there is no confirmed exploitation in the wild and EPSS is low.
What the attacker needed
Ability to submit a crafted PDF; Tika parses the PDF; no authentication required
The fix
The flaw was fixed by upgrading to tika-core 3.2.2 or later, tika-pdf-module 3.2.2 or later, and tika-parsers 2.0.0 or later, which correctly disable unsafe entity resolution for XFA content.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When a program reads an XML document, it can be told to include content from elsewhere, such as a local file or a web address. If the program does not block this, an attacker who controls the XML can make the server fetch things it should not. Here, a PDF containing a special form of XML called XFA could make Apache Tika read local files or contact internal services.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.