{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "59ef1e2ea9008e55765030fccd32d20bb8fdbd1e"
            }
          ],
          "repo": "https://github.com/unjs/unhead",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-5339-hvwr-7582"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31873.json"
  },
  "details": "Unhead is a document head and template manager. Prior to 2.1.11, The link.href check in makeTagSafe (safe.ts) uses String.includes(), which is case-sensitive. Browsers treat URI schemes case-insensitively. DATA:text/css,... is the same as data:text/css,... to the browser, but 'DATA:...'.includes('data:') returns false. An attacker can inject arbitrary CSS for UI redressing or data exfiltration via CSS attribute selectors with background-image callbacks. This vulnerability is fixed in 2.1.11.",
  "id": "CVE-2026-31873",
  "modified": "2026-04-01T23:10:16.409795810Z",
  "published": "2026-03-12T17:20:35.660Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31873.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/unjs/unhead/security/advisories/GHSA-5339-hvwr-7582"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31873"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Unhead has a Bypass of URI Scheme Sanitization in makeTagSafe via Case-Sensitivity"
}