{"id":"CVE-2026-56317","aliases":["CVE-2026-56317","GHSA-m3q2-p4fw-w38m"],"related":[],"kind":"vulnerability","state":"published","title":"Nuxt - Cross-Site Scripting via NoScript Component Slot Content","summary":"Nuxt before 4.4.7 (and the 3.x branch before 3.21.7) contains a cross-site scripting vulnerability in the NoScript component that writes slot content to innerHTML without escaping. Attackers can inject malicious scripts through untrusted data in NoScript slots, such as route.query parameters, which execute in the document context when the noscript tag is implicitly closed by script tags.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Nuxt before 4.4.7 (and the 3.x branch before 3.21.7) contains a cross-site scripting vulnerability in the NoScript component that writes slot content to innerHTML without escaping. Attackers can inject malicious scripts through untrusted data in NoScript slots, such as route.query parameters, which execute in the document context when the noscript tag is implicitly closed by script tags.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nNuxt's globally registered `<NoScript>` component (from `@unhead/vue` head components, re-exported by Nuxt) wrote its default-slot content to the `innerHTML` of the `<noscript>` head tag, bypassing the HTML escaping that `{{ }}` interpolation normally applies in Vue templates.\n\nApplications that placed untrusted, attacker-controllable data inside a `<NoScript>` slot, for example:\n\n```vue\n<NoScript>{{ route.query.banner }}</NoScript>\n```\n\nwould emit that value unescaped inside `<noscript>` in the server-rendered HTML. With scripting enabled, the HTML parser treats `<noscript>` content in `<head>` under the \"in head noscript\" insertion mode: any tag other than `link`, `meta`, `noframes`, or `style` implicitly closes `<noscript>` and is re-processed in the head. A payload such as `<script>...</script>` therefore escapes the element and executes in the document context.\n\nSibling head components (`<Style>`, `<Title>`) were not affected because they already routed slot text through the safe `textContent` path.\n\n### Affected versions\n\nAll currently supported versions of `nuxt` that ship the `<NoScript>` global component.\n\n### Patches\n\nFixed in `nuxt@4.4.7` (commit [`4b054e9d`](https://github.com/nuxt/nuxt/commit/4b054e9d95f8daf366cb144b52782047c511a66e)) and backported to `nuxt@3.21.7` (commit [`7fea9fd6`](https://github.com/nuxt/nuxt/commit/7fea9fd687f1dacbfb63db5fae5839896b017a0e)). The fix escapes `<NoScript>` slot content with `escapeHtml` from `@vue/shared` and writes it to `textContent` rather than `innerHTML`. Slot content is now rendered as text; intentional markup inside `<NoScript>` is no longer parsed as HTML.\n\n### Workarounds\n\nUntil you can upgrade:\n\n- Do not interpolate untrusted input into `<NoScript>` slots. Replace `<NoScript>{{ x }}</NoScript>` with a static string, or sanitise / HTML-escape `x` at the source.\n- If you must render dynamic noscript content, write the tag yourself via `useHead({ noscript: [{ textContent: escapedValue }] })` after escaping `escapedValue`.\n\n### Credit\n\nReported to Anthropic's coordinated vulnerability disclosure pipeline by Claude (Anthropic's AI assistant) and triaged by the Anthropic security team. Reference: ANT-2026-4NJYDFFM.\n\nIndependently reported by [@alcls01111](https://github.com/alcls01111) via GitHub's coordinated disclosure flow (`GHSA-8grp-wcq9-925q`), closed as a duplicate of this advisory.","format":"markdown","source":"ghsa"}],"published":"2026-06-16T23:38:47.000Z","modified":"2026-11-08T14:05:58.678Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":2.3,"rating":"LOW"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":2.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS: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,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"4.0.0","fixed":"4.4.7","status":"affected"},{"type":"semver","version":"4.4.7","status":"unaffected"}],"vendor":"Nuxt","product":"Nuxt","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"3.21.7","status":"affected"},{"type":"semver","version":"3.21.7","status":"unaffected"}],"vendor":"Nuxt","product":"Nuxt","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.4.7"}],"ecosystem":"npm","package":"nuxt","purl":"pkg:npm/nuxt","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.21.7"}],"ecosystem":"npm","package":"nuxt","purl":"pkg:npm/nuxt","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.21.7"},{"status":"affected","introduced":"4.0.0","fixed":"4.4.7"}],"vendor":"nuxt","product":"nuxt","cpe":"cpe:2.3:a:nuxt:nuxt:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nuxt/nuxt/security/advisories/GHSA-m3q2-p4fw-w38m","tags":["mitigation","patch","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nuxt/nuxt/commit/4b054e9d95f8daf366cb144b52782047c511a66e","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nuxt/nuxt/commit/7fea9fd687f1dacbfb63db5fae5839896b017a0e","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/nuxt-cross-site-scripting-via-noscript-component-slot-content","tags":["patch","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56317","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nuxt/nuxt","tags":["package"],"sources":["ghsa"]}],"credits":["alcls01111"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-24T17:52:47.230Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-56317","url":"https://www.cve.org/CVERecord?id=CVE-2026-56317","licence":"CVE Terms of Use","modified":"2026-11-08T14:05:58.678Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-m3q2-p4fw-w38m","url":"https://github.com/advisories/GHSA-m3q2-p4fw-w38m","licence":"CC-BY-4.0","modified":"2026-09-10T00:00:07.977Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-56317","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56317","licence":"Public domain","modified":"2026-06-24T19:17:13.783Z"}],"updatedAt":"2026-11-25T22:59:25.305Z","epss":{"score":0.00258,"percentile":0.18671,"date":"2026-12-01T12:00:22.000Z"}}