Nuxt: Reflected XSS in `<NuxtLink>` via unsanitised `javascript:` or `data:` URL (CVE-2026-53722)
Nuxt versions prior to 4.4.7 and 3.21.7 contain a reflected DOM-based cross-site scripting (XSS) vulnerability in the <NuxtLink> component. This occurs because the component does not validate URL schemes in its 'to' or 'href' props, allowing attacker-controlled inputs with 'javascript:', 'vbscript:', or 'data:' URLs to be rendered directly into anchor href attributes. Clicking such links can execute malicious scripts in the application's origin or enable phishing attacks. The issue affects applications that bind user input to <NuxtLink> URLs, such as user profiles, CMS fields, or marketplace listings. The vulnerability is fixed in [email protected] and [email protected] by sanitizing and rejecting script-capable URL schemes before rendering.
AI Analysis
Technical Summary
<NuxtLink> did not validate the URL scheme of values bound to its 'to' or 'href' props before rendering them into the href attribute of the underlying anchor element. This allowed attacker-controlled inputs containing 'javascript:', 'vbscript:', or 'data:text/html,...' URLs to be reflected verbatim, resulting in reflected DOM-based XSS or same-tab phishing surfaces. The vulnerability arises because the external link detection treated any URL with a protocol as external and rendered it without rejecting script-capable protocols, unlike the navigateTo function which had script protocol checks. The flaw affects any Nuxt application binding user-controlled values to <NuxtLink :to> or :href, including profile links, CMS-driven URLs, and marketplace listings. The issue was fixed in [email protected] and backported to [email protected] by sanitizing the href before rendering, stripping control characters and whitespace, unwrapping 'view-source:' prefixes, and replacing script-capable schemes with an empty string.
Potential Impact
Applications using vulnerable Nuxt versions that bind user-controlled input to <NuxtLink :to> or :href are susceptible to reflected DOM-based XSS attacks. This can lead to session theft (for non-HttpOnly cookies), CSRF token theft, account takeover via DOM manipulation, and credential harvesting through fake login overlays. Additionally, 'data:text/html,...' payloads enable same-tab phishing attacks anchored to legitimate application links. The vulnerability compromises the security of the first-party origin and user trust.
Mitigation Recommendations
A fix is available in [email protected] and [email protected]. Upgrade to these or later versions to remediate the vulnerability. The fix sanitizes external href values by stripping control characters and whitespace, unwrapping 'view-source:' prefixes, and replacing script-capable URL schemes with an empty string before rendering. Until upgrading, validate URLs at the source before binding them to <NuxtLink :to> or :href, for example by only accepting paths starting with '/' or by using URL parsing to allow only safe protocols such as 'http:' and 'https:'.
Nuxt: Reflected XSS in `<NuxtLink>` via unsanitised `javascript:` or `data:` URL (CVE-2026-53722)
Description
Nuxt versions prior to 4.4.7 and 3.21.7 contain a reflected DOM-based cross-site scripting (XSS) vulnerability in the <NuxtLink> component. This occurs because the component does not validate URL schemes in its 'to' or 'href' props, allowing attacker-controlled inputs with 'javascript:', 'vbscript:', or 'data:' URLs to be rendered directly into anchor href attributes. Clicking such links can execute malicious scripts in the application's origin or enable phishing attacks. The issue affects applications that bind user input to <NuxtLink> URLs, such as user profiles, CMS fields, or marketplace listings. The vulnerability is fixed in [email protected] and [email protected] by sanitizing and rejecting script-capable URL schemes before rendering.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
<NuxtLink> did not validate the URL scheme of values bound to its 'to' or 'href' props before rendering them into the href attribute of the underlying anchor element. This allowed attacker-controlled inputs containing 'javascript:', 'vbscript:', or 'data:text/html,...' URLs to be reflected verbatim, resulting in reflected DOM-based XSS or same-tab phishing surfaces. The vulnerability arises because the external link detection treated any URL with a protocol as external and rendered it without rejecting script-capable protocols, unlike the navigateTo function which had script protocol checks. The flaw affects any Nuxt application binding user-controlled values to <NuxtLink :to> or :href, including profile links, CMS-driven URLs, and marketplace listings. The issue was fixed in [email protected] and backported to [email protected] by sanitizing the href before rendering, stripping control characters and whitespace, unwrapping 'view-source:' prefixes, and replacing script-capable schemes with an empty string.
Potential Impact
Applications using vulnerable Nuxt versions that bind user-controlled input to <NuxtLink :to> or :href are susceptible to reflected DOM-based XSS attacks. This can lead to session theft (for non-HttpOnly cookies), CSRF token theft, account takeover via DOM manipulation, and credential harvesting through fake login overlays. Additionally, 'data:text/html,...' payloads enable same-tab phishing attacks anchored to legitimate application links. The vulnerability compromises the security of the first-party origin and user trust.
Mitigation Recommendations
A fix is available in [email protected] and [email protected]. Upgrade to these or later versions to remediate the vulnerability. The fix sanitizes external href values by stripping control characters and whitespace, unwrapping 'view-source:' prefixes, and replacing script-capable URL schemes with an empty string before rendering. Until upgrading, validate URLs at the source before binding them to <NuxtLink :to> or :href, for example by only accepting paths starting with '/' or by using URL parsing to allow only safe protocols such as 'http:' and 'https:'.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-934w-87qh-qr26
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-53722"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a7ff5fabf8831d5398804e2
Added to database: 08/15/2026, 05:15:38 UTC
Last enriched: 08/15/2026, 05:42:02 UTC
Last updated: 08/16/2026, 00:41:14 UTC
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.