Skip to main content

Nuxt CVE-2026-45669

| EUVDEUVD-2026-36420 MEDIUM
Improper Neutralization of Script in Attributes in a Web Page (CWE-83)
2026-05-19 https://github.com/nuxt/nuxt GHSA-fx6j-w5w5-h468
5.3
CVSS 4.0 · Vendor: https://github.com/nuxt/nuxt
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft URL with `>` and `<img onerror>` script payload
  2. Delivery
    Deliver phishing link targeting redirect parameter (e.g., `?next=`)
  3. Exploit
    Victim requests URL from Nuxt SSR server
  4. Execution
    Server interpolates unencoded URL into meta-refresh HTML body
  5. Persist
    `>` character breaks out of `content` attribute boundary
  6. Impact
    Injected script executes JavaScript in application origin

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Attribute value escaping
Exploitation Conditions

Exploitation requires that the target Nuxt application calls navigateTo(url, { external: true }) with a URL string derived from user-controlled input - most commonly a ?next= or ?redirect= query parameter in post-login or 'return to' redirect flows. The vulnerable code path is exclusively server-side: the injectable HTML body is only generated during SSR; applications deployed in client-side-only (SPA) mode do not generate the meta-refresh response body and are not affected. No authentication is required - the attacker sends a crafted GET request to any publicly accessible route that triggers the vulnerable redirect logic. Exploitation is strictly limited to code paths where user input reaches navigateTo(url, { external: true }); applications using navigateTo() only with hardcoded or internally validated URLs are unaffected. The Location HTTP header is not injectable (it uses the correct encodeURL() path); only the HTML response body is the attack surface. Victim interaction (clicking a crafted link) is required, as this is a reflected rather than stored XSS.

Impact

No CVSS score or vector is provided for this CVE, and no EPSS data is available, preventing quantitative risk scoring. This CVE does not appear in CISA KEV, so active exploitation in the wild is not confirmed. However, a full proof-of-concept is published in the public GitHub Security Advisory, materially lowering the bar for exploitation. The attack pattern - a crafted GET request to any endpoint exposing a redirect parameter - requires no authentication and no special attacker capabilities beyond the ability to deliver a link to a victim. The XSS payload executes in the application's origin before the meta-refresh fires, giving full access to session cookies (absent HttpOnly), localStorage, and in-page DOM. The practical blast radius is bounded by application design: only code paths that pass user-controlled strings to navigateTo(url, { external: true }) are affected. The post-login redirect flow (?next=, ?redirect=) is extremely common in Nuxt applications, making this a real priority for any application implementing that pattern. Given POC availability and the prevalence of the affected pattern, real-world risk is high for affected deployments despite the absence of a CVSS vector or KEV listing.

Exploit ScenarioDerived

An attacker targets a Nuxt application exposing a ?next= query parameter in its post-login flow, where the parameter value is passed directly to navigateTo(next, { external: true }). The attacker crafts a URL such as https://app.example.com/login?next=https://evil.example/x><img src=x onerror=alert(document.domain)> and delivers it via a phishing email or social engineering link. When a victim clicks the link and the Nuxt SSR server renders the redirect response, the > character terminates the content attribute, the <img onerror> payload is emitted as a sibling HTML element, and the attacker's JavaScript executes in the application's origin - before the meta-refresh redirect fires - with access to cookies, tokens, and DOM. A full working proof-of-concept demonstrating this exact attack is published in GHSA-fx6j-w5w5-h468.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 19, 2026

Reflected XSS in Nuxt's navigateTo() function allows remote attackers to inject and execute arbitrary JavaScript in the application's origin during server-side rendering. Applications passing user-controlled input to navigateTo(url, { external: true }) - the common post-login ?next= or ?redirect= redirect pattern - are affected across nuxt versions 3.4.3-3.21.5 and 4.0.0-alpha.1-4.4.5. A full proof-of-concept is published in the GitHub Security Advisory GHSA-fx6j-w5w5-h468; no public exploit identified at time of analysis beyond that PoC, and this CVE does not appear in CISA KEV.

RemediationAI

Upgrade to nuxt 3.21.6 (v3 branch) or nuxt 4.4.6 (v4 branch), which resolve this issue by replacing the narrow double-quote-only encoder with a full HTML-attribute encoder covering &, ", ', <, and > - implemented via pull request https://github.com/nuxt/nuxt/pull/35052. If immediate upgrade is not possible, add application-level input validation before any call to navigateTo(url, { external: true }): normalize the input through new URL(input).toString() and reject any value whose normalized form still contains < or >, as a correctly normalized URL never contains these characters raw. This workaround requires modifying every call site that accepts user-controlled redirect targets and may reject unusual but technically valid URLs that contain these characters in fragments - a trade-off that is acceptable given the security benefit. CSP alone is not a reliable compensating control because it cannot universally block inline script execution injected via attribute breakout across all browser versions and configurations.

Affected VersionsENISA

nuxt 4.0.0-alpha.1, < 4.4.6
nuxt 3.4.3, < 3.21.6

Affected Packages

npm nuxt fix: 3.21.6, 4.4.6
euvd nuxt_4_0_0_alpha_1 fix: 4.4.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in packages/nuxt/src/app/composables/router.ts within the Nuxt.js SSR framework (pkg:npm/nuxt). When navigateTo() is called with external: true during server-side rendering, Nuxt constructs an HTML redirect response body embedding the destination URL in a <meta http-equiv="refresh" content="0; url=..."> tag. Prior to the fix, only the double-quote character was encoded (" → %22), while HTML-attribute-significant characters <, >, &, and ' were passed through unencoded. This contrasts with the Location HTTP header path, which correctly routes through encodeURL() backed by the browser URL constructor and fully percent-encodes these characters. CWE-83 (Improper Neutralization of Script in Attributes in a Web Page) describes this root cause precisely: insufficient output encoding when interpolating untrusted data into an HTML attribute context, enabling attribute boundary breakout. This is a distinct root cause from CVE-2024-34343 (GHSA-vf6r-87q4-2vjf), which blocked javascript: protocol injection but left the HTML encoding gap unaddressed.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/nuxt/nuxt) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (https://github.com/nuxt/nuxt) · only source for this CVE.

CVSS VectorVendor: https://github.com/nuxt/nuxt

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jun 12, 2026 - 14:22 NVD
5.3 (MEDIUM)

DescriptionCVE.org

Summary

navigateTo() with external: true generates a server-side HTML redirect body containing a <meta http-equiv="refresh"> tag. The destination URL is only sanitized by replacing " with %22, leaving <, >, &, and ' unencoded. An attacker who can influence the URL passed to navigateTo(url, { external: true }) can break out of the content="…" attribute and inject arbitrary HTML/JavaScript that executes under the application's origin.

This is a different root cause from CVE-2024-34343 (GHSA-vf6r-87q4-2vjf), which addressed javascript: protocol bypass. The issue here is triggered by any valid URL containing >.

Impact

Applications that pass user-controlled input to navigateTo(url, { external: true }) - typically via a ?next= / ?redirect= query parameter used for post-login or "return to" flows - are vulnerable to reflected cross-site scripting. The injected script runs in the context of the application's origin during the server-rendered redirect response, before the meta-refresh fires.

Details

In packages/nuxt/src/app/composables/router.ts, the SSR redirect path builds an HTML response body with only " percent-encoded in the destination URL:

ts
const encodedLoc = location.replace(/"/g, '%22')
nuxtApp.ssrContext!['~renderResponse'] = {
status: sanitizeStatusCode(options?.redirectCode || 302, 302),
body: `<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${encodedLoc}"></head></html>`,
headers: { location: encodeURL(location, isExternalHost) },
}

The Location header is normalised through encodeURL() (which uses the URL constructor and correctly percent-encodes attribute-significant characters). The HTML body uses a narrower sanitiser. That mismatch is the root cause.

Proof of concept

Global middleware that forwards a query parameter to navigateTo:

ts
// middleware/redirect.global.ts
export default defineNuxtRouteMiddleware((to) => {
const next = to.query.next as string | undefined
if (next) {
 return navigateTo(next, { external: true })
}
})

Request:

GET /?next=https://evil.example/x><img src=x onerror=alert(document.domain)>

Response body:

html
<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=https://evil.example/x><img src=x onerror=alert(document.domain)>"></head></html>

The > after evil.example/x terminates the content="…" attribute, and the <img onerror> tag executes JavaScript in the application's origin before any redirect occurs.

Patches

Fixed in nuxt@4.4.6 and nuxt@3.21.6 by #35052. The fix percent-encodes the full set of HTML-attribute-significant characters (&, ", ', <, >) before interpolating the URL into the meta-refresh body

Workarounds

If you can't upgrade immediately, validate user-controlled URLs before passing them to navigateTo(url, { external: true }). At minimum, normalise through new URL(input).toString() and reject inputs containing < or > (a normalised URL with these characters is malformed and safe to refuse).

Threat Intelligence Overview

EPSS Score
0.1%
Top 81% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy