CVE-2026-128118: SvelteKit: Build-time server-only module import guard could fail, resulting in server secrets being statically replaced in client bundle
Published 2026-11-16 · Updated 2026-11-16 · Also known as GHSA-m9j8-jcmv-hp69
Summary
A flaw in SvelteKit's build-time module import guard can lead to server-side secrets being bundled into client-side code. Developers using SvelteKit 3.0.0 through 3.1.0 should upgrade immediately to prevent unauthorized exposure of sensitive credentials.
Who is affected
This vulnerability allows sensitive server-only modules to be statically replaced and exposed within client-side bundles when imported through 'src/params.js'. The issue is limited to deployments where such server-side imports are defined in the specific 'src/params.js' directory structure. Affected environments are at risk of leaking secret keys or internal logic to the end user.
Exploitability
The vulnerability is rated as High severity with a base score of 7.5 due to low attack complexity and no requirement for user interaction or special privileges. While the EPSS score of 0.003 indicates a low current probability of exploitation, the absence of CISA KEV data confirms there is no evidence of active exploitation in the wild.
Remediation
- Upgrade @sveltejs/kit to version 3.1.1 or later.
- Verify that no sensitive data remains in client-side bundles after applying the upgrade.
How to check your project
- Check the package.json file for @sveltejs/kit to determine if the version is between 3.0.0 and 3.1.0.
- Run 'npm list @sveltejs/kit', 'yarn list @sveltejs/kit', or 'pnpm list @sveltejs/kit' to identify the installed version in your project.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| npm | @sveltejs/kit |
>= 3.0.0, < 3.1.1 | 3.1.1 | npm install @sveltejs/[email protected] |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | High |
| Integrity | None |
| Availability | None |
FAQ
What is the primary security risk?
The primary risk is the accidental exposure of server-side secrets, such as API keys or database credentials, which could be leaked to any client visiting the application.
Does this affect all SvelteKit applications?
No, it specifically affects applications using SvelteKit versions 3.0.0 through 3.1.0 that utilize server-only imports within 'src/params.js'.
Is there evidence that this vulnerability is being actively exploited?
No, this vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
Original advisory description
References
- WEB https://github.com/sveltejs/kit/security/advisories/GHSA-m9j8-jcmv-hp69
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-128118
- WEB https://github.com/sveltejs/kit/commit/ae07803806f75b8b5662ae4ab92934ca1356fd84
- PACKAGE https://github.com/sveltejs/kit
- WEB https://github.com/sveltejs/kit/releases/tag/@sveltejs/[email protected]
Source records: GHSA-m9j8-jcmv-hp69 (OSV.dev) · EPSS by FIRST, 2026-11-26.