CVE-2026-49286
Beschrijving NL
PhpWeasyPrint is een PHP-bibliotheek waarmee PDF's kunnen worden gegenereerd vanaf een URL of een HTML-pagina. Vóór versie 2.6.0 bewaakte `pontedilana/php-weasyprint` de uitvoerbestandsnaam tegen de stroomwikkelaar `phar://` met een hoofdlettergevoelige zwarte lijst. PHP stream wrappers zijn hoofdlettergevoelig, dus `PHAR://`, `Phar://`, enz. omzeilen de controle en bereik `fileExists()` (`file_exists()`) in `prepareOutput()`. Op PHP 7 (die de bibliotheek nog steeds ondersteunt — PHP 7.4+) activeert dit deserialisatie van de metagegevens van een vervaardigd phar-archief, wat leidt tot uitvoering van externe code. Dit is de patch-bypass van CVE-2023-28115. Hetzelfde probleem en dezelfde oplossing werden stroomopwaarts afgehandeld in KnpLabs/snappy (GHSA-92rv-4j2h-8mjj). PhpWeasyPrint versie 2.6.0 bevat een patch voor het probleem.
Origineel (Engels) tonen
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.