CVE-2026-40074 SvelteKit's invalidated redirect in handle hook causes Denial-of-Service

Medium 6.3 Published Updated

Attackers can cause a Denial of Service in SvelteKit applications by triggering an unhandled TypeError via invalid characters in redirect locations within handle hooks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40074?

CVE-2026-40074 is a medium-severity denial of service vulnerability in sveltejs kit, published on 10 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

SvelteKit is a framework for rapidly developing robust, performant web applications using Svelte. Prior to 2.57.1, redirect, when called from inside the handle server hook with a location parameter containing characters that are invalid in a HTTP header, will cause an unhandled TypeError. This could result in DoS on some platforms, especially if the location passed to redirect contains unsanitized user input. This vulnerability is fixed in 2.57.1.

Weakness: CWE-755

Which versions are affected by CVE-2026-40074?

2 open source packages ship an affected version, including @sveltejs/kit. It affects 1 product.

PackageAffectedFixed in
@sveltejs/kit npmAll versions2.57.1
@sveltejs/kit npmAll versions2.57.1

Products include Svelte Kit.

How do I fix CVE-2026-40074?

Upgrade @sveltejs/kit to 2.57.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-40074 being exploited?

There is no known exploitation of CVE-2026-40074 in the wild and no public exploit code.

Sources

Also known as GHSA-3f6h-2hrp-w5wx.

Is CVE-2026-40074 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free