{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-49359","id":"CVE-2026-49359","title":"PhpWeasyPrint vulnerable to SSRF and local file disclosure via the attachment option","description":"PhpWeasyPrint is a PHP library allowing PDF generation from a URL or an HTML page. Prior to version 2.6.0, `pontedilana/php-weasyprint` fetches the content of option values server-side via `file_get_contents()` when the value looks like a URL, without restricting the URL scheme. The `attachment` option of `Pdf` is the reachable sink: any value that passes `isOptionUrl()` (`filter_var(..., FILTER_V","descriptionLong":"PhpWeasyPrint is a PHP library allowing PDF generation from a URL or an HTML page. Prior to version 2.6.0, `pontedilana/php-weasyprint` fetches the content of option values server-side via `file_get_contents()` when the value looks like a URL, without restricting the URL scheme. The `attachment` option of `Pdf` is the reachable sink: any value that passes `isOptionUrl()` (`filter_var(..., FILTER_VALIDATE_URL)`) is downloaded by the PHP process and embedded into the generated PDF. Because `FILTER_VALIDATE_URL` accepts `http`, `https`, `ftp`, `file` and PHP stream wrappers such as `php://`, an attacker who can influence the `attachment` value reaches both a **Server-Side Request Forgery** primitive (e.g. internal HTTP endpoints, cloud metadata) and a local file disclosure primitive (`file://`, `php://filter/...`), with the fetched bytes exfiltrated as a PDF attachment. This is the same class of issue KnpLabs/snappy patched for its `xsl-style-sheet` option in GHSA-c5fp-p67m-gq56. The library is documented as a one-to-one substitute for KnpLabs/snappy and shares the same code shape. PhpWeasyPrint version 2.6.0 contains a patch for the issue.","published":"2026-06-19T17:06:12.737Z","updated":"2026-10-28T02:31:13.730739568Z","reserved":"2026-05-29T14:35:45.904Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["pontedilana php-weasyprint"],"affectedProducts":[{"vendor":"pontedilana","product":"php-weasyprint","defaultStatus":null,"versions":[{"version":"< 2.6.0","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"pontedilana/php-weasyprint","purl":"pkg:composer/pontedilana/php-weasyprint","ranges":["<2.6.0"],"fixed":["2.6.0"],"advisory":"GHSA-x8g9-h984-pc36"}],"cwes":["CWE-918"],"aliases":["GHSA-x8g9-h984-pc36"],"references":[{"url":"https://github.com/pontedilana/php-weasyprint/security/advisories/GHSA-x8g9-h984-pc36","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/KnpLabs/snappy/security/advisories/GHSA-c5fp-p67m-gq56","tags":["x_refsource_MISC","advisory","web"]},{"url":"https://github.com/pontedilana/php-weasyprint/commit/9582dcf119a405276cf55e9e10bc577a887792cb","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/pontedilana/php-weasyprint/releases/tag/2.6.0","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/49xxx/CVE-2026-49359.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49359","tags":["advisory"]},{"url":"https://github.com/pontedilana/php-weasyprint","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00422,"epssPercentile":0.37291,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-49359","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49359","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-49359","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-x8g9-h984-pc36","ok":true,"note":"GHSA-x8g9-h984-pc36"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-49359","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}