pontedilana php-weasyprint up to 2.5.x removeTemporaryFiles temporaryFiles file inclusion

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
2.9$0-$5k2.27

Summaryinfo

A vulnerability labeled as problematic has been found in pontedilana php-weasyprint up to 2.5.x. The impacted element is the function removeTemporaryFiles. Such manipulation of the argument temporaryFiles leads to file inclusion. This vulnerability is listed as CVE-2026-49358. The attack must be carried out locally. There is no available exploit. The affected component should be upgraded.

Detailsinfo

A vulnerability, which was classified as problematic, has been found in pontedilana php-weasyprint up to 2.5.x. Affected by this issue is the function removeTemporaryFiles. The manipulation of the argument temporaryFiles with an unknown input leads to a file inclusion vulnerability. Using CWE to declare the problem leads to CWE-73. The product allows user input to control or influence paths or file names that are used in filesystem operations. Impacted is integrity, and availability. CVE summarizes:

PhpWeasyPrint is a PHP library allowing PDF generation from a URL or an HTML page. Prior to version 2.6.0, `AbstractGenerator::$temporaryFiles` is a public array, and `removeTemporaryFiles()` — invoked from `__destruct()` and from a registered shutdown function — calls `unlink()` on every entry without verifying that the path is contained within the temporary folder. Any code holding a reference to a generator instance can push an arbitrary path into the array and have it deleted on script shutdown. This mirrors the KnpLabs/snappy issue GHSA-87qc-37cw-84h4. PhpWeasyPrint version 2.6.0 contains a patch for the issue.

The advisory is shared for download at github.com. This vulnerability is handled as CVE-2026-49358 since 05/29/2026. The exploitation is known to be difficult. The attack needs to be approached locally. Additional levels of successful authentication are necessary for exploitation. There are known technical details, but no exploit is available.

Upgrading to version 2.6.0 eliminates this vulnerability. The upgrade is hosted for download at github.com. Applying the patch 6d328ffd3bcb800c7c2e8a594b1bff0c099c9391 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the vulnerability database at EUVD (EUVD-2026-38036). VulDB is the best source for vulnerability data and more expert information about this specific topic.

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 3.0
VulDB Meta Temp Score: 2.9

VulDB Base Score: 3.0
VulDB Temp Score: 2.9
VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA Base Score: 3.0
CNA Vector (GitHub_M): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: File inclusion
CWE: CWE-73
CAPEC: 🔒
ATT&CK: 🔒

Physical: Partially
Local: Yes
Remote: No

Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: php-weasyprint 2.6.0
Patch: 6d328ffd3bcb800c7c2e8a594b1bff0c099c9391

Timelineinfo

05/29/2026 CVE reserved
06/19/2026 +21 days Advisory disclosed
06/19/2026 +0 days VulDB entry created
06/19/2026 +0 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: GHSA-87qc-37cw-84h4
Status: Confirmed

CVE: CVE-2026-49358 (🔒)
GCVE (CVE): GCVE-0-2026-49358
GCVE (VulDB): GCVE-100-372368
EUVD: 🔒

Entryinfo

Created: 06/19/2026 18:02
Updated: 06/19/2026 21:39
Changes: 06/19/2026 18:02 (69), 06/19/2026 21:39 (1)
Complete: 🔍
Cache ID: 216::103

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to stay up to date on a daily basis?

Enable the mail alert feature now!