Cross-site Scripting (XSS) in navigateTo if used after SSR in nuxt
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
Nuxt is a free and open-source framework to create full-stack web applications and websites with Vue.js. The `navigateTo` function attempts to blockthe `javascript:` protocol, but does not correctly use API's provided by `unjs/ufo`. This library also contains parsing discrepancies. The function first tests to see if the specified URL has a protocol. This uses the unjs/ufo package for URL parsing. This function works effectively, and returns true for a javascript: protocol. After this, the URL is parsed using the parseURL function. This function will refuse to parse poorly formatted URLs. Parsing javascript:alert(1) returns null/"" for all values. Next, the protocol of the URL is then checked using the isScriptProtocol function. This function simply checks the input against a list of protocols, and does not perform any parsing. The combination of refusing to parse poorly formatted URLs, and not performing additional parsing means that script checks fail as no protocol can be found. Even if a protocol was identified, whitespace is not stripped in the parseURL implementation, bypassing the isScriptProtocol checks. Certain special protocols are identified at the top of parseURL. Inserting a newline or tab into this sequence will block the special protocol check, and bypass the latter checks. This ONLY has impact after SSR has occured, the `javascript:` protocol within a location header does not trigger XSS. This issue has been addressed in release version 3.12.4 and all users are advised to upgrade. There are no known workarounds for this vulnerability.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nuxt | nuxt | before 3.12.4 | 3.12.4 | Patch available | CNA |
| — | nuxt (npm) | before 3.12.4 | 3.12.4 | Patch available | GHSA-vf6r-87q4-2vjf |
- nuxt Vendornuxt Affected before 3.12.4 Fixed in 3.12.4 Patch available CNA
- nuxt (npm) Vendor— Affected before 3.12.4 Fixed in 3.12.4 Patch available GHSA-vf6r-87q4-2vjf
Remediation
- Fix · CNA nuxt (nuxt) Fixed in 3.12.4
- Fix · GHSA-vf6r-87q4-2vjf nuxt (npm) Fixed in 3.12.4 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-34343
- 2026-10-03 Alias added: GHSA-vf6r-87q4-2vjf
References
More Nuxt vulnerabilities
- TI-2023-03020 Code Injection in nuxt/nuxt CVSS 3.1CRITICAL 9.8
- TI-2024-28339 Server-Side Request Forgery (SSRF) in nuxt-icon CVSS 3.1HIGH 8.6
- TI-2024-22685 Remote code execution via the browser when running the test locally in nuxt CVSS 3.1HIGH 8.8
- TI-2026-34788 Nuxt: Route middleware not enforced when rendering `.server.vue` pages via `/__nuxt_island/page_*` CVSS 4.0MEDIUM 6.3
- TI-2023-00833 Cross-site Scripting (XSS) - Generic in nuxt/framework CVSS 3.1MEDIUM 6.1
- TI-2026-33411 Nuxt: Reflected XSS in `navigateTo()` external redirect CVSS 4.0MEDIUM 5.3
Sources
- CVE-2024-34343 · CVE Program
- CVE-2024-34343 · NVD
- FIRST EPSS
- GHSA-vf6r-87q4-2vjf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences