CVE-2026-128118
SvelteKit: Build-time server-only module import guard could fail, resulting in server secrets being statically replaced in client bundle
Impact
SvelteKit is a framework for rapidly developing robust, performant web applications using Svelte. From version 3.0.0 until 3.1.1, the build-time server-only module guard did not treat src/params.js as a client entry point even though parameter matchers can run in the browser. Server-only modules imported through src/params.js could consequently enter the client bundle, where statically replaced private environment values or other server secrets could be exposed. This issue is fixed in 3.1.1.
An attacker can exploit this over the network, without logging in, without any action by a user. If it succeeds: high risk of data being read.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| npm | @sveltejs/kit | >= 3.0.0, <= 3.1.0 | 3.1.1 |
Affected products · Sveltejs
| Product | Affected versions |
|---|---|
| Kit | from 3.0.0, before 3.1.1 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/sveltejs/kit/security/advisories/GHSA-m9j8-jcmv-hp69
- https://github.com/sveltejs/kit/commit/ae07803806f75b8b5662ae4ab92934ca1356fd84
- https://github.com/sveltejs/kit/releases/tag/@sveltejs/kit@3.1.1
- https://github.com/advisories/GHSA-m9j8-jcmv-hp69
- https://nvd.nist.gov/vuln/detail/CVE-2026-128118