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…
EPSS 0.9%top 42%

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/26/2026, 19:22:08 UTC

Technical Analysis

PhpWeasyPrint is a PHP library for generating PDFs from URLs or HTML pages. Versions before 2.6.0 use a case-sensitive blacklist to block the phar:// stream wrapper in output filenames, but PHP stream wrappers are case-insensitive. This allows attackers to bypass the blacklist using case variations (e.g., PHAR://), triggering file_exists() in prepareOutput() and causing deserialization of malicious PHAR archive metadata on PHP 7.4 and later. This vulnerability is a patch bypass of CVE-2023-28115 and is fixed in version 2.6.0.

Potential Impact

Successful exploitation can lead to remote code execution with high confidentiality, integrity, and availability impact on affected systems running vulnerable versions of php-weasyprint on PHP 7.4 or later. This can allow attackers to execute arbitrary code remotely.

Mitigation Recommendations

Upgrade php-weasyprint to version 2.6.0 or later, which contains the official patch for this vulnerability. No other mitigations are specified. Patch status is not explicitly stated in the vendor advisory, but version 2.6.0 includes the fix.

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/26/2026, 19:22:08 UTC

Last updated: 08/04/2026, 12:46:13 UTC

Views: 67

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