/

CVE-2026-128118

Severity:

HIGH RISK

(7.5)

Information Exposure (CWE-200) in SvelteKit Params

CVE-2026-128118

Deferred

Vulnerability type

Category:

Sensitive Information Exposure

CWE:

CWE-200, CWE-668

Impact:

Exposure of server-side code or sensitive information

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

SvelteKit's build-time server-only module guard could miss modules imported through src/params.js, even though parameter matchers can run in the browser. As a result, server-only code and statically replaced private environment values could be included in client bundles and exposed to users who receive them.

Affected context

The issue affects SvelteKit versions from 3.0.0 up to, but not including, 3.1.1 when server-only modules are imported through src/params.js. Because parameter matchers can run in the browser, those imports may cross into the client bundle if the build-time guard does not recognize the file as a client entry point. Exposure depends on the imported modules and values included in the generated bundle.

Exploit preconditions

  • Attack surface: The generated client bundle and any browser-executable parameter matcher code
  • Required access: No special application access may be needed to inspect a client bundle that is publicly served
  • Trigger point: A build includes server-only imports through src/params.js
  • Why exploitation is possible: The build-time guard may fail to classify this path as a client entry point, allowing server-only code or statically replaced values into client output

Why this happens

The build-time server-only module guard did not account for src/params.js as a client entry point, despite parameter matchers being capable of running in the browser. This boundary-checking failure can cause server-side material to be included in client-accessible output, aligning with CWE-200: Exposure of Sensitive Information to an Unauthorized Actor. It also reflects a trust-boundary error described by CWE-668: Exposure of Resource to Wrong Sphere.

Potential impact

  • Private environment values embedded in client output may be disclosed.
  • Server-only implementation details may become visible to users.
  • Exposed credentials or secrets could enable further access to connected systems.
  • The confidentiality of services relying on affected values could be reduced.

General mitigation guidance

Defensive patterns focus on preserving the boundary between server-only and browser-accessible code:

  • Keep secrets and server-only modules out of code paths that can execute in the browser.
  • Use explicit, framework-supported mechanisms to distinguish server and client modules.
  • Avoid embedding sensitive values in client-side output, even through build-time substitution.
  • Limit secret scope and privileges so exposure of an individual value has less impact.
  • Review generated client bundles to ensure they contain no server-only code or confidential configuration.

How teams detect issues like this

  • Use static analysis to identify server-only imports reachable from browser-executable entry points, including parameter matcher files.
  • Review build-time module guards and tests to confirm all client entry points are recognized.
  • Inspect generated client bundles for private environment values, credentials, or server-only module content.
  • Enforce CI policies that reject sensitive values or prohibited server-side modules in client artifacts.
  • Automated code review tools may help identify suspicious import paths and client/server boundary violations.

Sources

SourceLink
github.comgithub.com/sveltejs/kit/commit/ae07803806f75b8b5662ae4ab92934ca1356fd84
github.comgithub.com/sveltejs/kit/releases/tag/@sveltejs/kit@3.1.1
github.comgithub.com/sveltejs/kit/security/advisories/GHSA-m9j8-jcmv-hp69

Frequently asked

questions

Anyone able to obtain an affected client bundle may be able to inspect information included in it. The risk depends on whether sensitive values or server-only code were actually bundled.

Not necessarily. Client bundles are often available to application users without authentication, though deployment and access controls can affect who can retrieve them.

Ensure server-only modules and secrets cannot flow into browser-executable code, and verify that build-time guards cover every client entry point.

Treat generated client artifacts as public, keep secrets out of client-reachable imports, and add static checks and bundle reviews to development and release workflows.

Find out what's already
exploitable in your codebase.