react-router
8.5.1 · 27 Oct 2026MIT80.5M / weekRepositorynpmAtom feed
Upgrading react-router From 6.15.0 to 6.16.0
1 release in betweenevery note read
Reading releases, release notes and advisories…
- 2
- changes to make
- 0
- advisories fixed
- 2
- new
- 0
- fixes
Before you upgrade
Tick each one off as you go- Breaking6.16.0
- Breaking6.16.0
Security
4 advisories still affect 6.16.0
- React Router's same-origin redirect with path starting // causes open redirect via protocol-relative URL reinterpretationmoderate · GHSA-2j2x-hqr9-3h42
- React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydrationmoderate · GHSA-337j-9hxr-rhxg
- React Router has unexpected external redirect via untrusted pathsmoderate · GHSA-9jcx-v3wj-wh4m
- React Router: Open redirect via backslash in <Link> and useNavigate (CVE-2025-68470 bypass)moderate · GHSA-wrjc-x8rr-h8h6
Upgrading to 7.18.0 clears them.
Release by release
- Breaking
In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of
anywithunknownon exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default toanyin React Router and are overridden withunknownin Remix. In React Router v7 we plan to move these tounknownas a breaking change. - Breaking
Removed private/internal APIs only required for the Remix v1 backwards compatibility layer and no longer needed in Remix v2 (
_isFetchActionRedirect,_hasFetcherDoneAnything) - New
Move the
@privateclass exportErrorResponseto anUNSAFE_ErrorResponseImplexport since it is an implementation detail and there should be no construction ofErrorResponseinstances in userland. This frees us up to export atype ErrorResponsewhich correlates to an instance of the class viaInstanceType. Userland code should only ever be usingErrorResponseas a type and should be type-narrowing viaisRouteErrorResponse. - New
Export
ShouldRevalidateFunctionArgsinterface
- Breaking
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.