CVE-2026-128116 is a medium-severity (CVSS 5.3) Cross-site Scripting (XSS) vulnerability in @sveltejs/kit. A fix is available for @sveltejs/kit — see the affected versions and patch details below.
SvelteKit: Protocol-relative module import during server-side route resolution allows cross-origin script execution
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
@sveltejs/kit📦@sveltejs/kitReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
SvelteKit is a framework for rapidly developing robust, performant web applications using Svelte. Prior to versions 2.70.4 and 3.1.1, apps configured with router.resolution: 'server' could treat a pathname beginning with // as a protocol-relative module specifier during client-side navigation. A socially engineered link could therefore make server-side route resolution import and execute JavaScript from another origin in the user's browser. This issue is fixed in 2.70.4 and 3.1.1.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @sveltejs/kit | ≥ 3.0.0&&< 3.1.1 | 3.1.1npm install @sveltejs/kit@3.1.1 |
| 📦npm | @sveltejs/kit | all versions | 2.70.4npm install @sveltejs/kit@2.70.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @sveltejs/kit, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @sveltejs/kit to 3.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-128116 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-128116 in your dependencies?
Find it across npm, including transitive dependencies.