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 javascript: (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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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., javascript:). 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
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
Lifecycle Timeline
2DescriptionCVE.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.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-20992
GHSA-95h2-gj7x-gx9w
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB