unjs unhead up to 2.1.12 safe.ts useHeadSafe incomplete blacklist

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.0$0-$5k0.27

Summaryinfo

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.

Detailsinfo

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.

Productinfo

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.2
VulDB 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): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Incomplete blacklist
CWE: 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-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: unhead 2.1.13
Patch: 961ea781e091853812ffe17f8cda17105d2d2299

Timelineinfo

04/06/2026 CVE reserved
04/09/2026 +3 days Advisory disclosed
04/09/2026 +0 days VulDB entry created
04/09/2026 +0 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: GHSA-95h2-gj7x-gx9w
Status: Confirmed

CVE: CVE-2026-39315 (🔒)
GCVE (CVE): GCVE-0-2026-39315
GCVE (VulDB): GCVE-100-356647

Entryinfo

Created: 04/09/2026 21:35
Changes: 04/09/2026 21:35 (69)
Complete: 🔍
Cache ID: 216:6EF:103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Might our Artificial Intelligence support you?

Check our Alexa App!