CVE-2026-49358
Published:June 19, 2026
Updated:June 28, 2026
PhpWeasyPrint is a PHP library allowing PDF generation from a URL or an HTML page. Prior to version 2.6.0, "AbstractGenerator::$temporaryFiles" is a public array, and "removeTemporaryFiles()" — invoked from "__destruct()" and from a registered shutdown function — calls "unlink()" on every entry without verifying that the path is contained within the temporary folder. Any code holding a reference to a generator instance can push an arbitrary path into the array and have it deleted on script shutdown. This mirrors the KnpLabs/snappy issue GHSA-87qc-37cw-84h4. 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:
1.8
Attack Vector
LOCAL
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
HIGH
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
LOW
Vulnerable System Availability
LOW
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
3
Attack Vector
LOCAL
Attack Complexity
HIGH
Privileges Required
HIGH
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
LOW
Availability
LOW
Weakness Type (CWE)
External Control of File Name or Path
EPSS
Base Score:
0.11