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

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
pontedilana php-weasyprint
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Pontedilana PhpWeasyPrint是Pontedilana公司开源的一个 PHP 库,作为 WeasyPrint 的封装器,支持从 URL 或 HTML 页面生成 PDF 文档,API 设计兼容 KnpLabs/snappy。 Pontedilana PhpWeasyPrint 2.6.0之前版本存在服务端请求伪造漏洞,该漏洞源于未限制URL方案,经由file_get_contents()服务器端获取选项值内容,可能导致攻击者利用attachment选项实现服务端请求伪造和本地文件泄露。

CVSS 6.5 · Medium EPSS 0.42% · P36

Affected Version Matrix 1

VendorProduct Version RangeStatus
pontedilana php-weasyprint < 2.6.0 affected
Get alerts for future matching vulnerabilities Log 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: CVE Program / CVE List V5
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: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
服务端请求伪造(SSRF)
Source: CVE Program / CVE List V5
Vulnerability Title
Pontedilana PhpWeasyPrint 服务端请求伪造漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Pontedilana PhpWeasyPrint是Pontedilana公司开源的一个 PHP 库,作为 WeasyPrint 的封装器,支持从 URL 或 HTML 页面生成 PDF 文档,API 设计兼容 KnpLabs/snappy。 Pontedilana PhpWeasyPrint 2.6.0之前版本存在服务端请求伪造漏洞,该漏洞源于未限制URL方案,经由file_get_contents()服务器端获取选项值内容,可能导致攻击者利用attachment选项实现服务端请求伪造和本地文件泄露。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
pontedilana php-weasyprint < 2.6.0 -

II. Public POCs for CVE-2026-49359

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

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-49260 8.2 HIGH PhpWeasyPrint: shell command injection via configurable WeasyPrint binary path due to inve
CVE-2026-49286 8.1 HIGH PhpWeasyPrint vulnerable to PHAR deserialization via output filename (CVE-2023-28115 case-
CVE-2026-49358 3.0 LOW PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles

IV. Related Vulnerabilities