{"answers":{"affected":"2 open source packages ship an affected version, including pontedilana/php-weasyprint.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49286 exists.","fix":"Upgrade pontedilana/php-weasyprint to 2.6.0 or later.","what":"CVE-2026-49286 is a high-severity unsafe deserialization vulnerability in pontedilana php-weasyprint, published on 19 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-49286 and fix it if it is affected.\n\nWhat it is: CVE-2026-49286 is a high-severity unsafe deserialization vulnerability in pontedilana php-weasyprint, published on 19 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49286 exists.\n\nAffected packages and fixed versions:\n- pontedilana/php-weasyprint (Packagist): affected all versions; fixed in 2.6.0\n- pontedilana/php-weasyprint (Packagist): affected all versions; fixed in 2.6.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-49286/ (Markdown: https://insights.sbomify.com/CVE-2026-49286/index.md)","id":"CVE-2026-49286","markdown":"https://insights.sbomify.com/CVE-2026-49286/index.md","name":"CVE-2026-49286","record":{"aliases":["GHSA-2fmj-p74r-3wjm"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP PDF generation library","requires_auth":"none","summary":"Attackers can achieve remote code execution by bypassing case-sensitive filename checks to trigger PHAR deserialization in PhpWeasyPrint.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"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.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"PhpWeasyPrint vulnerable to PHAR deserialization via output filename (CVE-2023-28115 case-insensitive bypass)","id":"CVE-2026-49286","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"deserialization","year":"2026"},"n_packages":2,"n_references":4,"next":{"headline":"Statamic CMS vulnerable to unsafe method invocation via collection sorting allows data destruction","id":"CVE-2026-49287"},"packages":[{"ecosystem":"Packagist","fixed":["2.6.0"],"introduced":["0"],"last_affected":[],"package":"pontedilana/php-weasyprint","purl":null,"source":"GHSA-2fmj-p74r-3wjm"},{"ecosystem":"Packagist","fixed":["2.6.0"],"introduced":["0"],"last_affected":[],"package":"pontedilana/php-weasyprint","purl":"pkg:composer/pontedilana/php-weasyprint","source":"GHSA-2fmj-p74r-3wjm"}],"prev":{"headline":"SimpleSAMLphp SP accepts a response from an unexpected IdP when unsigned `Response/InResponseTo` is combined with a signed assertion lacking `SubjectConfirmationData/InResponseTo`","id":"CVE-2026-49284"},"products":["php-weasyprint"],"published":"2026-06-19","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-06-22","vendors":["pontedilana"]},"summary":"Attackers can achieve remote code execution by bypassing case-sensitive filename checks to trigger PHAR deserialization in PhpWeasyPrint.","url":"https://insights.sbomify.com/CVE-2026-49286/"}