Read the docs
TI-2026-28305 Aliases CVE-2026-39315GHSA-95h2-gj7x-gx9w

Unhead has a hasDangerousProtocol() bypass via leading-zero padded HTML entities in useHeadSafe()

Priority MEDIUM 60CWE-184Published · Updated

Key facts

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

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

Unhead is a document head and template manager. Prior to 2.1.13, useHeadSafe() is the composable that Nuxt's own documentation explicitly recommends for rendering user-supplied content in <head> safely. Internally, the hasDangerousProtocol() function in packages/unhead/src/plugins/safe.ts decodes HTML entities before checking for blocked URI schemes (javascript:, data:, vbscript:). The decoder uses two regular expressions with fixed-width digit caps. The HTML5 specification imposes no limit on leading zeros in numeric character references. When a padded entity exceeds the regex digit cap, the decoder silently skips it. The undecoded string is then passed to startsWith('javascript:'), which does not match. makeTagSafe() writes the raw value directly into SSR HTML output. The browser's HTML parser decodes the padded entity natively and constructs the blocked URI. This vulnerability is fixed in 2.1.13.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00296 22nd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed unhead (unjs): 2.1.13unhead (npm): 2.1.13

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
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.132.1.13Patch availableCNA
—unhead (npm)before 2.1.132.1.13Patch availableGHSA-95h2-gj7x-gx9w
  • unhead Vendorunjs Affected before 2.1.13 Fixed in 2.1.13 Patch available CNA
  • unhead (npm) Vendor— Affected before 2.1.13 Fixed in 2.1.13 Patch available GHSA-95h2-gj7x-gx9w

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:unjs:unhead:*:*:*:*:*:node.js:*:*before 2.1.13Vulnerableunjs
  • cpe:2.3:a:unjs:unhead:*:*:*:*:*:node.js:*:* Versions before 2.1.13 Vulnerable ·unjs

Remediation

  • Fix · CNA unhead (unjs) Fixed in 2.1.13
  • Fix · GHSA-95h2-gj7x-gx9w unhead (npm) Fixed in 2.1.13 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-39315
  2. 2026-10-03 Alias added: GHSA-95h2-gj7x-gx9w

References

  • TI-2026-24425 Unhead has a Bypass of URI Scheme Sanitization in makeTagSafe via Case-Sensitivity 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