Skip to main content

Unhead EUVDEUVD-2026-20992

| CVE-2026-39315 MEDIUM
Incomplete List of Disallowed Inputs (CWE-184)
2026-04-09 GitHub_M GHSA-95h2-gj7x-gx9w
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
Impact

CVSS 6.1 reflects medium severity with network attack vector, low complexity, no privilege requirements, and user interaction needed-typical for XSS requiring a user to interact with a malicious document head attribute. The EPSS and KEV status are not provided; however, the vulnerability is not confirmed as actively exploited in CISA KEV at analysis time. No public exploit code is referenced in the data. The attack requires crafting a specific padded numeric entity that exceeds the regex caps, then injecting it into a user-controlled head element-a non-trivial but feasible attack. The real-world risk depends on whether Nuxt applications genuinely accept user input for head rendering; the fact that useHeadSafe() is documented as the safe method suggests this is a real use case, but deployment frequency of vulnerable versions is unknown. The vulnerability is deterministic and automatable once a payload is crafted. Medium severity is appropriate: it enables XSS via head attributes (affecting confidentiality and integrity), but requires user interaction and is limited to document head scope rather than full page body XSS.

Exploit ScenarioDerived

An attacker crafts a malicious document or injects a payload into user-controlled head content (e.g., a page title or meta description field). The payload uses padded numeric character references, such as &#0000000106&#0000000097&#0000000118&#0000000097&#0000000115&#0000000099&#0000000114&#0000000105&#0000000112&#0000000116: (representing 'javascript:'), in an event handler attribute or href. When a Nuxt application renders this using useHeadSafe() prior to 2.1.13, the server-side validation is bypassed, and the raw padded entity is written to HTML. When the victim's browser renders the page, the native HTML parser decodes the entity and executes the JavaScript, allowing credential theft, session hijacking, or malware injection. User interaction (viewing the page) is required, but no complex attack prerequisites exist beyond crafting the padded entity payload.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 09, 2026

Unhead's useHeadSafe() composable, explicitly recommended by Nuxt documentation for safely rendering user-supplied content in document head, can be bypassed via padded HTML numeric character references that exceed regex digit limits. The hasDangerousProtocol() function silently fails to decode these entities, allowing blocked URI schemes (javascript:, data:, vbscript:) to pass validation; browsers then natively decode the padded entity during HTML parsing, enabling cross-site scripting (XSS) attacks. This affects Unhead versions prior to 2.1.13, with no confirmed active exploitation or public exploit code identified at time of analysis.

RemediationAI

Vendor-released patch: Upgrade to Unhead version 2.1.13 or later. This version corrects the hasDangerousProtocol() function to properly handle padded numeric character references with unlimited leading zeros. The fix is available at https://github.com/unjs/unhead/releases/tag/v2.1.13. For Nuxt applications, update the unhead dependency in package.json to >=2.1.13 and reinstall dependencies. No workaround is available for earlier versions; patching is the recommended remediation. The upstream fix is documented in commit 961ea781e091853812ffe17f8cda17105d2d2299 at https://github.com/unjs/unhead/commit/961ea781e091853812ffe17f8cda17105d2d2299.

Affected VersionsENISA

unhead < 2.1.13

Affected Packages

npm unhead fix: 2.1.13

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Unhead is a head and template management library used by Nuxt applications. The vulnerability exploits a mismatch between server-side entity decoding logic and browser-side HTML parsing. The hasDangerousProtocol() function in packages/unhead/src/plugins/safe.ts uses fixed-width regex digit caps to decode HTML numeric character references (both decimal and hexadecimal), but the HTML5 specification permits unlimited leading zeros in these references (e.g., &#0000000106&#0000000097&#0000000118&#0000000097&#0000000115&#0000000099&#0000000114&#0000000105&#0000000112&#0000000116:). When a padded entity exceeds the regex digit cap, the decoder silently returns the original string unchanged. The makeTagSafe() function then writes this undecoded string directly into SSR HTML output. The browser's native HTML parser later decodes the padded entity according to HTML5 rules and constructs the dangerous URI, bypassing the server-side check. This is a classic encoding-validation bypass (CWE-184: Incomplete List of Disallowed Inputs).

Know when Unhead gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Primary rating from Vendor (GitHub_M) · only source for this CVE.

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch released
Apr 10, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 09, 2026 - 17:54 nvd
MEDIUM 6.1

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 6 npm packages depend on unhead (6 direct, 0 indirect)

Ecosystem-wide dependent count for version 2.1.13.

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy