Skip to content

fix: upgrade @sveltejs/kit to 2.57.1 (CVE-2026-40073)#10637

Open
orbisai0security wants to merge 1 commit intoTanStack:mainfrom
orbisai0security:fix-cve-2026-40073-sveltejs-kit
Open

fix: upgrade @sveltejs/kit to 2.57.1 (CVE-2026-40073)#10637
orbisai0security wants to merge 1 commit intoTanStack:mainfrom
orbisai0security:fix-cve-2026-40073-sveltejs-kit

Conversation

@orbisai0security
Copy link
Copy Markdown

@orbisai0security orbisai0security commented May 5, 2026

Summary

Upgrade @sveltejs/kit from 2.55.0 to 2.57.1 to fix CVE-2026-40073.

Vulnerability

Field Value
ID CVE-2026-40073
Severity HIGH
Scanner trivy
Rule CVE-2026-40073
File pnpm-lock.yaml

Description: @sveltejs/adapter-node has a BODY_SIZE_LIMIT bypass

Changes

  • package.json
  • pnpm-lock.yaml

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Summary by CodeRabbit

  • Chores
    • Updated project dependencies to latest stable versions.

Automated dependency upgrade by Orbis Security AI
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

📝 Walkthrough

Walkthrough

A new top-level dependencies block was added to package.json, declaring @sveltejs/kit version 2.57.1 as a runtime dependency.

Changes

Dependency Addition

Layer / File(s) Summary
Package Configuration
package.json
Added @sveltejs/kit@2.57.1 to the dependencies block.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A framework now joins the array,
SvelteKit hops into play,
Version pinned, just right,
Dependencies take flight! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete, missing most required template sections including 🎯 Changes, ✅ Checklist, and 🚀 Release Impact sections. Restructure the description to follow the repository template: add 🎯 Changes, ✅ Checklist, and 🚀 Release Impact sections with appropriate completion status.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: upgrading @sveltejs/kit to 2.57.1 to fix CVE-2026-40073, which aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 107-109: The pnpm lockfile still resolves vulnerable
`@sveltejs/kit`@2.55.0; update all example project package.json entries that use
the specifier ^2.42.2 to require `@sveltejs/kit`@2.57.1 (or a range >=2.57.1),
bump or replace `@sveltejs/adapter-auto` to a version that depends on the newer
kit, then run pnpm install to regenerate pnpm-lock.yaml so all `@sveltejs/kit`
resolutions point to 2.57.1+ (alternatively add a pnpm overrides/resolutions
entry forcing `@sveltejs/kit`@2.57.1 and run pnpm install).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 03cc8224-594c-49f4-9c0b-7e3e9eff0314

📥 Commits

Reviewing files that changed from the base of the PR and between 0d63459 and ca39ee8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json

Comment thread package.json
Comment on lines +107 to 109
"dependencies": {
"@sveltejs/kit": "2.57.1"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Checking resolved versions in pnpm-lock.yaml..."
rg -n '"@sveltejs/kit@|/@sveltejs/kit/|@sveltejs/adapter-node@|/@sveltejs/adapter-node/"' pnpm-lock.yaml

echo
echo "Checking for potentially vulnerable 2.55.x kit entries..."
rg -n '@sveltejs/kit@2\.55\.' pnpm-lock.yaml || true

Repository: TanStack/query

Length of output: 106


🏁 Script executed:

ls -la | grep -E "(pnpm-lock|package-lock|yarn\.lock|package\.json)"

Repository: TanStack/query

Length of output: 192


🏁 Script executed:

head -120 package.json | tail -20

Repository: TanStack/query

Length of output: 763


🏁 Script executed:

git ls-files | grep -E "(lock|package\.json)" | head -10

Repository: TanStack/query

Length of output: 512


🏁 Script executed:

# Search more carefully in pnpm-lock.yaml for `@sveltejs/kit`
rg -i "sveltejs" pnpm-lock.yaml | head -20

Repository: TanStack/query

Length of output: 3758


🏁 Script executed:

# Check the exact format of dependencies in pnpm-lock.yaml
grep -n "sveltejs" pnpm-lock.yaml | head -30

Repository: TanStack/query

Length of output: 5115


🏁 Script executed:

# Get context around the 2.55.0 entries to see which packages depend on them
sed -n '1715,1725p' pnpm-lock.yaml

Repository: TanStack/query

Length of output: 1123


🏁 Script executed:

# Check if `@sveltejs/adapter-auto` specifies a version that requires 2.55.0
sed -n '1717,1725p' pnpm-lock.yaml

Repository: TanStack/query

Length of output: 1040


Vulnerable @sveltejs/kit@2.55.0 versions remain in pnpm-lock.yaml and must be regenerated.

The root package.json correctly specifies @sveltejs/kit@2.57.1, but pnpm-lock.yaml still resolves multiple instances of the vulnerable @sveltejs/kit@2.55.0 across example projects (lines 1720–1822 and beyond). These entries exist because example projects declare @sveltejs/kit with the specifier ^2.42.2 and @sveltejs/adapter-auto@6.1.1 depends on the older version. Run pnpm install to regenerate the lockfile and ensure all @sveltejs/kit resolutions are updated to 2.57.1 or later.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 107 - 109, The pnpm lockfile still resolves
vulnerable `@sveltejs/kit`@2.55.0; update all example project package.json entries
that use the specifier ^2.42.2 to require `@sveltejs/kit`@2.57.1 (or a range
>=2.57.1), bump or replace `@sveltejs/adapter-auto` to a version that depends on
the newer kit, then run pnpm install to regenerate pnpm-lock.yaml so all
`@sveltejs/kit` resolutions point to 2.57.1+ (alternatively add a pnpm
overrides/resolutions entry forcing `@sveltejs/kit`@2.57.1 and run pnpm install).

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