react-router
8.5.1 · 27 Oct 2026MIT80.5M / weekRepositorynpmAtom feed
Upgrading react-router From 7.10.1 to 8.5.1
28 releases in betweenevery note read
Reading releases, release notes and advisories…
Start here
Before you upgrade
Tick each one off as you go- Breaking8.4.0
- Breaking8.0.0
- Breaking8.0.0
- Breaking8.0.0
- Breaking8.0.0
- Breaking8.0.0
- Breaking8.0.0
- Breaking8.0.0
- Breaking8.0.0
- Breaking8.0.0
Security
Fixes 13 advisories affecting 7.10.1
- React Router's same-origin redirect with path starting // causes open redirect via protocol-relative URL reinterpretationmoderate · GHSA-2j2x-hqr9-3h42
- React Router vulnerable to XSS via Open Redirectshigh · GHSA-2w69-qvjg-hvjx
- React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydrationmoderate · GHSA-337j-9hxr-rhxg
- React Router's vendored turbo-stream v2 allows arbitrary constructor invocation via TYPE_ERROR deserialization leading to Unauth RCEhigh · GHSA-49rj-9fvp-4h2h
- React Router vulnerable to XSS in unstable RSC redirect handling via javascript: redirect targetshigh · GHSA-8646-j5j9-6r62
- React Router SSR XSS in ScrollRestorationhigh · GHSA-8v8x-cx79-35w7
- React Router vulnerable to DoS via unbounded path expansion in __manifest endpointhigh · GHSA-8x6r-g9mw-2r78
- React Router: Unauthenticated Denial of Service via Inefficient Route Matchinghigh · GHSA-chx6-hx7r-mcp5
- React Router has stored XSS via unescaped Location header in prerendered redirect HTMLmoderate · GHSA-f22v-gfqf-p8f3
- React Router has CSRF issue in Action/Server Action Request Processingmoderate · GHSA-h5cw-625j-3rxh
- React Router: Open redirect leading to XSSmoderate · GHSA-jjmj-jmhj-qwj2
- React Router vulnerable to Denial of Service via reflected user input in single-fetchhigh · GHSA-rxv8-25v2-qmq8
- React Router: Open redirect via backslash in <Link> and useNavigate (CVE-2025-68470 bypass)moderate · GHSA-wrjc-x8rr-h8h6
- 8.3.0
Harden RSC CSRF code paths
- 7.18.2
react-router- Harden RSC CSRF codepaths. - 7.12.0
Add additional layer of CSRF protection by rejecting submissions to UI routes from external origins. If you need to permit access to specific external origins, you can specify them in the
react-router.config.tsconfigallowedActionOriginsfield.
Release by release
- New
Add an opt-in
<Await unstable_promise={promise}>implementation based on React'suse()API - Fixed
Fix
URIError: URI malformedwhen anssr: falsedev server receives a URL path with a malformed percent-encoding - Fixed
Bound server route manifest processing for paths with expensive route expansion
- Fixed
Encode commas within paths sent to the lazy route discovery manifest endpoint so routes with commas in their paths are discovered correctly
- New
- Deprecated
Deprecate React Router's view transition APIs in favor of React's
<ViewTransition>component, available in React 19.3 and later - New
Add an
unstable_fetchprop to<HydratedRouter>to customize JavaScript-issued manifest and server data requests in conventional Framework Mode - New
Support API-only Framework Mode with runtime server data loading, actions, revalidation, and lazy route discovery
- New
Add
unstable_useRouteDiscoveryfor application-controlled route discovery in conventional Framework Mode
- Deprecated
- Breaking
⚠️ This contains some breaking changes to exported
UNSAFE_contexts, so please review carefully if you are using those unsafe exports - Deprecated
Deprecate the
createStaticRouter({ branches })option - New
Add a Data Mode
future.unstable_routePatternMatchingflag for more efficient route matching powered by@remix-run/route-pattern - Fixed
Prevent stale route discovery during manifest version-mismatch recovery
- Breaking
- New
Add additional URL validation on client side navigations/redirects
- Fixed
Fix
Expected fetcher: <key>error thrown on navigation when a fetcher is aborted during its post-action revalidation - Fixed
Fix lazy route discovery caching a path as discovered when the triggering navigation was aborted after the manifest response settled but before the route tree was patched, which permanently (for the session) shadowed the real route behind a catch-all or produced 404s on every subsequent visit
- Fixed
Improve route matching performance for long paths
- Fixed
Improve validation of action request origins
- Fixed
Fix
<ScrollRestoration>leavinghistory.scrollRestorationset to"auto"after a bfcache restore, which let the browser restore scroll on subsequent history traversals before the destination route had rendered - Fixed
Properly respect the
relativeoption inuseSubmit/fetcher.submitwhen resolivng theactionpath
- New
- Security
Harden RSC CSRF code paths
- New
Add CSP nonce support to RSC document rendering
- Fixed
Encode path params in
href/generatePathper RFC 3986 path-segment rules instead ofencodeURIComponent - Fixed
Use
crypto.randomUUID()forcreateMemorySessionStoragesession ids - Fixed
Fix
NavLinknot applying itspendingstate whentohas a trailing slash - Fixed
Preserve RSC route component metadata so routes with a
clientLoadercan skip unnecessary server requests once their components have rendered while still fetching missing server-rendered elements - Fixed
Fix server crash (
TypeError: Invalid state: Unable to enqueue) when a request is aborted while the RSC HTML stream has a pending flush
- Security
- Fixed
Fix
href()to properly stringify and URL-encode param values, matchinggeneratePath() - Fixed
Fix dynamic param extraction for routes with optional static segments
- Fixed
Preserve navigation blocker state through a revalidation
- Fixed
Fix route ranking for dynamic parameters with static extension suffixes
- Fixed
Use ReactFormState types instead of unknown
- Fixed
- New
Return route metadata from server request, client navigation, and client fetcher instrumentations
- New
- Fixed
Remove the obsolete
AppLoadContexttype export accidentally left over from v7 now that middleware is always enabled and server request context is provided throughRouterContextProvider.
- Fixed
3 other lines we could not sort, mostly version bumps
- 8.5.0
Return middleware short-circuit responses as-is for document requests in RSC modes, including resource routes, instead of decoding non-RSC bodies as Flight
- 8.4.0
Document access control requirements for RSC Server Functions
- 8.3.0
Detect stale RSC clients during lazy route discovery and reload the destination document
1 internal line (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.