CVE-2024-34343
Cross-site Scripting (XSS) in navigateTo if used after SSR in nuxt
Also known as GHSA-vf6r-87q4-2vjf
Mitigation
- Upgrade nuxt to 3.12.4 or later.
Who should check
- Projects that depend on npm package nuxt (< 3.12.4)
- Anyone running nuxt < 3.12.4
Vulnerability facts
- Affected
- nuxt < 3.12.4
- Fixed in
- 3.12.4
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: Low
- EPSS
- 0.60% chance of exploitation in 30 days (percentile 42, 2026-11-26)
- CWE
- CWE-79
- Modified
Description
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-34343. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-34343.md Affected: nuxt < 3.12.4 Fixed in: 3.12.4 Steps: 1. Search this machine and project for nuxt (npm), nuxt: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2024-34343 being exploited?
There is no confirmed exploitation: CVE-2024-34343 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.60% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-34343?
Medium: CVSS 6.3 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2024-34343?
nuxt < 3.12.4.
Is there a fix for CVE-2024-34343?
Yes. Fixed in 3.12.4. Upgrade nuxt to 3.12.4 or later.
How do I check if I'm affected by CVE-2024-34343?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.