{"answers":{"affected":"2 open source packages ship an affected version, including nuxt. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-34343 exists.","fix":"Upgrade nuxt to 3.12.4 or later.","what":"CVE-2024-34343 is a medium-severity cross-site scripting vulnerability in nuxt, published on 5 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-34343 and fix it if it is affected.\n\nWhat it is: CVE-2024-34343 is a medium-severity cross-site scripting vulnerability in nuxt, published on 5 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-34343 exists.\n\nAffected packages and fixed versions:\n- nuxt (npm): affected all versions; fixed in 3.12.4\n- nuxt (npm): affected all versions; fixed in 3.12.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-34343/ (Markdown: https://insights.sbomify.com/CVE-2024-34343/index.md)","id":"CVE-2024-34343","markdown":"https://insights.sbomify.com/CVE-2024-34343/index.md","name":"CVE-2024-34343","record":{"aliases":["CLSA-2026-1775781170","CLSA-2026-1775781171","CLSA-2026-1775781180","GHSA-vf6r-87q4-2vjf"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Nuxt web framework","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript via crafted URLs in Nuxt applications after Server-Side Rendering due to flawed protocol validation.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"nuxt","vendor":"nuxt"}],"cvss":{"score":6.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Cross-site Scripting (XSS) in navigateTo if used after SSR in nuxt","id":"CVE-2024-34343","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":2,"n_references":1,"next":{"headline":"Remote code execution via the browser when running the test locally in nuxt","id":"CVE-2024-34344"},"packages":[{"ecosystem":"npm","fixed":["3.12.4"],"introduced":["0"],"last_affected":[],"package":"nuxt","purl":null,"source":"GHSA-vf6r-87q4-2vjf"},{"ecosystem":"npm","fixed":["3.12.4"],"introduced":["0"],"last_affected":[],"package":"nuxt","purl":"pkg:npm/nuxt","source":"GHSA-vf6r-87q4-2vjf"}],"prev":{"headline":"react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF","id":"CVE-2024-34342"},"products":["nuxt"],"published":"2024-08-05","related":[{"cvss_score":8.8,"headline":"Nuxt: Route-rule middleware bypass via case-sensitivity mismatch between vue-router and the routeRules matcher","id":"CVE-2026-53721","kev_date_added":null,"published":"2026-06-12"},{"cvss_score":8.8,"headline":"Path Traversal: '../filedir' in Nuxt Devtools","id":"CVE-2024-23657","kev_date_added":null,"published":"2024-08-05"},{"cvss_score":8.8,"headline":"Remote code execution via the browser when running the test locally in nuxt","id":"CVE-2024-34344","kev_date_added":null,"published":"2024-08-05"},{"cvss_score":8.6,"headline":"Server-Side Request Forgery (SSRF) in nuxt-icon","id":"CVE-2024-42352","kev_date_added":null,"published":"2024-08-05"},{"cvss_score":8.1,"headline":"Code Injection in nuxt/nuxt","id":"CVE-2023-3224","kev_date_added":null,"published":"2023-06-13"},{"cvss_score":7.5,"headline":"Nuxt allows DOS via cache poisoning with payload rendering response","id":"CVE-2025-27415","kev_date_added":null,"published":"2025-03-19"},{"cvss_score":6.8,"headline":"Nuxt - Arbitrary File Read via World-Connectable vite-node IPC Socket on Linux","id":"CVE-2026-56301","kev_date_added":null,"published":"2026-06-23"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-08","vendors":["nuxt"]},"summary":"Attackers can execute arbitrary JavaScript via crafted URLs in Nuxt applications after Server-Side Rendering due to flawed protocol validation.","url":"https://insights.sbomify.com/CVE-2024-34343/"}