H3-2026-1031¶
Dompdf SVG Image Reference Local File Inclusion via Chroot Bypass Vulnerability
| Category | VULNERABILITY |
| Base Score | 7.5 |
Description¶
Dompdf validates SVG image references against its configured chroot directory using Helpers::build_url before resolving the file, but when that function cannot resolve a reference it returns an empty value and the caller continues instead of rejecting the request. SvgLib then passes the original, unvalidated reference directly to file_get_contents, which still resolves relative path segments against the real filesystem. Remote attackers can submit HTML containing an SVG image that references an unresolvable path, such as a nonexistent directory followed by parent directory traversal sequences, causing dompdf to read and embed a file from outside the configured chroot into the rendered PDF. The flaw affects any service that renders attacker-supplied HTML to PDF using an affected dompdf version.
Impact¶
Successful exploitation discloses the contents of arbitrary files readable by the PDF rendering process, embedded as an image inside the generated PDF output. Attackers can target configuration files, application secrets, or other sensitive data stored on the host filesystem. Any web application or service that converts user-supplied HTML to PDF with dompdf is exposed, including invoicing, reporting, and document generation platforms. Repeated probing lets attackers enumerate readable files and extract sensitive data without conventional log signatures.