unjs unhead up to 2.1.12 safe.ts useHeadSafe incomplete blacklist
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 6.0 | $0-$5k | 0.27 |
Summary
A vulnerability marked as critical has been reported in unjs unhead up to 2.1.12. Impacted is the function useHeadSafe of the file packages/unhead/src/plugins/safe.ts. This manipulation causes incomplete blacklist.
This vulnerability is tracked as CVE-2026-39315. The attack is possible to be carried out remotely. No exploit exists.
It is suggested to upgrade the affected component.
Details
A vulnerability has been found in unjs unhead up to 2.1.12 and classified as critical. Affected by this vulnerability is the function useHeadSafe of the file packages/unhead/src/plugins/safe.ts. The manipulation with an unknown input leads to a incomplete blacklist vulnerability. The CWE definition for the vulnerability is CWE-184. The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete, leading to resultant weaknesses. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:
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 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.
It is possible to read the advisory at github.com. This vulnerability is known as CVE-2026-39315 since 04/06/2026. The exploitation appears to be easy. The attack can be launched remotely. The exploitation doesn't need any form of authentication. It demands that the victim is doing some kind of user interaction. Technical details of the vulnerability are known, but there is no available exploit. The attack technique deployed by this issue is T1562.006 according to MITRE ATT&CK.
Upgrading to version 2.1.13 eliminates this vulnerability. The upgrade is hosted for download at github.com. Applying the patch 961ea781e091853812ffe17f8cda17105d2d2299 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
Be aware that VulDB is the high quality source for vulnerability data.
Product
Vendor
Name
Version
License
Website
- Product: https://github.com/unjs/unhead/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 6.2VulDB Meta Temp Score: 6.0
VulDB Base Score: 6.3
VulDB Temp Score: 6.0
VulDB Vector: 🔒
VulDB Reliability: 🔍
CNA Base Score: 6.1
CNA Vector (GitHub_M): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Incomplete blacklistCWE: CWE-184 / CWE-183 / CWE-20
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Yes
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: unhead 2.1.13
Patch: 961ea781e091853812ffe17f8cda17105d2d2299
Timeline
04/06/2026 CVE reserved04/09/2026 Advisory disclosed
04/09/2026 VulDB entry created
04/09/2026 VulDB entry last update
Sources
Product: github.comAdvisory: GHSA-95h2-gj7x-gx9w
Status: Confirmed
CVE: CVE-2026-39315 (🔒)
GCVE (CVE): GCVE-0-2026-39315
GCVE (VulDB): GCVE-100-356647
Entry
Created: 04/09/2026 21:35Changes: 04/09/2026 21:35 (69)
Complete: 🔍
Cache ID: 216:6EF:103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.