CVE-2026-39315: CWE-184: Incomplete List of Disallowed Inputs in unjs unhead
CVE-2026-39315 is a medium severity vulnerability in unhead, a document head and template manager. Versions prior to 2. 1. 13 contain an incomplete input validation issue in the useHeadSafe() composable, which is recommended for safely rendering user-supplied content in the HTML <head>. The vulnerability arises because the internal hasDangerousProtocol() function decodes HTML entities using regexes with fixed digit caps, but the HTML5 spec allows unlimited leading zeros in numeric character references. This causes some dangerous URI schemes like 'javascript:' to bypass detection and be written raw into server-side rendered HTML. The browser then decodes these entities, enabling blocked URIs to be executed. This issue is fixed in version 2. 1. 13.
AI Analysis
Technical Summary
Unhead versions before 2.1.13 have a vulnerability (CWE-184) due to incomplete filtering of dangerous URI schemes in user-supplied content rendered in the document head. The hasDangerousProtocol() function decodes HTML entities with regexes that limit digit length, but HTML5 allows unlimited leading zeros in numeric character references. When an entity exceeds this limit, it is not decoded before checking for blocked schemes like 'javascript:'. As a result, the raw entity is output in SSR HTML, and the browser's native parser decodes it, enabling execution of blocked protocols. This vulnerability is addressed in unhead version 2.1.13.
Potential Impact
The vulnerability allows bypassing of URI scheme filtering in user-supplied content rendered in the document head, potentially enabling injection of dangerous protocols such as 'javascript:'. This can lead to limited confidentiality and integrity impacts as indicated by the CVSS vector (C:L/I:L/A:N). There are no known exploits in the wild. The issue affects unhead versions prior to 2.1.13.
Mitigation Recommendations
This vulnerability is fixed in unhead version 2.1.13. Users should upgrade to version 2.1.13 or later to remediate this issue. No other official remediation or temporary fixes are documented. Patch status is not explicitly confirmed beyond the fix in 2.1.13; users should verify with vendor advisories for the latest guidance.
CVE-2026-39315: CWE-184: Incomplete List of Disallowed Inputs in unjs unhead
Description
CVE-2026-39315 is a medium severity vulnerability in unhead, a document head and template manager. Versions prior to 2. 1. 13 contain an incomplete input validation issue in the useHeadSafe() composable, which is recommended for safely rendering user-supplied content in the HTML <head>. The vulnerability arises because the internal hasDangerousProtocol() function decodes HTML entities using regexes with fixed digit caps, but the HTML5 spec allows unlimited leading zeros in numeric character references. This causes some dangerous URI schemes like 'javascript:' to bypass detection and be written raw into server-side rendered HTML. The browser then decodes these entities, enabling blocked URIs to be executed. This issue is fixed in version 2. 1. 13.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Unhead versions before 2.1.13 have a vulnerability (CWE-184) due to incomplete filtering of dangerous URI schemes in user-supplied content rendered in the document head. The hasDangerousProtocol() function decodes HTML entities with regexes that limit digit length, but HTML5 allows unlimited leading zeros in numeric character references. When an entity exceeds this limit, it is not decoded before checking for blocked schemes like 'javascript:'. As a result, the raw entity is output in SSR HTML, and the browser's native parser decodes it, enabling execution of blocked protocols. This vulnerability is addressed in unhead version 2.1.13.
Potential Impact
The vulnerability allows bypassing of URI scheme filtering in user-supplied content rendered in the document head, potentially enabling injection of dangerous protocols such as 'javascript:'. This can lead to limited confidentiality and integrity impacts as indicated by the CVSS vector (C:L/I:L/A:N). There are no known exploits in the wild. The issue affects unhead versions prior to 2.1.13.
Mitigation Recommendations
This vulnerability is fixed in unhead version 2.1.13. Users should upgrade to version 2.1.13 or later to remediate this issue. No other official remediation or temporary fixes are documented. Patch status is not explicitly confirmed beyond the fix in 2.1.13; users should verify with vendor advisories for the latest guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-06T19:31:07.266Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d7ee091cc7ad14da04a8c9
Added to database: 4/9/2026, 6:20:57 PM
Last enriched: 4/9/2026, 6:36:15 PM
Last updated: 4/9/2026, 9:26:53 PM
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.