CVE-2026-49286
Published:June 19, 2026
Updated:June 29, 2026
PhpWeasyPrint is a PHP library allowing PDF generation from a URL or an HTML page. Prior to version 2.6.0, "pontedilana/php-weasyprint" guarded the output filename against the "phar://" stream wrapper with a case-sensitive blacklist. PHP stream wrappers are case-insensitive, so "PHAR://", "Phar://", etc. bypass the check and reach "fileExists()" ("file_exists()") in "prepareOutput()". On PHP 7 (which the library still supports — PHP 7.4+), this triggers deserialization of a crafted PHAR archive's metadata, leading to remote code execution. This is the patch-bypass of CVE-2023-28115. The same issue and fix were handled upstream in KnpLabs/snappy (GHSA-92rv-4j2h-8mjj). PhpWeasyPrint version 2.6.0 contains a patch for the issue.
Affected Packages
https://github.com/pontedilana/php-weasyprint.git (GITHUB):
Affected version(s) >=0.9.0 <2.6.0Fix Suggestion:
Update to version 2.6.0pontedilana/php-weasyprint (PHP):
Affected version(s) >=0.9.0 <2.6.0Fix Suggestion:
Update to version 2.6.0Related Resources (4)
Do you need more information?
Contact UsCVSS v4
Base Score:
9.2
Attack Vector
NETWORK
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
8.1
Attack Vector
NETWORK
Attack Complexity
HIGH
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Deserialization of Untrusted Data
EPSS
Base Score:
0.56