CVE-2026-49358 | PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles

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.

Published: 2026-06-19 Last update: 2026-06-22 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2026-49358 is rated Low Risk (12.6/100): CVSS Low severity, with low exploitation likelihood (EPSS 0.11%). Mandatory action: Low composite risk—no urgent action required; patch on your normal maintenance cycle and revisit priority if CVSS or EPSS increases.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2026-49358

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-23 0.11%

Full EPSS history (1 record total)

Common vulnerability scoring system (CVSS) metrics for CVE-2026-49358

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
3.0 3.1 LOW
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:H)
They need powerful rights—admin, root, or similar—before this pays off.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
0.5 2.5 [email protected]

Weakness enumeration for CVE-2026-49358

GitHub Security Advisory for CVE-2026-49358

GHSA-5g9f-cwwg-4p8g · Severity: low · Ecosystem: composer — PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles

Affected software / configurations for CVE-2026-49358

Vendor Product Version Raw CPE
No affected products in dataset.

References for CVE-2026-49358

cvelogic Threat Intelligence