CVE-2026-128122: SvelteKit Prerendered Redirect Paths Can Inject Vulnerability

MODERATE
Advisory Identifier: GHSA-5wg4-q3ww-283h
CVSS 5.9
CWE-116 CWE-79 CWE-93
Published
Advisory Summary

CVE-2026-128122 is a MODERATE (CVSS 5.9) prerendered redirect paths can inject vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting SvelteKit libraries in the npm ecosystem. The issue involves prerendered redirect paths can inject arbitrary rules into the `_redirects` file generated by `@sveltejs/adapter-cloudflare`. Remediation is available by upgrading affected packages to version 7.2.10, 8.0.2.

CVE-2026-128122 at a Glance

CVE Identifier CVE-2026-128122
GHSA Identifier GHSA-5wg4-q3ww-283h
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product SvelteKit
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-128122

To remediate this vulnerability, upgrade all affected SvelteKit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@sveltejs/adapter-cloudflare fixed: 7.2.10
npm install @sveltejs/adapter-cloudflare@7.2.10
@sveltejs/adapter-cloudflare fixed: 8.0.2
npm install @sveltejs/adapter-cloudflare@8.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @sveltejs/adapter-cloudflare

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-128122, inspect your project dependencies using npm:

npm ls @sveltejs/adapter-cloudflare

Analyze the terminal output to locate any version of SvelteKit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.2.10), your application is affected.

Note: The npm ls @sveltejs/adapter-cloudflare command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In SvelteKit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

If an attacker can influence the links crawled during prerendering, they can influence the redirects entries that are added to the Cloudflare platform redirects generated during the adapt phase of the build.

CVE-2026-128122 Affected SvelteKit Versions

2 component(s)
Fixed Versions:
7.2.108.0.2
Product / Package Ecosystem Affected Versions Fixed Version
@sveltejs/adapter-cloudflare
npm
≥ 4.7.0
< 7.2.10
7.2.10
@sveltejs/adapter-cloudflare
npm
≥ 8.0.0-next.0
< 8.0.2
8.0.2

References

Frequently Asked Questions

What is CVE-2026-128122?
CVE-2026-128122 is a security vulnerability in SvelteKit involving Prerendered redirect paths can inject arbitrary rules into the `_redirects` file generated by `@sveltejs/adapter-cloudflare` under CWE-116: Improper Encoding or Escaping of Output.
Which SvelteKit versions are affected?
Affected versions include releases prior to 7.2.10, 8.0.2 across affected packages: @sveltejs/adapter-cloudflare.
What version fixes CVE-2026-128122?
Upgrading to 7.2.10, 8.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @sveltejs/adapter-cloudflare affected?
Yes, @sveltejs/adapter-cloudflare is affected in releases prior to 7.2.10, 8.0.2. Upgrade your dependency to 7.2.10, 8.0.2 or later.
What is the CVSS score of CVE-2026-128122?
CVE-2026-128122 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-128122?
CVE-2026-128122 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check npm dependencies for CVE-2026-128122?
Run the dependency tree command: 'npm ls @sveltejs/adapter-cloudflare'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5wg4-q3ww-283h",
  "modified" : "2026-11-13T20:39:15Z",
  "published" : "2026-11-13T20:39:15Z",
  "aliases" : [ "CVE-2026-128122" ],
  "summary" : "SvelteKit: Prerendered redirect paths can inject arbitrary rules into the `_redirects` file generated by `@sveltejs/adapter-cloudflare`",
  "details" : "If an attacker can influence the links crawled during prerendering, they can influence the redirects entries that are added to the Cloudflare platform redirects generated during the adapt phase of the build.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@sveltejs/adapter-cloudflare"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.7.0"
      }, {
        "fixed" : "7.2.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@sveltejs/adapter-cloudflare"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0-next.0"
      }, {
        "fixed" : "8.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/kit/security/advisories/GHSA-5wg4-q3ww-283h"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/kit/pull/17620"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/kit/commit/0a2e58cbccdd46cac20aa5af4e2edf17e0da11dd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/kit/commit/679e0d84ea9951bb4f1e458a599066b5a451b08a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sveltejs/kit"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/kit/releases/tag/@sveltejs/adapter-cloudflare@7.2.10"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/kit/releases/tag/@sveltejs/adapter-cloudflare@8.0.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-79", "CWE-93" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-13T20:39:15Z",
    "nvd_published_at" : null
  }
}