PhpWeasyPrint vulnerable to PHAR deserialization via output filename (CVE-2023-28115 case-insensitive bypass)
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-502.
Summary
PhpWeasyPrint is a PHP library allowing PDF generation from a URL or an HTML page. Prior to version 2.6.0, `pontedilana/php-weasyprint` guarded the output filename against the `phar://` stream wrapper with a case-sensitive blacklist. PHP stream wrappers are case-insensitive, so `PHAR://`, `Phar://`, etc. bypass the check and reach `fileExists()` (`file_exists()`) in `prepareOutput()`. On PHP 7 (which the library still supports — PHP 7.4+), this triggers deserialization of a crafted PHAR archive's metadata, leading to remote code execution. This is the patch-bypass of CVE-2023-28115. The same issue and fix were handled upstream in KnpLabs/snappy (GHSA-92rv-4j2h-8mjj). PhpWeasyPrint version 2.6.0 contains a patch for the issue.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pontedilana | php-weasyprint | before 2.6.0 | 2.6.0 | Patch available | CNA |
| — | pontedilana/php-weasyprint (Packagist) | before 2.6.0 | 2.6.0 | Patch available | GHSA-2fmj-p74r-3wjm |
- php-weasyprint Vendorpontedilana Affected before 2.6.0 Fixed in 2.6.0 Patch available CNA
- pontedilana/php-weasyprint (Packagist) Vendor— Affected before 2.6.0 Fixed in 2.6.0 Patch available GHSA-2fmj-p74r-3wjm
Remediation
- Fix · CNA php-weasyprint (pontedilana) Fixed in 2.6.0
- Fix · GHSA-2fmj-p74r-3wjm pontedilana/php-weasyprint (Packagist) Fixed in 2.6.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-49286
- 2026-10-03 Alias added: GHSA-2fmj-p74r-3wjm
References
Other 5
- https://github.com/pontedilana/php-weasyprint/security/advisories/GHSA-2fmj-p74r-3wjm
- https://github.com/KnpLabs/snappy/security/advisories/GHSA-92rv-4j2h-8mjj
- https://github.com/pontedilana/php-weasyprint/commit/d1aa487722b5a3cab9b222b85fdb5608a5a550c3
- https://github.com/pontedilana/php-weasyprint/releases/tag/2.6.0
- https://github.com/pontedilana/php-weasyprint
More pontedilana vulnerabilities
- TI-2026-36455 OS command injection in pontedilana php-weasyprint CVSS 3.1HIGH 8.2
- TI-2026-36532 PhpWeasyPrint vulnerable to SSRF and local file disclosure via the attachment option CVSS 3.1MEDIUM 6.5
- TI-2026-36531 PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles CVSS 3.1LOW 3.0
Sources
- CVE-2026-49286 · CVE Program
- CVE-2026-49286 · NVD
- FIRST EPSS
- GHSA-2fmj-p74r-3wjm · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences