Read the docs
TI-2026-36532 Aliases CVE-2026-49359GHSA-x8g9-h984-pc36

PhpWeasyPrint vulnerable to SSRF and local file disclosure via the attachment option

Priority MEDIUM 62CWE-918Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
Information disclosure
Confidentiality · integrity · availability
High · None · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-918 and the CVSS impact.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00422 36th percentileScored 2026-11-07
Fix Fixed php-weasyprint (pontedilana): 2.6.0pontedilana/php-weasyprint (Packagist): 2.6.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
pontedilanaphp-weasyprintbefore 2.6.02.6.0Patch availableCNA
—pontedilana/php-weasyprint (Packagist)before 2.6.02.6.0Patch availableGHSA-x8g9-h984-pc36
  • php-weasyprint Vendorpontedilana Affected before 2.6.0 Fixed in 2.6.0 Patch available CNA
  • pontedilana/php-weasyprint (Packagist) Vendor— Affected before 2.6.0 Fixed in 2.6.0 Patch available GHSA-x8g9-h984-pc36

Remediation

  • Fix · CNA php-weasyprint (pontedilana) Fixed in 2.6.0
  • Fix · GHSA-x8g9-h984-pc36 pontedilana/php-weasyprint (Packagist) Fixed in 2.6.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-49359
  2. 2026-10-03 Alias added: GHSA-x8g9-h984-pc36

References

  • TI-2026-36455 OS command injection in pontedilana php-weasyprint CVSS 3.1HIGH 8.2
  • TI-2026-36472 PhpWeasyPrint vulnerable to PHAR deserialization via output filename (CVE-2023-28115 case-insensitive bypass) CVSS 3.1HIGH 8.1
  • TI-2026-36531 PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles CVSS 3.1LOW 3.0

Sources