react-router
8.5.1 · 27 Oct 2026MIT80.5M / weekRepositorynpmAtom feed
7.18.6 is the newest release of 7.x.
In short
8 fixed
Security
Fixes 4 advisories that affected 7.17.0
- 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 advisory affects 7.18.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
Release note
The section about react-router of a note shared by several packages.
Patch Changes
Fix server handler prerender responses when using
ssr: falseandfuture.v8_trailingSlashAwareDataRequests: true. Avoids false positive "SPA Mode" detection when serving prerendered pathsUse the
ServerRouternonce for nonce-aware SSR components when they don't provide their own value so strict CSP pages can load them.Use
turbo-streamto serialize and deserialize Framework Mode hydration errorsPrecompute route branch matchers to avoid recompiling route path regexes during matching
Use the constructed request URL host when validating action request origins.
Remove the un-documented custom error serialization logic from Data Mode SSR built-in hydration flows
Validate protocols in RSC render redirects
Consolidate url normalization logic and better handle mixed slashes
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.