HIGH · CVSS 3.1 7.5 EPSS 0.5% · 35th percentile CWE-200CWE-668

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

How to check 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

EcosystemPackageAffected versionsFixed inUpgrade
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 vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityNone
AvailabilityNone

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
Under certain circumstances, server-only imports, which typically cannot be included in the client bundle, could make their way into it, potentially exposing secrets. This could only occur when those server-only imports were made through `src/params.js`.

References

Source records: GHSA-m9j8-jcmv-hp69 (OSV.dev) · EPSS by FIRST, 2026-11-26.