GHSA-pfhg-q3qv-9q6r: Medium severity npm/@sveltejs/kit vulnerability

Published Oct 23, 2026
·
Updated

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.

Affected Software

1 affected componentFixes available
npm/@sveltejs/kit<3.0.0
3.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@sveltejs/kit to a version that resolves this vulnerability.

    Fixed in 3.0.0
  2. Upgrade

    Upgrade @sveltejs/kit to a version that resolves this vulnerability.

    Fixed in 3.0.0
  3. Configuration

    Disable navigation for non-redirect enhanced form results by supplying a custom submission callback.

    SvelteKit enhanced form actions navigation for non-redirect enhanced form results = disabled
  4. Compensating control

    Reject requests whose parsed URL pathname begins with // before route resolution, such as in a reverse proxy or a SvelteKit handle hook.

Event History

Oct 23, 2026
Advisory Published
via GitHub·08:58 PM
Data Sourced
via GitHub·08:58 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using SvelteKit enhanced form actions via use:enhance are affected when they have routes, such as catch-all routes, that accept pathnames beginning with //.

2

What conditions are required for exploitation?

An attacker must be able to cause interaction with an enhanced form action whose route accepts a path beginning with //. The issue can result in an open redirect through protocol-relative URL handling.

3

What can be done if upgrading is not immediately possible?

Reject requests whose parsed URL pathname starts with // before route resolution, either at a reverse proxy or in a SvelteKit handle hook. Alternatively, configure enhanced forms with a custom submission callback that calls update({ navigate: false }) for non-redirect results.

4

Which version contains the fix?

Upgrade @sveltejs/kit to version 3.0.0 or later. The fix preserves leading double slashes without creating protocol-relative URLs and restricts non-redirect action navigation to the current origin.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203