CVE-2026-49358 json
PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles
published 2026-06-19 4 mo ago modified 2026-10-25 14 d ago also GHSA-5g9f-cwwg-4p8g , EUVD-2026-38036
- cvss
- 3.0
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 5%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- packagist pontedilana/php-weasyprint 2.6.0
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 4 mo ago
Exploit prediction
0.17% chance of exploitation in the next 30 days, higher than 5% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/pontedilana/php-weasyprint/security/advisories/GHSA-5g9f-cwwg-4p8g referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.0 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L |
| GitHub | 3.1 | 3.0 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | pontedilana/php-weasyprint | <2.6.0 |
2.6.0 |
Affected products
- pontedilana php-weasyprint
Classification
- Weakness
-
- CWE-73 External Control of File Name or Path
References
-
github.com
/pontedilana/php-weasyprint/commit/6d328ffd3bcb800c7c2e8a594b1bff0c099c9391
web
-
github.com
/pontedilana/php-weasyprint/security/advisories/GHSA-5g9f-cwwg-4p8g
exploit, web
-
github.com
/KnpLabs/snappy/security/advisories/GHSA-87qc-37cw-84h4
web
-
github.com
/pontedilana/php-weasyprint/releases/tag/2.6.0
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-49358
advisory
-
github.com
/pontedilana/php-weasyprint
package
Sources
- CVE List CVE-2026-49358
- GitHub Advisory GHSA-5g9f-cwwg-4p8g
- NVD CVE-2026-49358
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.