# CVE-2026-49286: PhpWeasyPrint vulnerable to PHAR deserialization via output filename (CVE-2023-28115 case-insensitive bypass)

- Severity: High 8.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.73%, higher than 55% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-19T17:03:58.118Z
- Modified: 2026-10-25T23:10:00.167Z
- Also known as: GHSA-2fmj-p74r-3wjm
- Weaknesses: CWE-502
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- pontedilana php-weasyprint: < 2.6.0
- pontedilana/php-weasyprint (Packagist): before 2.6.0

## Every score

- GitHub_M: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/pontedilana/php-weasyprint/security/advisories/GHSA-2fmj-p74r-3wjm> (exploit, web)
- <https://github.com/KnpLabs/snappy/security/advisories/GHSA-92rv-4j2h-8mjj> (web)
- <https://github.com/pontedilana/php-weasyprint/commit/d1aa487722b5a3cab9b222b85fdb5608a5a550c3> (web)
- <https://github.com/pontedilana/php-weasyprint/releases/tag/2.6.0> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-49286> (advisory)
- <https://github.com/pontedilana/php-weasyprint> (package)

## Sources

- CVE List: [CVE-2026-49286](https://www.cve.org/CVERecord?id=CVE-2026-49286), CVE Terms of Use, modified 2026-06-22
- GitHub Advisory Database: [GHSA-2fmj-p74r-3wjm](https://github.com/advisories/GHSA-2fmj-p74r-3wjm), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-49286](https://nvd.nist.gov/vuln/detail/CVE-2026-49286), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-49286 · Whole record: https://cve.day/CVE-2026-49286.json · Rebuilt by cve.day 2026-11-25T22:59:25.273Z
