Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-49286: CWE-502: Deserialization of Untrusted Data in pontedilana php-weasyprint

0
High
VulnerabilityCVE-2026-49286cvecve-2026-49286cwe-502
Published: 06/19/2026 (06/19/2026, 17:03:58 UTC)
Source: CVE Database V5
Vendor/Project: pontedilana
Product: php-weasyprint

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` guarded the output filename against the `phar://` stream wrapper with a case-sensitive blacklist. PHP stream wrappers are case-insensitive, so `PHAR://`, `Phar://`, etc. bypass the check and reach `fileExists()` (`file_exists()`) in `prepareOutput()`. On PHP 7 (which the library still supports — PHP 7.4+), this triggers deserialization of a crafted PHAR archive's metadata, leading to remote code execution. This is the patch-bypass of CVE-2023-28115. The same issue and fix were handled upstream in KnpLabs/snappy (GHSA-92rv-4j2h-8mjj). PhpWeasyPrint version 2.6.0 contains a patch for the issue.

CVSS v3.1

Score 8.1high

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected software

Packagistmore threats →ai
pontedilana/php-weasyprint
pkg:composer/pontedilana/php-weasyprint
Affected versions
<2.6.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/19/2026, 18:50:50 UTC

Technical Analysis

PhpWeasyPrint is a PHP library for generating PDFs from URLs or HTML pages. Before version 2.6.0, it used a case-sensitive blacklist to block the phar:// stream wrapper in output filenames, but PHP stream wrappers are case-insensitive. Variants like PHAR:// bypass the blacklist and reach the file_exists() check in prepareOutput(), triggering deserialization of malicious PHAR metadata on PHP 7.4 and later. This vulnerability is a patch bypass of CVE-2023-28115 and is similar to an issue fixed upstream in KnpLabs/snappy. The vulnerability is identified as CWE-502 (Deserialization of Untrusted Data) and has a CVSS 3.1 score of 8.1 (high severity).

Potential Impact

Successful exploitation allows remote code execution due to deserialization of untrusted data from crafted PHAR archives. This impacts confidentiality, integrity, and availability of affected systems running vulnerable versions of php-weasyprint on PHP 7.4 or later.

Mitigation Recommendations

Upgrade php-weasyprint to version 2.6.0 or later, which contains a patch for this vulnerability. Patch status is not explicitly confirmed beyond the version bump, so verify with the vendor advisory or official repository for the latest remediation guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-05-28T20:07:58.862Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a358c5cf198dc38c1f2fbc6

Added to database: 06/19/2026, 18:37:16 UTC

Last enriched: 06/19/2026, 18:50:50 UTC

Last updated: 06/20/2026, 23:27:27 UTC

Views: 11

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses