Skip to main content
VulnerabilityPublished Updated

CVE-2026-49358: pontedilana php-weasyprint · External Control of File Name or Path

Affects pontedilana php-weasyprintSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 3.0 Low : upgrade to 2.6.0 when convenient.

Data as of 1 Nov 2026, 22:58 UTC

CVSS 3.1 base score
3.0Low
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.1% chance of exploitation in 30 days – higher than 5% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 2.6.0
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 19 Jun 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 1 Nov 2026.

What to do

Upgrade php-weasyprint and pontedilana/php-weasyprint to 2.6.0.

Affected software

ProductAffectedFixed in
pontedilanaphp-weasyprintAffected
  • <2.6.0
Fixed in
  • 2.6.0
Packagistpontedilana/php-weasyprintpkg:composer/pontedilana/php-weasyprintOther threatsAffected
  • <2.6.0
Fixed in
  • 2.6.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade to PhpWeasyPrint version 2.6.0 or later, which contains a patch fixing this vulnerability. No other official remediation or temporary fixes are documented. Until upgrading, avoid exposing the AbstractGenerator::$temporaryFiles array to untrusted code.

Description

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.

References

Community reviews

Loading reviews…