SvelteKit: Prerendered redirect paths can inject arbitrary rules into the `_redirects` file generated by `@sveltejs/adapter-cloudflare`
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in @sveltejs/adapter-cloudflare 7.2.10 and @sveltejs/adapter-cloudflare 8.0.2.
SvelteKit is a framework for rapidly developing robust, performant web applications using Svelte. From version 4.7.0 until versions 7.2.10 and 8.0.2, @sveltejs/adapter-cloudflare allowed an attacker-influenced link crawled during prerendering to place whitespace, control characters, wildcards, or placeholders into a prerendered redirect path. The adapter wrote those paths into the Cloudflare _redirects output without output-context validation, allowing a path to create unintended routing rules that could redirect or expose requests beyond the intended prerendered route. This issue is fixed in 7.2.10 and 8.0.2.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| sveltejs | >=4.7.0 <7.2.10, >=8.0.0-next.0 <8.0.2 | ||
| npm: @sveltejs/adapter-cloudflare | >=4.7.0 <7.2.10, >=8.0.0-next.0 <8.0.2 | 7.2.10, 8.0.2 |
Timeline
Every event on this vulnerability
Embed
A live severity badge for an advisory, README or ticket