CVE-2026-49359

Published: June 19th, 2026
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.
MEDIUM
CVSS v3: 6.5

Status

DocFilters Release Package State Justification Comment
26.3 snappy (1.1.3) False Positive Code Not Present This CVE affects the PhpWeasyPrint PHP library (pontedilana/php-weasyprint), a downstream of the KnpLabs/snappy PHP library. It is a Server-Side Request Forgery / local file disclosure (CWE-918) in the PHP Pdf attachment option, where a value passing isOptionUrl() (filter_var(..., FILTER_VALIDATE_URL)) is fetched server-side via file_get_contents() with no URL-scheme restriction. Document Filters bundles the unrelated Google Snappy C++ compression library (version 1.1.3, external/snappy-1.1.3), which contains no PHP code, no isOptionUrl()/file_get_contents()/attachment-option logic, and performs no server-side URL fetching. No .php files exist in the codebase. Sibling CVEs CVE-2023-28115, CVE-2026-49260 and CVE-2026-49286 on the same PHP library are already tracked here as false positives for the same library-name confusion.
26.2 snappy (1.1.3) Needs Triage
26.1 snappy (1.1.3) Needs Triage
25.4 snappy (1.1.3) Needs Triage
25.3 snappy (1.1.3) Needs Triage
25.2 snappy (1.1.3) Needs Triage
25.1 snappy (1.1.3) Needs Triage
24.4 snappy (1.1.3) Needs Triage
24.4.0 snappy (1.1.3) Needs Triage
24.3 snappy (1.1.3) Needs Triage
24.2 snappy (1.1.3) Needs Triage
24.1 snappy (1.1.3) Needs Triage
23.3 snappy (1.1.3) Needs Triage
23.2 snappy (1.1.3) Needs Triage
23.1 snappy (1.1.3) Needs Triage
22.4 snappy (1.1.3) Needs Triage
22.3 snappy (1.1.3) Needs Triage
22.2 snappy (1.1.3) Needs Triage
22.1 snappy (1.1.3) Needs Triage
21.11 snappy (1.1.3) Needs Triage
21.8 snappy (1.1.3) Needs Triage
21.5.0 snappy (1.1.3) Needs Triage
21.2.0 snappy (1.1.3) Needs Triage
11.4.19.3667 snappy (1.1.3) Needs Triage
11.4.18.3599 snappy (1.1.3) Needs Triage
11.4.16.3445 snappy (1.1.3) Needs Triage
11.4.15.3368 snappy (1.1.3) Needs Triage
11.4.14.3263 snappy (1.1.3) Needs Triage
11.4.13.3179 snappy (1.1.3) Needs Triage
11.4.12.3054 snappy (1.1.3) Needs Triage
11.4.11.3040 snappy (1.1.3) Needs Triage
11.4.11.2990 snappy (1.1.3) Needs Triage
11.4.10.2934 snappy (1.1.3) Needs Triage
11.4.9.2878 snappy (1.1.3) Needs Triage
11.4.8.2822 snappy (1.1.3) Needs Triage

Severity score breakdown

Attack Complexity
LOW
Attack Vector
NETWORK
Availability Impact
NONE
Base Score
6.5
Base Severity
MEDIUM
Confidentiality Impact
HIGH
Integrity Impact
NONE
Privileges Required
LOW
Scope
UNCHANGED
User Interaction
NONE
Vector String
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Version
3.1

References