CVE-2026-49358: pontedilana php-weasyprint · External Control of File Name or Path
Affects pontedilana php-weasyprintSource CVE Database V5
Not known to be exploited · CVSS 3.0 Low : upgrade to 2.6.0 when convenient.
Data as of 1 Nov 2026, 22:58 UTC
- EPSS
- 0.1% chance of exploitation in 30 days – higher than 5% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 2.6.0
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:LExploitation evidence
Disclosed: evidence found.
CVE published 19 Jun 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 1 Nov 2026.
What to do
Upgrade php-weasyprint and pontedilana/php-weasyprint to 2.6.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| pontedilanaphp-weasyprint | Affected
| Fixed in
|
Packagistpontedilana/php-weasyprintpkg:composer/pontedilana/php-weasyprintOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade to PhpWeasyPrint version 2.6.0 or later, which contains a patch fixing this vulnerability. No other official remediation or temporary fixes are documented. Until upgrading, avoid exposing the AbstractGenerator::$temporaryFiles array to untrusted code.
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.
References
- github.com/pontedilana/php-weasyprint/security/advisories/GHSA-5g9f-cwwg-4p8g (opens in a new tab)
- github.com/KnpLabs/snappy/security/advisories/GHSA-87qc-37cw-84h4 (opens in a new tab)
- github.com/pontedilana/php-weasyprint/commit/6d328ffd3bcb800c7c2e8a594b1bff0c099c9391 (opens in a new tab)
- github.com/pontedilana/php-weasyprint/releases/tag/2.6.0 (opens in a new tab)