CVE-2026-49358

PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles

LOW
3
CVSS Score
Published: June 19, 2026 at 02:52 PM UTC
Updated: October 25, 2026 at 11:10 PM UTC
1 product affected across 1 vendorPhpWeasyPrint

Using php-weasyprint by pontedilana?

Get instant alerts when new vulnerabilities affect php-weasyprint - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
LOW3
Exploit prediction
EPSS 0.2%
SSVC
PoC

Description

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 2.6.0
Affected range stops below 2.6.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

3LOWGitHub_M
Attack Vector
LOCAL
Complexity
HIGH
Privileges
HIGH
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
LOW
Availability
LOW
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-73

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card