CVE-2026-128122 is a medium-severity (CVSS 5.9) Cross-site Scripting (XSS) vulnerability in @sveltejs/adapter-cloudflare. A fix is available for @sveltejs/adapter-cloudflare — see the affected versions and patch details below.
SvelteKit: Prerendered redirect paths can inject arbitrary rules into the `_redirects` file generated by `@sveltejs/adapter-cloudflare`
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@sveltejs/adapter-cloudflarenpmDescription
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @sveltejs/adapter-cloudflare | ≥ 4.7.0&&< 7.2.10 | 7.2.10npm install @sveltejs/adapter-cloudflare@7.2.10 |
| 📦npm | @sveltejs/adapter-cloudflare | ≥ 8.0.0-next.0&&< 8.0.2 | 8.0.2npm install @sveltejs/adapter-cloudflare@8.0.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @sveltejs/adapter-cloudflare, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @sveltejs/adapter-cloudflare to 7.2.10 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-128122 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2026-128122 in your dependencies?
Find it across npm, including transitive dependencies.