Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Network-reachable when the filename parameter is exposed to input (AV:N, PR:N); AC:H because exploitation requires PHP 7, a stageable PHAR with a gadget chain, and attacker-influenced output path; full RCE yields C/I/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
3DescriptionCVE.org
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.
AnalysisAI
PHAR deserialization in PhpWeasyPrint versions prior to 2.6.0 allows remote code execution by bypassing the case-sensitive phar:// blacklist introduced for CVE-2023-28115 - because PHP stream wrappers are case-insensitive, schemes like PHAR:// or PhAr:// pass the check and reach file_exists() in prepareOutput(). When the library runs on PHP 7.4+ and an attacker can influence the output filename argument passed to generation methods, a crafted PHAR archive's metadata is unserialized via a gadget chain, yielding code execution. No CISA KEV listing and no public exploit identified at time of analysis for this specific CVE, although the equivalent upstream KnpLabs/snappy advisory (GHSA-92rv-4j2h-8mjj) ships a working phpggc-based PoC that is directly portable.
Technical ContextAI
PhpWeasyPrint (pontedilana/php-weasyprint) is a PHP wrapper around the WeasyPrint binary used to generate PDFs from URLs or HTML. The root cause is CWE-502 Deserialization of Untrusted Data, triggered through PHP's phar:// stream wrapper: when file_exists() (or similar filesystem functions) is invoked on a phar:// URL, the PHP engine parses the archive and unserializes its metadata block, instantiating arbitrary classes and invoking magic methods such as __destruct/__wakeup. The originally shipped fix for CVE-2023-28115 (mirrored in snappy 1.4.2) used strpos($filename, 'phar://') === 0, but PHP wrapper resolution is case-insensitive, so PHAR://, Phar://, pHaR:// all reach the vulnerable fileExists() call inside AbstractGenerator::prepareOutput(). The 2.6.0 patch (commit d1aa487) replaces the blacklist with a parse_url-based allow-list that only accepts the 'file' scheme (plus a Windows drive-letter regex), making the protocol check robust against case and against other wrappers like php://filter, http://, ftp://. PHAR metadata deserialization in this form requires PHP < 8.0; PHP 8 removed automatic PHAR metadata unserialization on filesystem function calls, so vulnerable deployments are PHP 7.4 installations that the library still officially supports.
RemediationAI
Vendor-released patch: PhpWeasyPrint 2.6.0, available at https://github.com/pontedilana/php-weasyprint/releases/tag/2.6.0, which replaces the case-sensitive phar:// blacklist with a parse_url-based allow-list of the 'file' scheme (commit d1aa487722b5a3cab9b222b85fdb5608a5a550c3). If immediate upgrade is not possible, the highest-impact compensating control is to upgrade the PHP runtime to 8.0+ where PHAR metadata is no longer auto-deserialized by filesystem functions, which neutralizes the exploitation path entirely at the cost of a PHP version migration. As an application-level workaround, never pass user-controlled data into the second argument of Pdf::generate(), generateFromHtml(), or Image equivalents - wrap callers so the output filename is constructed server-side from a fixed directory plus a sanitized identifier; this fully blocks the vector but requires touching every call site. A weaker stop-gap is to add an application-side allow-list check that rejects any output path matching /^[a-z]+:/i except literal 'file:' before invoking the generator. See also the upstream KnpLabs/snappy advisory at https://github.com/KnpLabs/snappy/security/advisories/GHSA-92rv-4j2h-8mjj.
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
NetAlertX (formerly PiAlert) versions 23.01.14 through 24.x before 24.10.12 allow unauthenticated command injection thro
Same weakness CWE-502 – Deserialization of Untrusted Data
View allSame technique Deserialization
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-38053
GHSA-2fmj-p74r-3wjm