CVE-2024-34343

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-34343
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-34343.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-34343
Aliases
Published
2024-08-05T21:15:38Z
Modified
2025-07-29T11:10:16.186801Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/nuxt/nuxt

Affected ranges

Type
GIT
Repo
https://github.com/nuxt/nuxt
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

3.*

3.1.1

@nuxt/ui-assets@0.*

@nuxt/ui-assets@0.1.0
@nuxt/ui-assets@0.2.0
@nuxt/ui-assets@0.2.1

@nuxt/ui-templates@0.*

@nuxt/ui-templates@0.1.0
@nuxt/ui-templates@0.1.1
@nuxt/ui-templates@0.2.0
@nuxt/ui-templates@0.2.1
@nuxt/ui-templates@0.2.2
@nuxt/ui-templates@0.3.0
@nuxt/ui-templates@0.3.1
@nuxt/ui-templates@0.3.2
@nuxt/ui-templates@0.3.3
@nuxt/ui-templates@0.4.0

@nuxt/ui-templates@1.*

@nuxt/ui-templates@1.1.0
@nuxt/ui-templates@1.1.1
@nuxt/ui-templates@1.2.0
@nuxt/ui-templates@1.2.1
@nuxt/ui-templates@1.3.0
@nuxt/ui-templates@1.3.1
@nuxt/ui-templates@1.3.2
@nuxt/ui-templates@1.3.3

@nuxt/ui@0.*

@nuxt/ui@0.1.0
@nuxt/ui@0.1.1
@nuxt/ui@0.2.0
@nuxt/ui@0.3.0
@nuxt/ui@0.3.1
@nuxt/ui@0.3.2
@nuxt/ui@0.3.3
@nuxt/ui@0.4.0
@nuxt/ui@0.4.1

v3.*

v3.0.0
v3.0.0-rc.1
v3.0.0-rc.10
v3.0.0-rc.11
v3.0.0-rc.12
v3.0.0-rc.13
v3.0.0-rc.14
v3.0.0-rc.2
v3.0.0-rc.3
v3.0.0-rc.4
v3.0.0-rc.5
v3.0.0-rc.6
v3.0.0-rc.7
v3.0.0-rc.8
v3.0.0-rc.9
v3.1.0
v3.1.1
v3.1.2
v3.10.0
v3.10.1
v3.10.2
v3.10.3
v3.11.0
v3.11.1
v3.11.2
v3.12.0
v3.12.1
v3.12.2
v3.12.3
v3.2.0
v3.2.1
v3.2.2
v3.2.3
v3.3.0
v3.3.1
v3.3.2
v3.3.3
v3.4.0
v3.4.1
v3.4.2
v3.4.3
v3.5.0
v3.5.1
v3.5.2
v3.5.3
v3.6.0
v3.6.1
v3.6.2
v3.6.3
v3.6.4
v3.6.5
v3.7.0
v3.7.1
v3.7.2
v3.7.3
v3.7.4
v3.8.0
v3.8.1
v3.8.2
v3.9.0
v3.9.1
v3.9.2
v3.9.3