{"id":"CVE-2026-49286","sourceIdentifier":"security-advisories@github.com","published":"2026-06-19T18:16:19.487","lastModified":"2026-10-25T23:10:00.167","vulnStatus":"Deferred","cveTags":[],"descriptions":[{"lang":"en","value":"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."},{"lang":"es","value":"PhpWeasyPrint es una biblioteca PHP que permite la generación de PDF desde una URL o una página HTML. Antes de la versión 2.6.0, “pontedilana/php-weasyprint” protegía el nombre de archivo de salida contra el stream wrapper “phar://” con una lista negra sensible a mayúsculas y minúsculas. Los stream wrappers de PHP no distinguen entre mayúsculas y minúsculas, por lo que “PHAR://”, “Phar://”, etc. eluden la verificación y alcanzan “fileExists()” (“file_exists()”) en “prepareOutput()”. En PHP 7 (que la biblioteca aún soporta - PHP 7.4+), esto desencadena la deserialización de los metadatos de un archivo PHAR manipulado, lo que lleva a la ejecución remota de código. Este es el bypass del parche de CVE-2023-28115. El mismo problema y la misma solución se gestionaron upstream en KnpLabs/snappy (GHSA-92rv-4j2h-8mjj). La versión 2.6.0 de PhpWeasyPrint contiene un parche para el problema."}],"affected":[{"source":"security-advisories@github.com","affectedData":[{"vendor":"pontedilana","product":"php-weasyprint","versions":[{"version":"< 2.6.0","status":"affected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.1,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":2.2,"impactScore":5.9}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-06-22T14:22:36.863995Z","id":"CVE-2026-49286","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"security-advisories@github.com","type":"Secondary","description":[{"lang":"en","value":"CWE-502"}]}],"references":[{"url":"https://github.com/KnpLabs/snappy/security/advisories/GHSA-92rv-4j2h-8mjj","source":"security-advisories@github.com"},{"url":"https://github.com/pontedilana/php-weasyprint/commit/d1aa487722b5a3cab9b222b85fdb5608a5a550c3","source":"security-advisories@github.com"},{"url":"https://github.com/pontedilana/php-weasyprint/releases/tag/2.6.0","source":"security-advisories@github.com"},{"url":"https://github.com/pontedilana/php-weasyprint/security/advisories/GHSA-2fmj-p74r-3wjm","source":"security-advisories@github.com"},{"url":"https://github.com/pontedilana/php-weasyprint/security/advisories/GHSA-2fmj-p74r-3wjm","source":"134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}