CVE-2026-49359
Last modified
CVE-2026-49359 is a medium-severity vulnerability rated 6.5/10 on the CVSS scale. 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. EPSS estimates a 0.24% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Weakness Enumeration
References
Timeline
- Published
- Last Modified
- Status
- Deferred
Frequently Asked Questions
What is CVE-2026-49359?
How severe is CVE-2026-49359?
How do I fix CVE-2026-49359?
How Strix Helps
- One Click Account Takeover in GranolaHow a notification link broke out of Electron and led to a one-click account takeover.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-493529Router is an AI router & token saver. From 0.2.21 until 0.4…9.8
- CVE-2026-493539Router is an AI router & token saver. In 0.4.45 and earlier…7.5
- CVE-2026-49355OpenProject is open-source, web-based project management sof…4.3
- CVE-2026-49356Babel is a compiler for writing next generation JavaScript. …3.6
- CVE-2026-49357Line Desktop MCP is a project that, while unaffiliated with …8.8
- CVE-2026-49358PhpWeasyPrint is a PHP library allowing PDF generation from …3
- CVE-2026-49361Apache Fluss versions prior to 0.9.1 configure the Netty Len…7.5
- CVE-2026-49365Generation of Error Message Containing Sensitive Information…5.3
- CVE-2026-49366In JetBrains IntelliJ IDEA before 2026.1.1 command injection…7.8
- CVE-2026-49367In JetBrains IntelliJ IDEA before 2026.1.1 command execution…8.8
- CVE-2026-49368In JetBrains YouTrack before 2026.1.13162 stored XSS in proj…5.4
- CVE-2026-49369In JetBrains YouTrack before 2026.1.13162 information disclo…4.3
Are you affected by CVE-2026-49359?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
