{"cve":"CVE-2026-39315","nvd":{"published":"2026-04-09T18:17:01.433","modified":"2026-10-26T21:10:00.170","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-184"],"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","https://github.com/unjs/unhead/security/advisories/GHSA-95h2-gj7x-gx9w"],"products":["unjs:unhead"],"source":"nvd","synced_at":"2026-10-26T21:38:48.864438205+00:00"},"epss":{"cve":"CVE-2026-39315","score":0.00285,"percentile":0.20815,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-95h2-gj7x-gx9w","url":"https://osv.dev/vulnerability/GHSA-95h2-gj7x-gx9w","summary":"Unhead has a hasDangerousProtocol() bypass via leading-zero padded HTML entities in useHeadSafe()","modified":"2026-04-09T20:41:24.335154Z","packages":[{"ecosystem":"npm","name":"unhead","purl":"pkg:npm/unhead","ranges":["<2.1.13"],"fixed":["2.1.13"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}