Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Requires low-privilege app access to control the attachment option (PR:L); confidentiality is high from arbitrary local file read and SSRF; no integrity or availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
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 fetches the content of option values server-side via file_get_contents() when the value looks like a URL, without restricting the URL scheme. The attachment option of Pdf is the reachable sink: any value that passes isOptionUrl() (filter_var(..., FILTER_VALIDATE_URL)) is downloaded by the PHP process and embedded into the generated PDF. Because FILTER_VALIDATE_URL accepts http, https, ftp, file and PHP stream wrappers such as php://, an attacker who can influence the attachment value reaches both a Server-Side Request Forgery primitive (e.g. internal HTTP endpoints, cloud metadata) and a local file disclosure primitive (file://, php://filter/...), with the fetched bytes exfiltrated as a PDF attachment. This is the same class of issue KnpLabs/snappy patched for its xsl-style-sheet option in GHSA-c5fp-p67m-gq56. The library is documented as a one-to-one substitute for KnpLabs/snappy and shares the same code shape. PhpWeasyPrint version 2.6.0 contains a patch for the issue.
AnalysisAI
PhpWeasyPrint (pontedilana/php-weasyprint) prior to version 2.6.0 enables server-side request forgery and local file disclosure through its attachment option, which passes any URL-shaped value through PHP's file_get_contents() without restricting the URL scheme. Applications that expose the attachment option to user-controlled input allow an attacker to probe internal HTTP endpoints (including cloud instance metadata services) and read arbitrary local files by supplying schemes such as file:// or php://filter/..., with exfiltrated content embedded directly into the generated PDF output. This is the same vulnerability class patched in KnpLabs/snappy (GHSA-c5fp-p67m-gq56); no public exploit or CISA KEV listing exists at time of analysis.
Technical ContextAI
PhpWeasyPrint is a PHP wrapper library (Composer package pontedilana/php-weasyprint) for the WeasyPrint binary that generates PDFs from HTML or URLs. The vulnerable logic resides in src/Pdf.php: the isOptionUrl() method previously used filter_var($value, FILTER_VALIDATE_URL) to determine whether an option value should be fetched server-side via file_get_contents(). PHP's FILTER_VALIDATE_URL accepts not only http and https but also ftp, file, and stream wrappers such as php://filter/convert.base64-encode/resource=/etc/passwd, creating dual attack primitives: SSRF against internal HTTP services and local file read against the PHP process's accessible filesystem. CWE-918 (Server-Side Request Forgery) identifies the root cause as insufficient validation of user-supplied URLs used in server-side HTTP or filesystem requests. The fix in version 2.6.0 replaces the FILTER_VALIDATE_URL check with a strict scheme allowlist (http and https by default), configurable via a new $allowedSchemes constructor argument, and is confirmed by commit 9582dcf119a405276cf55e9e10bc577a887792cb. CPE: cpe:2.3:a:pontedilana:php-weasyprint:*:*:*:*:*:*:*:*.
RemediationAI
Upgrade pontedilana/php-weasyprint to version 2.6.0 or later via Composer (composer require pontedilana/php-weasyprint:^2.6.0); the vendor-released patch is confirmed at https://github.com/pontedilana/php-weasyprint/releases/tag/2.6.0 with fix commit 9582dcf119a405276cf55e9e10bc577a887792cb. If immediate upgrade is not possible, audit all application code that instantiates Pdf objects and ensure no user-controlled input reaches the attachment option - replace free input with an explicit allowlist of known-safe attachment paths (e.g., map user-supplied keys to server-side file paths, as demonstrated in the KnpLabs/snappy advisory at https://github.com/KnpLabs/snappy/security/advisories/GHSA-c5fp-p67m-gq56). As a defense-in-depth measure, restrict the PHP daemon to the minimum filesystem permissions required and avoid running it as root, which limits the blast radius of any file:// exploitation. In cloud environments, apply network egress controls to block the PHP process from reaching instance metadata endpoints (e.g., 169.254.169.254) until the patch can be applied.
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-918 – Server-Side Request Forgery (SSRF)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-38054
GHSA-x8g9-h984-pc36