Skip to content

fix(deps): update @sveltejs/kit to 3.x for GHSA-3r8g-jcqq-3p5j - #623

Closed
dferber90 wants to merge 1 commit into
mainfrom
dominikferber/exp-3872-high-sveltejskit2702-cve-2026-128120
Closed

dferber90 wants to merge 1 commit into
mainfrom
dominikferber/exp-3872-high-sveltejskit2702-cve-2026-128120

Conversation

@dferber90

Copy link
Copy Markdown
Collaborator

Fixes EXP-3872 (CVE-2026-128120 / GHSA-3r8g-jcqq-3p5j: DoS while parsing form data from remote functions).

The fix is only in @sveltejs/kit 3.1.1. No 2.x release has it: 2.70.4 does not include the "parse remote form submissions in linear time" commit. The two flagged manifests now resolve Kit 3.4.0.

Changes

  • packages/flags: devDependency @sveltejs/kit ^3.1.1. Kit 3 moved the Handle type from @sveltejs/kit to @sveltejs/kit/hooks. flags/sveltekit now uses a local structural Handle type, so the type of createHandle works with Kit 2 and Kit 3. Patch changeset added.
  • apps/docs: devDependency @sveltejs/kit ^3.1.1, so the optional peer chain (@vercel/analytics, @vercel/speed-insights, @vercel/microfrontends) resolves to Kit 3. The docs app is Next.js and never loads Kit.
  • pnpm-workspace.yaml:
    • The override @sveltejs/kit ^2.70.2 changes to @sveltejs/kit@2 ^2.70.4.
    • Adds svelte ^5.57.1, which Kit 3 needs.
    • Adds peer allowances for Kit 3 (those Vercel packages only declare Kit 2) and for TypeScript 5 (Kit 3 asks for TS 6).

Not in this PR

tests/sveltekit-e2e and examples/sveltekit-example stay on Kit 2.70.4. Socket did not flag them. Moving them to Kit 3 is a full migration: svelte.config.js goes into vite.config.ts, $lib becomes #lib, plus tsconfig changes and adapter-vercel 7.

That migration also showed a Kit 3 runtime gap in flags/sveltekit. $env/static/private now only contains the variables the app declares in src/env.ts, so flags does not find FLAGS_SECRET in a Kit 3 app unless the app declares it. This should be a follow-up.

Verification

  • packages/flags: type-check, build, test (330 passed) and attw pass.
  • tests/sveltekit-e2e and examples/sveltekit-example: vite build passes. svelte-check gives the same result as on main (the e2e app already had 2 errors there).
  • I could not run the Playwright e2e tests on my machine because the Chromium binary is not installed. CI runs them.

🤖 Generated with Claude Code

CVE-2026-128120 is fixed only in @sveltejs/kit 3.1.1. No 2.x release has
the fix.

- packages/flags: devDependency @sveltejs/kit ^3.1.1. Kit 3 moved the
  `Handle` type to `@sveltejs/kit/hooks`, so flags/sveltekit now uses a
  local structural `Handle` type that works with Kit 2 and Kit 3.
- apps/docs: devDependency @sveltejs/kit ^3.1.1, so the optional peer
  chain of @vercel/analytics and other packages resolves to Kit 3.
- The SvelteKit e2e app and example stay on Kit 2 (now ^2.70.4).
  Migrating them to Kit 3 is follow-up work.

Fixes EXP-3872

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
flags-playground Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-dev Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-flagsmith Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-growthbook Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-launchdarkly Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-openfeature Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-posthog Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-reflag Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-snippets Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-statsig Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
flags-sdk-sveltekit-snippets Error Error v0 Nov 23, 2026 8:45pm UTC
shirt-shop Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC
shirt-shop-api Ready Ready Preview, v0 Nov 23, 2026 8:45pm UTC

@socket-security

socket-security Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​sveltejs/​kit@​2.70.2 ⏵ 2.70.499 +182 +381 +198 +2100
Updatednpm/​@​sveltejs/​kit@​2.70.2 ⏵ 3.4.099 +1100 +2282 +198 +3100
Updatednpm/​svelte@​5.56.7 ⏵ 5.59.188 +110087 +198100

View full report

@dferber90

Copy link
Copy Markdown
Collaborator Author

Not exploitable. GHSA-3r8g-jcqq-3p5j only affects SvelteKit apps that turn on the experimental remoteFunctions flag and use form, query or command. vercel/flags does not use remote functions: there are no .remote.ts/.remote.js files, no imports from $app/server, and no remoteFunctions config. In packages/flags, @sveltejs/kit is a devDependency used only for types and tests. It is not a dependency or peer dependency of the published package. In apps/docs, Kit is only an optional peer dependency of @vercel/analytics in a Next.js app, and it is never loaded. No 2.x release has the fix (only 3.1.1+ does).

@dferber90 dferber90 closed this Nov 23, 2026

This branch had an error being deployed

1 failed and 13 active deployments
Preview – flags-sdk-dev — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-sveltekit-snippets — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-growthbook — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-launchdarkly — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-statsig — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-reflag — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – shirt-shop — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-snippets — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-vercel — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-posthog — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-flagsmith — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-sdk-openfeature — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – flags-playground — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Preview – shirt-shop-api — 542be88f Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant