Nuxt Security Flaw: CVE-2024-34343 Exposes navigateTo Function to JavaScript Protocol Bypass
A critical security vulnerability in the Nuxt framework, tracked as CVE-2024-34343, exposes applications to potential JavaScript protocol injection attacks. The flaw resides in the `navigateTo` function, which fails to correctly block the `javascript:` protocol due to improper use of the underlying `unjs/ufo` library's APIs and parsing discrepancies. This failure could allow malicious actors to execute arbitrary code in the context of a user's browser, posing a significant risk to web application security.
The vulnerability was flagged in a GitHub dependency update pull request, which sought to upgrade the Nuxt package from version 2.14.9 to the patched version 3.12.4. The advisory from the Nuxt security team details that the function's initial validation test is insufficient, creating a direct path for protocol bypass. This is not a theoretical concern; it is a concrete implementation flaw in a core routing utility used by countless Vue.js-based web applications.
The discovery triggers immediate pressure on development teams to apply the update. For projects still on Nuxt 2.x, this represents a forced migration path to version 3 to obtain the fix, introducing potential breaking changes and upgrade complexity. The alert underscores the persistent risk in modern web development toolchains, where a single library's parsing error can cascade into a widespread client-side security exposure. Maintaining outdated dependencies now carries a quantifiable and actively exploited risk.