Summary
veraPDF-validatio: Use of Default `DocumentBuilderFactory` leads to XXE When Processing Untrusted PDFs
Advisory details
Summary
veraPDF-validation has an XML External Entity (XXE) vulnerability in two PDF parsing paths (validate and GFPDAcroForm.getdynamicRender()). A malicious/crafted PDF supplied to a veraPDF consumer can lead to the expansion of external entities while parsing rich-text annotation/form-field values or XFA configurations, allowing local file disclosure and potentially outbound network requests depending on the runtime (host) environment.
Details
Consumers that utilise either the PDFAValidator.validate(...) or GFPDAcroForm(acroForm).getdynamicRender() APIs to process untrusted PDFs are vulnerable to XXE exploits.
Both vulnerable paths share the same root cause: the underlying source binds a default DocumentBuilderFactory and immediately calls newDocumentBuilder() which does not disable parsing of DTDs, external entities, XInclude, or external resource access directives in XML schemas.
This is an XXE vulnerability affecting applications that use veraPDF's affected APIs to parse or validate untrusted PDFs.
An attacker could craft a PDF that includes crafted XML external entities that when processed by vulnerable consumers could lead to local file disclosure and server-side outbound requests to attacker-controlled endpoints, depending on JVM XML parser behavior and network controls on the host.
References
- https://github.com/advisories/GHSA-cg9x-g3gm-h5h6
- https://github.com/veraPDF/veraPDF-validation/security/advisories/GHSA-cg9x-g3gm-h5h6
- https://github.com/veraPDF/veraPDF-validation/pull/730
- https://github.com/veraPDF/veraPDF-validation/commit/94caa46c1a594512247fbd46c808edae39469542
- https://github.com/veraPDF/veraPDF-validation/commit/cacd9436d0de40b0e58cc7d2dbb06451619e61ec
Related vulnerabilities
All Supply chain →- HIGHCVE-2026-55848
MapFish Print has XXE that allows reading arbitrary files of certain types
- HIGHCVE-2026-54078
veraPDF Validation XXE via Rich Text
- HIGHCVE-2026-54079
veraPDF Validation XXE via XFA
- HIGHCVE-2026-56817
Netty XML: Injection / Risky Sink — unconfigured XML factory with active DTD and entity handling
- HIGHGHSA-7q9c-hpx7-9cwm
TypeSpec: Unauthenticated Remote Shutdown of Spector Mock Server via POST /.admin/stop
- CRITICALCVE-2026-73842
OpenChoreo: cluster-gateway internal proxy performs no caller authentication and is not read-only — data-plane Secret disclosure and arbitrary Kubernetes mutation