ThinkFacility Sign in
  1. Home
  2. Security
  3. npm package (@sveltejs/kit)
Highnpm package (@sveltejs/kit)

SvelteKit 2.42.0 to 3.1.0: server secrets can leak into client code, and a form flaw stalls servers

Web developers who build and deploy sites with SvelteKit, especially anyone who imports server-only modules in src/params.js.

How to fix it

You haveUpdate to
>= 2.42.0, < 3.1.1→3.1.1

Check your version

Which version your project has
npm ls @sveltejs/kit

Update

In your project
npm update @sveltejs/kit
npm ls @sveltejs/kit
Still old? A dependency pins it
npm explain @sveltejs/kit
Then check what's left
npm audit

The leak hits SvelteKit 3.0.0 and later: a server-only import made through src/params.js could end up in the client bundle, secrets and all. The other flaw only matters if you've turned on the experimental remote functions flag, where a crafted form request can block the event loop. If your secrets could have shipped to browsers, rotate them after you update.

If npm ls still shows an old version under another package, update that package, or add an "overrides" entry for this one in package.json.

Sources