SvelteKit: URL redirection to untrusted site via enhanced form submission
Exact source revision recorded 24 Oct 2026 13:17:17 UTC. It does not establish the source's current position. Latest evidence.
osv · GHSA-pfhg-q3qv-9q6r
Published### 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.
- Source published
- 23 Oct 2026 20:58:24 UTC
- Source modified
- 23 Oct 2026 21:15:03 UTC
- Observed here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V3 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS_V4 · CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Publisher rating · LOW