@nuxt/ui: UAuthForm / UForm SSR markup omits `method`, leaking credentials via GET if submitted before hydration
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:
- Create a minimal Nuxt app with a
UAuthForm. - Build for production and visit in a browser with network throttling at 4G or slower.
- Enter credentials.
- 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
Refererheader 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.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| npm-Paket | @nuxt/ui | < 4.8.1 | 4.8.1 |
Verweise
- CVSS-Vektor
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N- Schwäche (CWE)
CWE-200, CWE-598- Plattform
- npm
- Paket
@nuxt/ui- Veröffentlicht
- 02.07.2026
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-gj2h-2fpw-fhv9 - CC BY 4.0
Schwachstellenhistorie: @nuxt/ui
Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
Dies ist die einzige bekannte Schwachstelle dieses Pakets.
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.