
This project is used to verify CVE-2025-66516 (XML External Entity Injection Vulnerability in Apache Tika).
Apache Tika 3.2.1 and earlier versions, when parsing PDF files containing XFA forms, did not properly disable external entity loading, leading to an XXE vulnerability. An attacker can construct a malicious PDF file to read sensitive files on the server.
Run the org.example.ExploitGenerator class.
This program will generate poc-xxe.pdf in the current directory.
C:/Windows/win.ini/etc/passwdRun the org.example.VulnerabilityVerifier class.
This program uses Tika to parse the generated poc-xxe.pdf. If the vulnerability exists, the console will output the file content read (wrapped by HACKED_START and HACKED_END).
Upgrade Apache Tika to 3.3.0 or later.