Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1325 CNY

100%

CVE-2026-49359— PhpWeasyPrint vulnerable to SSRF and local file disclosure via the attachment option

CVSS 6.5 · Medium

Affected Version Matrix 1

VendorProductVersion RangeStatus
pontedilanaphp-weasyprint< 2.6.0affected
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2026-49359

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
PhpWeasyPrint vulnerable to SSRF and local file disclosure via the attachment option
Source: NVD (National Vulnerability Database)
Vulnerability Description
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.
Source: NVD (National Vulnerability Database)
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Source: NVD (National Vulnerability Database)
Vulnerability Type
服务端请求伪造(SSRF)
Source: NVD (National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
pontedilanaphp-weasyprint < 2.6.0 -

II. Public POCs for CVE-2026-49359

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-49359

登录查看更多情报信息。

Patches & Fixes for CVE-2026-49359 (1)

Vendor Advisories for CVE-2026-49359 (2)

Other References for CVE-2026-49359 (1)

Same Patch Batch · pontedilana · 2026-06-19 · 4 CVEs total

CVE-2026-492608.2 HIGHPhpWeasyPrint: shell command injection via configurable WeasyPrint binary path due to inve
CVE-2026-492868.1 HIGHPhpWeasyPrint vulnerable to PHAR deserialization via output filename (CVE-2023-28115 case-
CVE-2026-493583.0 LOWPhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles

IV. Related Vulnerabilities

V. Comments for CVE-2026-49359

No comments yet


Leave a comment