{"api_version":"1","generated_at":"2026-04-09T20:36:39+00:00","cve":"CVE-2026-39315","urls":{"html":"https://cve.report/CVE-2026-39315","api":"https://cve.report/api/cve/CVE-2026-39315.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-39315","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-39315"},"summary":{"title":"Unhead has a hasDangerousProtocol() bypass via leading-zero padded HTML entities in useHeadSafe()","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.","state":"PUBLISHED","assigner":"GitHub_M","published_at":"2026-04-09 18:17:01","updated_at":"2026-04-09 18:17:01"},"problem_types":["CWE-184","CWE-184 CWE-184: Incomplete List of Disallowed Inputs"],"metrics":[{"version":"3.1","source":"security-advisories@github.com","type":"Secondary","score":"6.1","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","baseScore":6.1,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"CHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"6.1","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","data":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":6.1,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"}}],"references":[{"url":"https://github.com/unjs/unhead/security/advisories/GHSA-95h2-gj7x-gx9w","name":"https://github.com/unjs/unhead/security/advisories/GHSA-95h2-gj7x-gx9w","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/unjs/unhead/commit/961ea781e091853812ffe17f8cda17105d2d2299","name":"https://github.com/unjs/unhead/commit/961ea781e091853812ffe17f8cda17105d2d2299","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/unjs/unhead/releases/tag/v2.1.13","name":"https://github.com/unjs/unhead/releases/tag/v2.1.13","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-39315","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39315","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"unjs","product":"unhead","version":"affected < 2.1.13","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"product":"unhead","vendor":"unjs","versions":[{"status":"affected","version":"< 2.1.13"}]}],"descriptions":[{"lang":"en","value":"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."}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":6.1,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-184","description":"CWE-184: Incomplete List of Disallowed Inputs","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-04-09T17:54:07.488Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","shortName":"GitHub_M"},"references":[{"name":"https://github.com/unjs/unhead/security/advisories/GHSA-95h2-gj7x-gx9w","tags":["x_refsource_CONFIRM"],"url":"https://github.com/unjs/unhead/security/advisories/GHSA-95h2-gj7x-gx9w"},{"name":"https://github.com/unjs/unhead/commit/961ea781e091853812ffe17f8cda17105d2d2299","tags":["x_refsource_MISC"],"url":"https://github.com/unjs/unhead/commit/961ea781e091853812ffe17f8cda17105d2d2299"},{"name":"https://github.com/unjs/unhead/releases/tag/v2.1.13","tags":["x_refsource_MISC"],"url":"https://github.com/unjs/unhead/releases/tag/v2.1.13"}],"source":{"advisory":"GHSA-95h2-gj7x-gx9w","discovery":"UNKNOWN"},"title":"Unhead has a hasDangerousProtocol() bypass via leading-zero padded HTML entities in useHeadSafe()"}},"cveMetadata":{"assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","assignerShortName":"GitHub_M","cveId":"CVE-2026-39315","datePublished":"2026-04-09T17:54:07.488Z","dateReserved":"2026-04-06T19:31:07.266Z","dateUpdated":"2026-04-09T17:54:07.488Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-04-09 18:17:01","lastModifiedDate":"2026-04-09 18:17:01","problem_types":["CWE-184","CWE-184 CWE-184: Incomplete List of Disallowed Inputs"],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","baseScore":6.1,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"CHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE"},"exploitabilityScore":2.8,"impactScore":2.7}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"39315","Ordinal":"1","Title":"Unhead has a hasDangerousProtocol() bypass via leading-zero padd","CVE":"CVE-2026-39315","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"39315","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"Unhead has a hasDangerousProtocol() bypass via leading-zero padd"}]}}}