All vulnerabilities

Servers and applications

GHSA-x35v-76jc-m8f5

ReDoS in SvelteKit route matching for routes with multiple params

Severity
Medium 5.9
Published
25 Nov 2026
Last changed
25 Nov 2026
Added to UpHeron
25 Nov 2026
Fixed in
3.4.1
Weakness
Regular expression denial of service (ReDoS) (CWE-1333)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Sources
Project advisories (GitHub)

Description

SvelteKit is vulnerable to remote CPU-exhaustion DoS attacks via specifically-crafted request paths. Applications are affected if they have a route where several dynamic parameters could match the same part of the path, most commonly multiple parameters separated by static text inside a single path segment, such as src/routes/api/[lang]-[region]-[slug].json.

The cost grows quickly with the number of such parameters, and with three or more of them a single request within common URL length limits can block the server's event loop for multiple seconds, delaying all other requests handled by that process.

From sveltejs/kit's security advisory.

Workarounds

Restructure affected routes so that each directory has at most one parameter, or use a single parameter for the affected part of the path and split it in your own code — for example, replace src/routes/[...a]/x/[...b] with src/routes/[...path] and split params.path into its parts where you use it. Lowering the maximum request line length at your proxy or server reduces, but does not eliminate, the impact.

Workarounds as given by sveltejs/kit's security advisory.

Affected software

SoftwareAffected versions
SvelteKitServers and applications · github:sveltejs/kit
  • Every version before 3.4.1

About SvelteKit

web development, streamlined

From its GitHub repository.
Weekly downloads (npm)
5,128,894npm, 22 Nov 2026
GitHub stars
20,926GitHub, 22 Nov 2026
Forks
2,391GitHub, 22 Nov 2026
Latest release
@sveltejs/[email protected]GitHub, 22 Nov 2026
Released
18 Nov 2026GitHub
License
MITGitHub
First published on GitHub
15 Oct 2020GitHub

References