CVE-2026-42211: React Router Arbitrary Constructor Invocation via TYPE_ERROR Deserialization

react-router Updated 04 Jun 2026

Summary

03/06/2026
Yes i
High
8.1

CVE-2026-42211: When using React Router v7 in Framework Mode, there exists a combination of steps that could potentially allow unauthorized RCE through external requests. Affects react-router versions >= 7.0.0, < 7.14.2. Fixed in 7.14.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

React Router is a popular routing library for React applications, enabling developers to create dynamic single-page applications with ease. It supports various modes of operation, including Framework Mode, which allows for server-side rendering and enhanced performance. However, a vulnerability has been identified in the vendored turbo-stream v2 when used in Framework Mode, exposing applications to potential security risks.

Vulnerability Detail

The vulnerability arises from a combination of using React Router v7 in Framework Mode and the presence of an existing prototype pollution vulnerability in the application code. This can lead to a two-step attack where unauthorized remote code execution (RCE) can be triggered through external requests. The severity of this vulnerability is high, with a CVSS score of 8.1, indicating significant potential for exploitation if not addressed.

How To Fix

Latest published version: 8.5.0 as of 23 Oct 2026

npm install react-router@8.5.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

7.14.2

This is the first release that contains the fix.

npm install react-router@7.14.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not feasible, consider switching to Declarative Mode or Data Mode in your application, as these modes are not impacted by this vulnerability. For example, you can use <BrowserRouter> for Declarative Mode or createBrowserRouter for Data Mode.

Conclusion

CVE-2026-42211 poses a significant risk to applications using React Router in Framework Mode due to the potential for unauthorized remote code execution. It is crucial for developers to update to the patched version or implement workarounds to mitigate this vulnerability.

See every vulnerability recorded for react-router →

Share this vulnerability

FAQ

CVE-2026-42211 is a vulnerability in React Router that allows for arbitrary constructor invocation through TYPE_ERROR deserialization, potentially leading to unauthorized remote code execution.

You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading your package-lock.json file, you can receive real-time alerts about vulnerabilities, including CVE-2026-42211.

As a temporary measure, switch to Declarative Mode or Data Mode, which are not affected by this vulnerability.

The vulnerability has a CVSS score of 8.1, indicating a high severity level and significant risk of exploitation.

You can find detailed information about CVE-2026-42211 in the official advisory on GitHub and other security databases.

Related vulnerabilities

Recent vulnerabilities recorded for react-router.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 8.5.0 as of 23 Oct 2026

npm install react-router@8.5.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

7.14.2

This is the first release that contains the fix.

npm install react-router@7.14.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback