CVE-2026-21884CWE-79

React Router SSR XSS in ScrollRestoration

High · published January 10, 2026

CVSS v3.1
8.2
EPSS
1%
Percentile
44.0
In the wild
Unconfirmed
What it is

⚡ A sneaky XSS vulnerability lurks in React Router's <ScrollRestoration> API for versions up to 7.11.0! 🤯 If you're using the wrong keys during Server-Side Rendering (SSR), attackers could run arbitrary JavaScript! Think of your website like a restaurant where the menu is printed with ingredients. If someone slips in a special ingredient (untrusted content) that wasn’t vetted, they could end up serving a dish that’s not just unappetizing but downright dangerous! 🍽️ An attacker could exploit this vulnerability to execute malicious JavaScript during the SSR process, potentially gaining access to sensitive data or hijacking user sessions. This could lead to devastating consequences for users, such as stolen credentials or compromised accounts.

Put simply

Think of your website like a restaurant where the menu is printed with ingredients. If someone slips in a special ingredient (untrusted content) that wasn’t vetted, they could end up serving a dish that’s not just unappetizing but downright dangerous! 🍽️ This XSS vulnerability exists in @remix-run/react prior to version 2.17.3 and react-router versions 7.0.0 through 7.11.0, specifically in the <ScrollRestoration> API when the getKey/storageKey props are incorrectly used with untrusted input during Server-Side Rendering.

What to do

An attacker could exploit this vulnerability to execute malicious JavaScript during the SSR process, potentially gaining access to sensitive data or hijacking user sessions. This could lead to devastating consequences for users, such as stolen credentials or compromised accounts. To safeguard your application, upgrade to @remix-run/react version 2.17.3 or react-router version 7.12.0 immediately. Additionally, review your implementation of the <ScrollRestoration> API to ensure that only trusted content is used for keys. 🛡️ You've got this! Follow these steps, and you’ll have your site secured in no time. 🚀

The record
Technical detail
CVSS v3.1
8.2 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
CVSS v4.0
Not supplied
EPSS
0.00531 · 44.0th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2026-01-10T02:41Z
EPSS history
Timeline
  • 10 JAN 02:41Z
    React Router SSR XSS in ScrollRestoration
    cvelistv5