{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-49358","id":"CVE-2026-49358","title":"PhpWeasyPrint vulnerable to arbitrary file deletion at shutdown via public $temporaryFiles","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 t","descriptionLong":"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.","published":"2026-06-19T14:52:05.368Z","updated":"2026-10-28T02:30:56.338670411Z","reserved":"2026-05-29T14:35:45.904Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L","rating":"low","source":"GitHub_M"},"metrics":[{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L","rating":"low","source":"GitHub_M"},{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L","rating":"low","source":"github.com"},{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L","rating":"low","source":"OSV"},{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L","rating":"low","source":"GitHub"}],"rating":"low","products":["pontedilana php-weasyprint"],"affectedProducts":[{"vendor":"pontedilana","product":"php-weasyprint","defaultStatus":null,"versions":[{"version":"< 2.6.0","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"pontedilana/php-weasyprint","purl":"pkg:composer/pontedilana/php-weasyprint","ranges":["<2.6.0"],"fixed":["2.6.0"],"advisory":"GHSA-5g9f-cwwg-4p8g"}],"cwes":["CWE-73"],"aliases":["GHSA-5g9f-cwwg-4p8g"],"references":[{"url":"https://github.com/pontedilana/php-weasyprint/security/advisories/GHSA-5g9f-cwwg-4p8g","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/KnpLabs/snappy/security/advisories/GHSA-87qc-37cw-84h4","tags":["x_refsource_MISC","advisory","web"]},{"url":"https://github.com/pontedilana/php-weasyprint/commit/6d328ffd3bcb800c7c2e8a594b1bff0c099c9391","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/pontedilana/php-weasyprint/releases/tag/2.6.0","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/49xxx/CVE-2026-49358.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49358","tags":["advisory"]},{"url":"https://github.com/pontedilana/php-weasyprint","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00166,"epssPercentile":0.05888,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-49358","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49358","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-49358","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-5g9f-cwwg-4p8g","ok":true,"note":"GHSA-5g9f-cwwg-4p8g"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-49358","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}