CVE-2026-21884: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in remix-run react-router
React Router is a router for React. In @remix-run/react version prior to 2.17.3. and react-router 7.0.0 through 7.11.0, 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. There is no impact if server-side rendering in Framework Mode is disabled, or if Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>) is being used. This issue has been patched in @remix-run/react version 2.17.3 and react-router version 7.12.0.
AI Analysis
Technical Summary
CVE-2026-21884 is a Cross-Site Scripting (XSS) vulnerability classified under CWE-79 affecting the React Router library, specifically versions prior to 2.17.3 of @remix-run/react and versions 7.0.0 through 7.11.0 of react-router. The vulnerability is located in the <ScrollRestoration> API when operating in Framework Mode with Server-Side Rendering (SSR). It involves improper neutralization of input during web page generation, where the getKey or storageKey properties are used to generate keys from untrusted content. This flaw allows an attacker to inject and execute arbitrary JavaScript code during SSR, potentially compromising confidentiality by stealing cookies or session tokens, and integrity by manipulating client-side scripts. The vulnerability does not affect applications that disable SSR in Framework Mode or use Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>). Exploitation requires user interaction but no authentication, and the vulnerability has a CVSS 3.1 score of 8.2 (high severity) with vector AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N, indicating network attack vector, low attack complexity, no privileges required, user interaction required, scope change, high confidentiality impact, low integrity impact, and no availability impact. No known exploits have been reported in the wild. The issue has been resolved in @remix-run/react version 2.17.3 and react-router version 7.12.0. Organizations using affected versions should upgrade promptly and audit usage of the <ScrollRestoration> API in SSR Framework Mode to ensure no untrusted input is used in key generation.
Potential Impact
For European organizations, this vulnerability poses a significant risk especially for web applications built with React that utilize Server-Side Rendering in Framework Mode with the affected versions of react-router. Successful exploitation can lead to arbitrary JavaScript execution in users' browsers, enabling theft of sensitive data such as authentication tokens, session cookies, or personal information, thereby compromising confidentiality. Additionally, injected scripts could manipulate client-side behavior, affecting data integrity. Although availability is not impacted, the reputational damage and potential regulatory consequences under GDPR for data breaches could be severe. Organizations in sectors with high web application usage—such as finance, e-commerce, healthcare, and government—are particularly vulnerable. The requirement for user interaction means phishing or social engineering could be used to trigger the exploit. The lack of known exploits in the wild provides a window for proactive mitigation, but the high CVSS score underscores the urgency of patching. Failure to address this vulnerability could lead to targeted attacks exploiting the SSR mechanism, which is widely adopted in modern React applications across Europe.
Mitigation Recommendations
1. Immediate upgrade to patched versions: Update @remix-run/react to version 2.17.3 or later and react-router to version 7.12.0 or later to eliminate the vulnerability. 2. Audit codebases for usage of <ScrollRestoration> API in Framework Mode with SSR, especially where getKey or storageKey props are set. 3. Ensure that any input used to generate keys is strictly validated and sanitized to prevent injection of malicious scripts. 4. If upgrading immediately is not feasible, consider disabling Server-Side Rendering in Framework Mode or switching to Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>) as a temporary mitigation. 5. Implement Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts, reducing the impact of potential XSS. 6. Educate developers and security teams about the risks of SSR with untrusted input and enforce secure coding practices around key generation. 7. Monitor application logs and user reports for suspicious activity that could indicate attempted exploitation. 8. Conduct penetration testing focusing on SSR and XSS vectors to validate the effectiveness of mitigations.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Belgium, Poland, Ireland
CVE-2026-21884: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in remix-run react-router
Description
React Router is a router for React. In @remix-run/react version prior to 2.17.3. and react-router 7.0.0 through 7.11.0, 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. There is no impact if server-side rendering in Framework Mode is disabled, or if Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>) is being used. This issue has been patched in @remix-run/react version 2.17.3 and react-router version 7.12.0.
AI-Powered Analysis
Technical Analysis
CVE-2026-21884 is a Cross-Site Scripting (XSS) vulnerability classified under CWE-79 affecting the React Router library, specifically versions prior to 2.17.3 of @remix-run/react and versions 7.0.0 through 7.11.0 of react-router. The vulnerability is located in the <ScrollRestoration> API when operating in Framework Mode with Server-Side Rendering (SSR). It involves improper neutralization of input during web page generation, where the getKey or storageKey properties are used to generate keys from untrusted content. This flaw allows an attacker to inject and execute arbitrary JavaScript code during SSR, potentially compromising confidentiality by stealing cookies or session tokens, and integrity by manipulating client-side scripts. The vulnerability does not affect applications that disable SSR in Framework Mode or use Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>). Exploitation requires user interaction but no authentication, and the vulnerability has a CVSS 3.1 score of 8.2 (high severity) with vector AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N, indicating network attack vector, low attack complexity, no privileges required, user interaction required, scope change, high confidentiality impact, low integrity impact, and no availability impact. No known exploits have been reported in the wild. The issue has been resolved in @remix-run/react version 2.17.3 and react-router version 7.12.0. Organizations using affected versions should upgrade promptly and audit usage of the <ScrollRestoration> API in SSR Framework Mode to ensure no untrusted input is used in key generation.
Potential Impact
For European organizations, this vulnerability poses a significant risk especially for web applications built with React that utilize Server-Side Rendering in Framework Mode with the affected versions of react-router. Successful exploitation can lead to arbitrary JavaScript execution in users' browsers, enabling theft of sensitive data such as authentication tokens, session cookies, or personal information, thereby compromising confidentiality. Additionally, injected scripts could manipulate client-side behavior, affecting data integrity. Although availability is not impacted, the reputational damage and potential regulatory consequences under GDPR for data breaches could be severe. Organizations in sectors with high web application usage—such as finance, e-commerce, healthcare, and government—are particularly vulnerable. The requirement for user interaction means phishing or social engineering could be used to trigger the exploit. The lack of known exploits in the wild provides a window for proactive mitigation, but the high CVSS score underscores the urgency of patching. Failure to address this vulnerability could lead to targeted attacks exploiting the SSR mechanism, which is widely adopted in modern React applications across Europe.
Mitigation Recommendations
1. Immediate upgrade to patched versions: Update @remix-run/react to version 2.17.3 or later and react-router to version 7.12.0 or later to eliminate the vulnerability. 2. Audit codebases for usage of <ScrollRestoration> API in Framework Mode with SSR, especially where getKey or storageKey props are set. 3. Ensure that any input used to generate keys is strictly validated and sanitized to prevent injection of malicious scripts. 4. If upgrading immediately is not feasible, consider disabling Server-Side Rendering in Framework Mode or switching to Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>) as a temporary mitigation. 5. Implement Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts, reducing the impact of potential XSS. 6. Educate developers and security teams about the risks of SSR with untrusted input and enforce secure coding practices around key generation. 7. Monitor application logs and user reports for suspicious activity that could indicate attempted exploitation. 8. Conduct penetration testing focusing on SSR and XSS vectors to validate the effectiveness of mitigations.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-01-05T17:24:36.928Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6961c40f19784dcf52ace86a
Added to database: 1/10/2026, 3:14:23 AM
Last enriched: 1/17/2026, 7:47:40 AM
Last updated: 2/7/2026, 6:48:24 PM
Views: 128
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-2106: Improper Authorization in yeqifu warehouse
MediumCVE-2026-2105: Improper Authorization in yeqifu warehouse
MediumCVE-2026-2090: SQL Injection in SourceCodester Online Class Record System
MediumCVE-2026-2089: SQL Injection in SourceCodester Online Class Record System
MediumCVE-2026-2088: SQL Injection in PHPGurukul Beauty Parlour Management System
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.