PT-2026-31676 · Git+2 · Unhead

·

CVE-2026-39315

·

Published

2026-04-09

·

Updated

2026-04-10

CVSS v3.1

6.1

Medium

VectorAV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Name of the Vulnerable Software and Affected Versions Unhead versions prior to 2.1.13
Description The useHeadSafe() composable fails to properly sanitize user-supplied content intended for the document head. The hasDangerousProtocol() function in packages/unhead/src/plugins/safe.ts uses regular expressions with fixed-width digit caps to decode HTML entities before checking for blocked URI schemes such as javascript:, data:, and vbscript:. Because the HTML5 specification allows an unlimited number of leading zeros in numeric character references, entities that exceed these digit caps are skipped by the decoder. Consequently, the startsWith('javascript:') check is bypassed, and the makeTagSafe() function writes the raw value into the Server-Side Rendering (SSR) HTML output. The browser then natively decodes these padded entities, allowing the execution of blocked URIs.
Recommendations Update to version 2.1.13.

Exploit

Fix

Incomplete List of Disallowed Inputs

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-39315
GHSA-95H2-GJ7X-GX9W

Affected Products

Unhead