Packages / @nuxt/ui / Security

ModerateVulnerabilityGHSA-gj2h-2fpw-fhv9Published 2 Jul 2026

@nuxt/ui: UAuthForm / UForm SSR markup omits `method`, leaking credentials via GET if submitted before hydration

Affected releases · @nuxt/ui

  • 4.x4.0.0 – 4.8.0Fixed in 4.8.1
  • 3.x3.0.0 – 3.3.7No fix on this line yet
  • 2.x and older0.1.0 – 2.22.3No fix, no longer updated

On 4.x, the newest line:

npm install @nuxt/ui@4.8.1
4.x
  1. Affected

    4.0.0 – 4.8.0

    14 releases

  2. Fixed

    4.8.1 – 4.12.0

    9 releases, latest

3.x
  1. Affected

    3.0.0 – 3.3.7

    16 releases

2.x
  1. Affected

    2.8.0 – 2.22.3

    37 releases

0.x
  1. Affected

    0.1.0 – 0.4.1

    9 releases

85 stable releases of @nuxt/ui, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for @nuxt/ui. It is read in your browser and sent nowhere.

What happens

Summary

UForm and UAuthForm render a server-side <form> element with no method and no action attribute, relying on a hydrated @submit.prevent handler to intercept submission. If a user submits the form before Vue hydration has attached the handler (autofill plus Enter on a slow network, JS bundle blocked by CSP or CDN failure, etc.), the browser performs the native default: a GET to the current URL with every named field, including <input type="password">, serialised into the query string.

Details

src/runtime/components/Form.vue (around the template's <form> element) emits:

<component
  :is="parentBus ? 'div' : 'form'"
  :id="formId"
  ref="formRef"
  :class="ui({ class: [uiProp?.base, props.class] })"
  @submit.prevent="onSubmitWrapper"
>

No method, no action. @submit.prevent is the only thing stopping native submission, and it only exists after hydration. UAuthForm composes UForm and inherits the same shape.

The SSR snapshot of UAuthForm (test/components/__snapshots__/AuthForm.spec.ts.snap) shows the rendered markup, with <input type="password" name="password"> inside a <form> that has no method.

Proof of concept

Reported by @nimonian:

  1. Create a minimal Nuxt app with a UAuthForm.

  2. Build for production and visit in a browser with network throttling at 4G or slower.

  3. Enter credentials.

  4. Submit (or let autofill + Enter fire before hydration).

The URL becomes /login?email=…&password=…. Reproducible deterministically in Playwright by triggering submit immediately on load.

Impact

Any application using UAuthForm (or UForm with credential-shaped fields) as documented. The cleartext password lands in:

  • the address bar,

  • window.history,

  • the Referer header of every same-origin subresource fetched from the resulting URL,

  • access logs of any reverse proxy, CDN, or WAF that records request URLs.

Patch

Default the rendered <form> to method="post" so the pre-hydration fallback submits as POST rather than GET. Vue's @submit.prevent still intercepts the hydrated case; the attribute only matters in the race window. Applications that explicitly want native GET submission can opt back in by passing method="get".

Credit

Reported by @nimonian. Originally filed as GHSA-92g7-2fpq-hmq8 against nuxt/nuxt; moved here because the affected code lives in @nuxt/ui.