react-router
8.5.1 · 27 Oct 2026MIT80.5M / weekRepositorynpmAtom feed
7.18.6 is the newest release of 7.x.
In short
2 new5 fixed
Security
Fixes 2 advisories that affected 7.13.1
- HighReact Router vulnerable to XSS in unstable RSC redirect handling via javascript: redirect targetsGHSA-8646-j5j9-6r62 · 3 Jun 2026Fixed in 7.13.2
- ModerateReact Router has stored XSS via unescaped Location header in prerendered redirect HTMLGHSA-f22v-gfqf-p8f3 · 3 Jun 2026Fixed in 7.13.2
10 advisories affect 7.13.2; 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
- HighReact Router vulnerable to Denial of Service via reflected user input in single-fetchGHSA-rxv8-25v2-qmq8 · 4 Jun 2026Fixed in 7.14.0
- HighReact Router vulnerable to DoS via unbounded path expansion in __manifest endpointGHSA-8x6r-g9mw-2r78 · 3 Jun 2026Fixed in 7.15.0
- HighReact Router's vendored turbo-stream v2 allows arbitrary constructor invocation via TYPE_ERROR deserialization leading to Unauth RCEGHSA-49rj-9fvp-4h2h · 3 Jun 2026Fixed in 7.14.2
5 more
- 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
- ModerateReact Router's same-origin redirect with path starting // causes open redirect via protocol-relative URL reinterpretationGHSA-2j2x-hqr9-3h42 · 3 Jun 2026Fixed in 7.14.1
- 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.
Patch Changes
Fix clientLoader.hydrate when an ancestor route is also hydrating a clientLoader
Fix type error when passing Framework Mode route components using
Route.ComponentPropstocreateRoutesStubFix percent encoding in relative path navigation
Add
future.unstable_passThroughRequestsflagBy default, React Router normalizes the
request.urlpassed to yourloader,action, andmiddlewarefunctions by removing React Router's internal implementation details (.datasuffixes,index+_routesquery params).Enabling this flag removes that normalization and passes the raw HTTP
requestinstance to your handlers. This provides a few benefits:Reduces server-side overhead by eliminating multiple
new Request()calls on the critical pathAllows you to distinguish document from data requests in your handlers base don the presence of a
.datasuffix (useful for observability purposes)
If you were previously relying on the normalization of
request.url, you can switch to use the new siblingunstable_urlparameter which contains aURLinstance representing the normalized location:// ❌ Before: you could assume there was no `.data` suffix in `request.url` export async function loader({ request }: Route.LoaderArgs) { let url = new URL(request.url); if (url.pathname === "/path") { // This check will fail with the flag enabled because the `.data` suffix will // exist on data requests } } // ✅ After: use `unstable_url` for normalized routing logic and `request.url` // for raw routing logic export async function loader({ request, unstable_url }: Route.LoaderArgs) { if (unstable_url.pathname === "/path") { // This will always have the `.data` suffix stripped } // And now you can distinguish between document versus data requests let isDataRequest = new URL(request.url).pathname.endsWith(".data"); }Internal refactor to consolidate framework-agnostic/React-specific route type layers - no public API changes
Sync protocol validation to rsc flows
Add a new
unstable_url: URLparameter to route handler methods (loader,action,middleware, etc.) representing the normalized URL the application is navigating to or fetching, with React Router implementation details removed (.datasuffix,index/_routesquery params)This is being added alongside the new
future.unstable_passthroughRequestsfuture flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalizedrequest's are being passed to your handlers. When adopting this flag, you will only need to start leveraging this new parameter if you are relying on the normalization ofrequest.urlin your application code.If you don't have the flag enabled, then
unstable_urlwill matchrequest.url.
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.