CVE-2026-39315
CVE-2026-39315 is a medium-severity vulnerability in Unjs Unhead with a CVSS 3.x base score of 6.1. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-184.
Key facts
- Severity: Medium (CVSS 3.x base score 6.1)
- EPSS exploit prediction: 0% (20th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2026-20992
- Weakness: CWE-184
- Affected product: Unjs Unhead
- Published:
- Last modified:
Description
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.
Frequently asked questions
- What is CVE-2026-39315?
- 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.
- How severe is CVE-2026-39315?
- CVE-2026-39315 has a CVSS 3.x base score of 6.1, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is low, integrity low, and availability none.
- Is CVE-2026-39315 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (20th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2026-39315?
- CVE-2026-39315 affects Unjs Unhead. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2026-39315?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- Does CVE-2026-39315 have an EU (EUVD) identifier?
- Yes. CVE-2026-39315 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-20992.
- When was CVE-2026-39315 published?
- CVE-2026-39315 was published on 2026-04-09 and last updated on 2026-06-17.
References
- https://github.com/unjs/unhead/commit/961ea781e091853812ffe17f8cda17105d2d2299
- https://github.com/unjs/unhead/releases/tag/v2.1.13
- https://github.com/unjs/unhead/security/advisories/GHSA-95h2-gj7x-gx9w
Affected products (1)
- cpe:2.3:a:unjs:unhead:*:*:*:*:*:node.js:*:*
More vulnerabilities in Unjs Unhead
- CVE-2026-31860 — Medium (CVSS 6.1): Unhead is a document head and template manager. Prior to 2.1.11, useHeadSafe() can be bypassed to inject arbitrary HTML…
- CVE-2026-31873: Unhead is a document head and template manager. Prior to 2.1.11, The link.href check in makeTagSafe (safe.ts) uses…
All CVEs affecting Unjs Unhead →
Other CWE-184 vulnerabilities
- CVE-2026-28363 — Critical (CVSS 9.9): In OpenClaw before 2026.2.23, tools.exec.safeBins validation for sort could be bypassed via GNU long-option…
- CVE-2026-56315 — Critical (CVSS 9.8): picklescan before 1.0.4 fails to block at least seven Python standard library modules (including uuid, _osx_support,…
- CVE-2026-53873 — Critical (CVSS 9.8): picklescan before 1.0.4 contains an incomplete blocklist for the profile module that fails to block the module-level…
- CVE-2025-71323 — Critical (CVSS 9.8): picklescan before 0.0.33 fails to block the ctypes module, allowing attackers to achieve remote code execution by…
- CVE-2025-71320 — Critical (CVSS 9.8): picklescan before 0.0.33 contains an incomplete deny-list that fails to block pydoc.locate and operator.methodcaller…
- CVE-2026-41264 — Critical (CVSS 9.8): Flowise is a drag & drop user interface to build a customized large language model flow. Prior to 3.1.0, the specific…