2.3low
Nuxt - Cross-Site Scripting via NoScript Component Slot Content
- Severity
- 2.3low CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.26% (higher than 18% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-m3q2-p4fw-w38m
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Nuxt Nuxt | from 4.0.0 before 4.4.7, before 3.21.7 Not affected: 4.4.7, 3.21.7 | CVE List, NVD |
| nuxt (npm) | from 4.0.0 before 4.4.7, before 3.21.7 | GitHub Advisory Database |
All scores
| VulnCheck | 2.3low CVSS:4.0 | 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 |
| GitHub | low CVSS:4.0 | 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 |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
Nuxt'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.
Applications that placed untrusted, attacker-controllable data inside a <NoScript> slot, for example:
<NoScript>{{ route.query.banner }}</NoScript>
would 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.
Sibling head components (<Style>, <Title>) were not affected because they already routed slot text through the safe textContent path.
Affected versions
All currently supported versions of nuxt that ship the <NoScript> global component.
Patches
Fixed in nuxt@4.4.7 (commit 4b054e9d) and backported to nuxt@3.21.7 (commit 7fea9fd6). 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.
Workarounds
Until you can upgrade:
- Do not interpolate untrusted input into
<NoScript>slots. Replace<NoScript>{{ x }}</NoScript>with a static string, or sanitise / HTML-escapexat the source. - If you must render dynamic noscript content, write the tag yourself via
useHead({ noscript: [{ textContent: escapedValue }] })after escapingescapedValue.
Credit
Reported to Anthropic's coordinated vulnerability disclosure pipeline by Claude (Anthropic's AI assistant) and triaged by the Anthropic security team. Reference: ANT-2026-4NJYDFFM.
Independently reported by @alcls01111 via GitHub's coordinated disclosure flow (GHSA-8grp-wcq9-925q), closed as a duplicate of this advisory.
References
| https://github.com/nuxt/nuxt/security/advisories/GHSA-m3q2-p4fw-w38m | mitigation, patch, vendor-advisory, web | |
| https://github.com/nuxt/nuxt/commit/4b054e9d95f8daf366cb144b52782047c511a66e | patch, web | |
| https://github.com/nuxt/nuxt/commit/7fea9fd687f1dacbfb63db5fae5839896b017a0e | patch, web | |
| https://www.vulncheck.com/advisories/nuxt-cross-site-scripting-via-noscript-component-slot-content | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-56317 | advisory | |
| https://github.com/nuxt/nuxt | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-56317 changed 2026-11-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-m3q2-p4fw-w38m changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-56317 changed 2026-06-24 | Public domain |