react-router
8.5.1 · 27 Oct 2026MIT80.5M / weekRepositorynpmAtom feed
7.18.6 is the newest release of 7.x.
In short
1 breaking1 removed7 new4 fixed1 internal
- Breaking
⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
- Removed
Remove
unstable_subResourceIntegrityfrom the runtimeFutureConfigtype; the flag is now controlled by the top-levelsubResourceIntegrityoption inreact-router.config.ts
Security
Fixes 1 advisory that affected 7.14.2
- HighReact Router vulnerable to DoS via unbounded path expansion in __manifest endpointGHSA-8x6r-g9mw-2r78 · 3 Jun 2026Fixed in 7.15.0
6 advisories affect 7.15.0; 7.18.2 fixes them
- HighReact Router: RSC Mode CSRF Bypass Allows Action Execution Before 400 ResponseGHSA-qwww-vcr4-c8h2 · 24 Jul 2026Fixed in 7.18.2
- HighReact Router: Unauthenticated Denial of Service via Inefficient Route MatchingGHSA-chx6-hx7r-mcp5 · 24 Jul 2026Fixed in 7.18.0
- ModerateReact Router: Open redirect via backslash in <Link> and useNavigate (CVE-2025-68470 bypass)GHSA-wrjc-x8rr-h8h6 · 23 Jul 2026Fixed in 7.18.0
- ModerateReact Router: RSCErrorHandler Missing Protocol Validation (XSS)GHSA-h8fp-f39c-q6mh · 23 Jul 2026Fixed in 7.18.0
- ModerateReact Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR HydrationGHSA-337j-9hxr-rhxg · 23 Jul 2026Fixed in 7.18.0
1 more
- LowReact Router: Potential CSRF via PUT/PATCH/DELETE document requestsGHSA-84g9-w2xq-vcv6 · 15 Jun 2026Fixed in 7.15.1
Release note
The section about react-router of a note shared by several packages.
Minor Changes
Stabilize
unstable_defaultShouldRevalidateasdefaultShouldRevalidateon<Link>,<Form>,useLinkClickHandler,useSubmit,fetcher.submit, andsetSearchParams⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize the instrumentation APIs.
unstable_instrumentationsis nowinstrumentationsandunstable_patternis nowpatternThe
unstable_ServerInstrumentation,unstable_ClientInstrumentation,unstable_InstrumentRequestHandlerFunction,unstable_InstrumentRouterFunction,unstable_InstrumentRouteFunction, andunstable_InstrumentationHandlerResulttypes have had theirunstable_prefixes removed⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize
unstable_maskasmaskon<Link>,useLinkClickHandler, anduseNavigate, and rename the correspondingLocation.unstable_maskfield toLocation.mask⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize the
unstable_normalizePathoption onstaticHandler.queryandstaticHandler.queryRouteasnormalizePath⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize
future.unstable_passThroughRequestsasfuture.v8_passThroughRequests⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
- Removed
Remove
unstable_subResourceIntegrityfrom the runtimeFutureConfigtype; the flag is now controlled by the top-levelsubResourceIntegrityoption inreact-router.config.ts⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize
unstable_urlasurlonloader,action, andmiddlewarefunction args⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize
unstable_useTransitionsasuseTransitionson<BrowserRouter>,<HashRouter>,<HistoryRouter>,<MemoryRouter>,<Router>,<RouterProvider>,<HydratedRouter>, anduseLinkClickHandler⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Patch Changes
Add
nonceto<Scripts><link rel="modulepreload">elements (if provided)Fix a bug with
unstable_defaultShouldRevalidate={false}where parent routes that did not export ashouldRevalidatefunction could be incorrectly included in the single fetch call for new child route dataImprove server-side route matching performance by pre-computing flattened/cached route branches
Performance benchmarks showed roughly a 10-15% improvement in server-side request handling performance
Cache flattened/ranked route branches to optimize server-side route matching
Improve route matching performance in Framework/Data Mode
Avoiding unnecessary calls to
matchRoutesin data router scenariosThis includes adding back the optimization that was removed in
7.6.0The issues that prompted the revert have been addressed by using the available router
matchesbut always updatingmatch.routeto the latest route in themanifest
Leverage pre-computed pre-computing flattened/cached route branches during client side route matching
Performance benchmarks showed roughly a 15-30% improvement in server-side request handling performance
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.