Skip to content
Brief Security & Trust ·

SvelteKit bug could put server secrets into browser code

A GitHub advisory says a build-time safety check could fail when server-only code was imported through src/params.js.

In brief
  • SvelteKit's build check for server-only code could fail. Secrets could then end up in the code sent to browsers.
  • The advisory ties the problem to imports made through src/params.js and links to the @sveltejs/kit 3.1.1 release.

The GitHub Advisory Database published a security advisory on 16 November 2026 about SvelteKit, a web framework. It says a build-time check meant to keep server-only code out of browser files could fail. When it failed, server secrets could be swapped into the client bundle, which is the code sent to visitors' browsers. The advisory says this could only happen when the server-only imports were made through src/params.js.

The advisory links to a CVE entry, CVE-2026-128118, and to the release page for @sveltejs/kit 3.1.1. The text it gives is short. It does not list the affected versions or rate the severity. It does not say whether anyone has used the flaw. It also does not say outright that 3.1.1 is the fix, though that is the release it links. It describes the trigger only as certain circumstances.

Teams that build on SvelteKit and import server-only modules through src/params.js have a clear thing to check. Anything placed in a client bundle is shipped to browsers. Reading the 3.1.1 release notes is the quickest way to see whether their setup is affected.

A WebPulse Brief: a short report of an important event, written by the WebPulse Newsroom with AI assistance and checked against the reporting below. When there is more to explain, we follow up with a full story. How we use AI.

Reporting: GitHub Advisory Database.