Read the docs
TI-2026-24425 Aliases CVE-2026-31873GHSA-5339-hvwr-7582

Unhead has a Bypass of URI Scheme Sanitization in makeTagSafe via Case-Sensitivity

Priority HIGH 66CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00268 19th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed unhead (unjs): 2.1.11unhead (npm): 2.1.11

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
unjsunheadbefore 2.1.112.1.11Patch availableCNA
—unhead (npm)before 2.1.112.1.11Patch availableGHSA-5339-hvwr-7582
  • unhead Vendorunjs Affected before 2.1.11 Fixed in 2.1.11 Patch available CNA
  • unhead (npm) Vendor— Affected before 2.1.11 Fixed in 2.1.11 Patch available GHSA-5339-hvwr-7582

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:unjs:unhead:*:*:*:*:*:*:*:*before 2.1.11Vulnerableunjs
  • cpe:2.3:a:unjs:unhead:*:*:*:*:*:*:*:* Versions before 2.1.11 Vulnerable ·unjs

Remediation

  • Fix · CNA unhead (unjs) Fixed in 2.1.11
  • Fix · GHSA-5339-hvwr-7582 unhead (npm) Fixed in 2.1.11 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-31873
  2. 2026-10-03 Alias added: GHSA-5339-hvwr-7582

References

  • TI-2026-28305 Unhead has a hasDangerousProtocol() bypass via leading-zero padded HTML entities in useHeadSafe() CVSS 3.1MEDIUM 6.1
  • TI-2026-24412 Unhead has a XSS bypass in `useHeadSafe` via attribute name injection and case-sensitive protocol check CVSS 4.0MEDIUM 5.3

Sources