CVE-2026-49358
published low CVSS 3.1 · 3.0PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| pontedilana | — | php-weasyprint< 2.6.0 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 3.0 / 10
- Severity
- low
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| pontedilana | php-weasyprint | < 2.6.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-73 CWE-73: External Control of File Name or Path
References
4- https://github.com/KnpLabs/snappy/security/advisories/GHSA-87qc-37cw-84h4
- https://github.com/pontedilana/php-weasyprint/commit/6d328ffd3bcb800c7c2e8a594b1bff0c099c9391
- https://github.com/pontedilana/php-weasyprint/releases/tag/2.6.0
- https://github.com/pontedilana/php-weasyprint/security/advisories/GHSA-5g9f-cwwg-4p8g
Provider assertions
2GitHub_M · cna
PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- f53c5bfe978031ab4824b33e4e2ea79b5ba925dcaf9328cb763753249b4cd1c2
- Ingested
- 23 Sep 2026, 09:17:57 UTC
- Source record
- Official CVE record