{
  "id": "CVE-2026-49286",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-49286",
  "published_at": "2026-06-19T17:03:58.118Z",
  "title": "PhpWeasyPrint vulnerable to PHAR deserialization via output filename (CVE-2023-28115 case-insensitive bypass)",
  "vendor": "pontedilana",
  "product": "php-weasyprint",
  "cvss": {
    "score": 8.1,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-502",
  "cvss_by_source": {
    "cna": 8.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "pontedilana",
        "product": "php-weasyprint",
        "ranges": [
          "\u003c 2.6.0"
        ],
        "fixed_in": [
          "2.6.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade php-weasyprint to 2.6.0 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/pontedilana/php-weasyprint/security/advisories/GHSA-2fmj-p74r-3wjm"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/KnpLabs/snappy/security/advisories/GHSA-92rv-4j2h-8mjj"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/pontedilana/php-weasyprint/commit/d1aa487722b5a3cab9b222b85fdb5608a5a550c3"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/pontedilana/php-weasyprint/releases/tag/2.6.0"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
