Tested on Node 22.23.4 and npm 10.9.9

SvelteKit CVE-2026-128120: why npm audit stays red on 2.70.4

You update SvelteKit to 2.70.4, but CI still reports CVE-2026-128120 / GHSA-3r8g-jcqq-3p5j. That is consistent with the advisory: its affected range is 2.42.0 through 3.1.0, and its first patched release is 3.1.1. The 2.70.4 patch fixes other advisories, but it does not clear every SvelteKit finding, and npm keeps listing one advisory that 2.70.4 already fixes.

There are three decisions: apply the available 2.x patches, prepare a working Kit 3 migration, and assess any findings you must temporarily defer. An audit result alone does not establish whether your application reaches the vulnerable code.

Read the installed tree and the full report

From the directory that owns the affected npm manifest and lockfile, after installing its locked dependencies, run:

node --version
npm --version
npm ls @sveltejs/kit --all
npm explain @sveltejs/kit
npm pkg get devDependencies dependencies overrides
npm audit --json
npm audit --omit=dev

Read each advisory URL in the JSON report, under the @sveltejs/kit and cookie entries. Other packages can keep the report red after Kit is clean, and adapters or plugins that depend on Kit stay listed until Kit is. npm groups several advisories under one package; its vulnerability total is not a count of distinct advisory IDs. npm explain shows which dependency brought Kit in. Check every installed copy and the manifest named by the failing scanner, including separate workspace locks.

A nonzero audit exit can mean findings were detected. In our affected fixtures the full audit exited 1, while the non-development audit exited 0 because Kit was a development dependency. That filter does not establish what a build contains, what CI executes, or what the deployed server can reach. A development tool can also affect generated output.

On real projects the non-development audit can also exit nonzero for unrelated packages, and a production adapter that declares Kit as a peer, such as @sveltejs/adapter-node, can bring Kit's advisories into it.

These commands target npm. They do not repair pnpm, Yarn or Bun lockfiles, another checkout, a built container or an already deployed application.

Separate the advisories by their first fixes

The following ranges and conditions come from the linked primary advisories, checked on 17 November. We did not reproduce the vulnerabilities.

The advisory database credits two findings to 2.70.4:

  • CVE-2026-128116 / GHSA-rqp5-r3wg-vg35 — affected <2.70.4 or >=3.0.0, <3.1.1; first fixes 2.70.4 / 3.1.1. In apps that set router.resolution: 'server', an attacker who gets a user to follow a crafted link through client-side navigation can cause script from another domain to be imported and run in the browser.
  • CVE-2026-128117 / GHSA-mw6w-2fmv-pvw3 — affected <2.70.4 or >=3.0.0, <3.1.1; first fixes 2.70.4 / 3.1.1. The advisory concerns an adapter-node crash when a reroute hook turns an invalid percent-encoded pathname into a valid one. Although its title names the adapter, the affected package in the advisory is @sveltejs/kit.

Two remote-function findings remain on 2.70.4:

  • CVE-2026-128120 / GHSA-3r8g-jcqq-3p5j — affected >=2.42.0, <=3.1.0; first fix 3.1.1. The current advisory description covers the experimental remote-functions flag with form, query or command remote functions. A crafted request can block the event loop during parsing. Do not narrow the assessment to form solely because it appears in the title.
  • CVE-2026-128119 / GHSA-6cf5-gc4q-fm3x — affected >=2.60.1, <=3.1.0; first fix 3.1.1. With experimental remote functions and private, non-exported query.batch functions, batches can collide and pass one function's arguments to another.

A move to an early Kit 3 release can introduce a different finding:

  • CVE-2026-128118 / GHSA-m9j8-jcmv-hp69 — affected >=3.0.0, <=3.1.0; first fix 3.1.1. Server-only imports through src/params.js can reach the client bundle and expose server secrets. This advisory does not list Kit 2.x as affected. Moving merely to 3.0.0 or 3.1.0 is insufficient for this advisory set.

These first fixes are specific to the named advisories, not a guarantee that a release has no other vulnerabilities. GitHub's database published the adapter-node crash record on 13 November and the other four on 16 November; those are database dates, not upstream disclosure dates.

Account for the older findings too

Our 2.70.4 fixture reported five distinct advisory URLs: the two remote-function findings above, the two older Kit findings below, and a transitive cookie finding. One of those five, CVE-2026-114061, is already fixed in 2.70.4, so the report shows five while four remain unfixed in the installed code.

  • CVE-2026-114060 / GHSA-pfhg-q3qv-9q6r — Kit <3.0.0, first fix 3.0.0. Enhanced form actions on routes accepting paths beginning with two slashes can cause an open redirect. The advisory offers request-path rejection or changing enhanced-form navigation as workarounds; evaluate its exact conditions before adopting one.
  • CVE-2026-114061 / GHSA-27mw-82g8-phjj — Kit <3.0.0, first fix 3.0.0. Prerendering pages with an untrusted cache-control value supplied through setHeaders can inject HTML or script into generated pages. npm still lists this on 2.70.4, but 2.70.4 contains the fix. The 2.70.4 release notes list "escape cache-control headers in prerendered HTML", and the published 2.70.4 package escapes the value the same way 3.0.0 does. The audit keeps reporting it because the advisory's range is still every version below 3.0.0. On 2.70.4, record it as fixed in the installed version, with the release note as evidence, rather than applying its workaround. On 2.70.3 or older it applies, so a static deployment alone does not dismiss every Kit advisory there; the advisory's workaround is a fixed, trusted cache policy.
  • CVE-2024-47764 / GHSA-pxg6-pf52-xh8x — cookie <0.7.0, first fix 0.7.0. Untrusted cookie names, paths or domains can alter other cookie fields. Kit 2.70.4 declares cookie ^0.6.0, which excludes 0.7.0; our installed copy was 0.6.0. Kit 3.1.1 instead declares cookie ^2.0.1; our fixture resolved 2.0.2. A cookie override does not repair Kit's own findings, and we have not tested an override remedy.

GitHub rates these three older advisories Low. Keep them in the assessment even if a severity threshold excludes them from a CI failure. If you start on an older 2.x release, your first report can list more Kit advisories than this page names: we saw 11 Kit advisory URLs on 2.56.1 and 14 on 2.50.0. The 2.x install clears those whose ranges end below 2.70.4. CVE-2026-128119 only applies from 2.60.1, so below that version it appears for the first time after the update. Another adapter can have further findings; use the complete report from your tree.

Take the 2.x patch without calling it a complete fix

Check the dependency section first with the npm pkg get line above. This block is for a project where Kit is a direct development dependency and the immediate decision is to stay on 2.x. If Kit is in dependencies, use --save-prod in place of --save-dev: with --save-dev, npm moves Kit to devDependencies, and npm audit --omit=dev then stops listing it. For a transitive copy, update the owning parent instead.

npm install --save-dev --save-exact @sveltejs/kit@2.70.4 --ignore-scripts
npm ls @sveltejs/kit --all
npm audit --json

Review the manifest and lockfile diff. This changes your declared range to an exact version and can update other lock entries. We ran this block where Kit was a development dependency, and checked only that the --save-prod form keeps Kit in dependencies; we did not test the parent route.

In our 2.70.3 fixture the install exited 0 and the resulting full audit still exited 1. The two advisory URLs credited to 2.70.4 disappeared; the other five remained. That is a partial repair with a clear scope.

Ordinary npm remediation is not evidence that those remaining findings were repaired:

npm audit fix --dry-run --ignore-scripts
npm audit fix --ignore-scripts

Both commands exited 1 in our exact-2.70.4 fixture. The second retained Kit 2.70.4 and cookie 0.6.0. The dry run previews npm's proposed changes; it does not apply a migration. On 17 November npm proposed Kit 3.2.1 as a breaking change. Read the proposed major-version change before using npm's force option.

The second command is not a preview: it rewrites other lock entries (on one real project it changed 15 packages, none of them Kit). Run it on a branch and review the lockfile diff. If npm itself errors instead of printing a preview, read the fixAvailable field for @sveltejs/kit in the npm audit --json report instead.

Treat Kit 3 as an application migration

Check the release's requirements:

npm view @sveltejs/kit@3.1.1 engines peerDependencies --json

3.1.1 is the first release that fixes all five new advisories. On 17 November npm's latest tag pointed to Kit 3.2.1; our clean fixture used 3.1.1, and we did not test 3.2.x.

This metadata command exited 0. For 3.1.1 it reports Node >=22.17, Vite ^8.0.12, Svelte ^5.57.1, TypeScript ^6.0.0, vite-plugin-svelte ^7.0.0, and OpenTelemetry API ^1.0.0. Coordinate your adapters and other plugins too; changing Kit alone may fail peer-dependency resolution.

Follow the official Kit 3 migration guide. It recommends upgrading to the most recent 2.x release first for deprecation warnings. Configuration moves from svelte.config.js into the Vite plugin; the generated $lib alias, TypeScript configuration and several application APIs change. Service-worker registration changes to module workers. Its migration tool automates only part of the work; we have not tested that tool.

A completed migration needs your type checks, tests, production build and adapter output, plus browser checks of the behavior you use: navigation, forms, remote functions, prerendered pages and service workers. Rebuild and verify the deployed artifact as well as the source lockfile. Keep a known deployment for rollback, but recognize that restoring affected versions restores their findings.

After accepting the dependency changes, verify a locked reinstall:

npm ci --ignore-scripts
npm ls @sveltejs/kit --all
npm audit --json

All three exited 0 in our 3.1.1 dependency fixture. Install scripts were disabled throughout these tests. These commands verify locked dependency installation and audit results; they do not run your application's build or establish compatibility.

If the migration must wait

Assess each advisory separately against the actual build configuration, enabled features, generated client files and deployed server or static artifact. Trace how remote functions can be enabled across configurations and build environments. A source grep or an omitted development dependency is insufficient evidence for dismissal.

If your owner accepts a temporary exception, bind it to the exact advisory, installed version and artifact, the applicability evidence, an owner, and an expiry or change condition. Keep unrelated and newly reported findings visible. Removing a finding from CI changes the reporting policy; it does not patch the package. Reassess when features, dependencies or deployment behavior change.

What we verified

We ran every shell block above in an official, digest-pinned Linux CPU container with Node 22.23.4 / npm 10.9.9. Small dependency-only fixtures installed Kit as a development dependency:

  • 2.70.3: full audit exit 1, seven distinct advisory URLs across Kit and cookie.
  • 2.70.4: full audit exit 1, five URLs remain after the two findings credited to 2.70.4 clear. Ordinary audit fix retained these versions and findings.
  • 3.1.0: full audit exit 1, five Kit advisories, including the server-only import finding. A major-version bump alone did not clear this set.
  • 3.1.1: full audit exit 0, zero findings, including after a locked reinstall. This is a result for that fixture at the test date.

An independent first-use check then ran the first two blocks on three public SvelteKit projects with npm lockfiles, at Kit 2.50.0, 2.56.1 and 2.70.3, two of them with remote functions enabled. The commands gave the same results in bash and zsh, the 2.x install landed on 2.70.4 in each, and each then reported the same five Kit and cookie advisory URLs as our fixture. A fourth project's locked install failed under npm 10.9.9; we did not diagnose it.

The version, tree, dependency-explanation and manifest-inspection commands exited 0 at each stage. The non-development audit exited 0 even on affected fixtures: a deliberate control against treating that filter as exposure evidence. The affected full audits are failing controls for the dependency result.

We did not run exploits, an application migration, application builds, adapters, a production deployment, hosted Dependabot closing behavior or an applicability-exception mechanism. The primary advisories support the feature conditions; the fixtures support dependency and scanner behavior only. The 2.70.4 fix for CVE-2026-114061 rests on the upstream release notes and a read of the published package source, not on a test.

Keep the next dependency change visible

Check your project's next dated software change

No email address is needed.

Corrections: hello@cybernative.ai. We publish dated corrections when a material claim changes.