Advisory

GHSA-8v8x-cx79-35w7

Also known as: CVE-2026-21884

Summary

React Router SSR XSS in ScrollRestoration

Details

A XSS vulnerability exists in in React Router's <ScrollRestoration> API in Framework Mode when using the getKey/storageKey props during Server-Side Rendering which could allow arbitrary JavaScript execution during SSR if untrusted content is used to generate the keys.

> [!NOTE]
> This does not impact applications if developers have disabled server-side rendering in Framework Mode, or if they are using Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>).

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-01-08 20:50 UTC
Modified
2026-09-08 16:45 UTC

Affected packages and fixes

react-router

npm · All systems

Affected

  • introduced 7.0.0, fixed 7.12.0 (semver)

Fixed versions

7.12.0

Fix

@remix-run/react

npm · All systems

Affected

  • introduced 0, fixed 2.17.3 (semver)

Fixed versions

2.17.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences