Skip to content
MediumVulnerability

GHSA-c9cv-mq2m-ppp3: Nuxt: URL-handling weaknesses in `navigateTo` and `reloadNuxtApp`: SSR open redirect, client-side script execution via the `open` option, and protocol-relative bypass in `reloadNuxtApp`

Published
Record updated
View JSON
Affected
  • nuxt < 3.21.7, fixed in 3.21.7, released June 2, 2026, 14 days before disclosure
  • nuxt >= 4.0.0, < 4.4.7, fixed in 4.4.7, released June 2, 2026, 14 days before disclosure

Summary

GHSA-c9cv-mq2m-ppp3 describes three URL-handling weaknesses in Nuxt's `navigateTo` and `reloadNuxtApp` APIs. A path-normalisation bypass lets inputs such as `/..//evil.com` become protocol-relative redirects in SSR responses, and `navigateTo({ open })` and `reloadNuxtApp({ path })` can run script URLs or redirect cross-origin.

Mitigation

Fixed in `nuxt@4.4.7` and backported to `nuxt@3.21.7`, with separate commits for each of the three sinks. Workarounds for the first sink: validate redirect targets before `navigateTo`, for example by rejecting input where `new URL(target, 'http://localhost').pathname` starts with `//`, or by accepting only an allow-list of paths. For the second sink, reject user-controlled URLs whose protocol is not in an allow-list, typically just `http:` and `https:`.