CVE-2026-114060: SvelteKit before 3.0.0 Open Redirect via Enhanced Form Actions
Impact Applications using enhanced form actions (use:enhance) on routes that accept paths beginning with //, such as catch-all routes, may be vulnerable to an open redirect.
Patches A fix has been prepared for @sveltejs/kit 3.0.0. Users should upgrade to 3.0.0 or later.
The fix preserves leading double slashes in action paths without generating protocol-relative URLs, restricts non-redirect action navigation to the current origin, and includes the origin when comparing action locations with the current page.
Workarounds Reject requests whose parsed URL pathname begins with // before route resolution, for example in a reverse proxy or a SvelteKit handle hook.
Alternatively, disable navigation for non-redirect enhanced form results by supplying a custom submission callback:
svelte <form method="POST" use:enhance={() => ({ update }) => update({ navigate: false })}> <!-- form fields --> </form>
This applies non-redirect results to the current page instead of navigating to the action location.
Other sources
SvelteKit (@sveltejs/kit) before 3.0.0 contains an open redirect vulnerability in enhanced form actions (use:enhance) on routes accepting paths beginning with a double slash. Attackers can craft action paths starting with // that become protocol-relative URLs, causing non-redirect form results to navigate victims to attacker-controlled sites.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/@sveltejs/kitto a version that resolves this vulnerability.Fixed in 3.0.0 - Upgrade
Upgrade
@sveltejs/kitto a version that resolves this vulnerability.Fixed in 3.0.0 - Configuration
Disable navigation for non-redirect enhanced form results by supplying a custom submission callback to use:enhance.
SvelteKit enhanced form actions navigation for non-redirect enhanced form results = disabled - Compensating control
Reject requests whose parsed URL pathname begins with // before route resolution, using a reverse proxy or a SvelteKit handle hook.
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using @sveltejs/kit before 3.0.0 are exposed when they use enhanced form actions (use:enhance) on routes that accept action paths beginning with a double slash.
What must an attacker do to exploit it?
An attacker must craft an action path starting with // and induce a victim to interact with the enhanced form action. The double slash is interpreted as a protocol-relative URL, allowing navigation to an attacker-controlled site.
Is user interaction required?
Yes. The affected form result must cause the victim's browser to navigate, so exploitation requires victim interaction.