Repository navigation
fix(frontend): bump react-router-dom to 7.18.2 for RSC CSRF hardening - #122
Merged
Merged
Conversation
GHSA-qwww-vcr4-c8h2 (Dependabot alert 24) reports a CSRF bypass in React Router's unstable RSC code paths. The upstream advisory backports the fix to 7.18.2 as well as 8.3.0; the GitHub Advisory Database range (>= 7.12.0, < 8.3.0) omits the 7.x patch and so points at a major bump. 7.18.2 is a patch release already permitted by the declared ^7.18.1 range, containing only "Harden RSC CSRF codepaths" with no API changes. Note this app was never exposed: it mounts the declarative BrowserRouter and uses no data router, loaders, actions, or server rendering. The shipped bundle contains no RSC code at all. The bump is taken because it is free, not because the path was reachable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the exposure behind Dependabot alert 24 (GHSA-qwww-vcr4-c8h2, "React
Router: RSC Mode CSRF Bypass Allows Action Execution Before 400 Response").
Why this is a patch bump, not a major migration
Dependabot reports the affected range as
>= 7.12.0, < 8.3.0with 8.3.0 asthe first patched version, which makes this look like a forced 7 -> 8 major.
It isn't. The upstream advisory on the react-router repo lists patched
versions as 7.18.2 and 8.3.0 — the GitHub Advisory Database entry
collapsed those into one range and dropped the 7.x backport.
7.18.2is a patch release already permitted by the declared^7.18.1range. Its entire changelog is one entry: "Harden RSC CSRF codepaths"
(remix-run/react-router#15353). No API changes, no breaking changes, and
its dependency and peer-dependency sets are identical to 7.18.1.
For contrast, the 8.x path would have been substantial:
react-router-domhas no 8.x release at all — it was folded into
react-routerin v8 — sothat route means migrating all 9 importing files off the package entirely.
Exploitability in this app: none
The advisory states: "This only affects your application if you are using
the unstable RSC APIs." This frontend is a client-only Vite SPA:
BrowserRouter(frontend/src/App.tsx), not adata router — no
createBrowserRouter/RouterProviderloaders oractions, no server rendering, no server actionsRoutes,Route,Navigate,Link,Outlet,useNavigate,useParams,useLocationcallServer,decodeAction,decodeReply,createTemporaryReferenceSet, and anycsrfsymbol allreturn 0 matches across
dist/assets/*.jsThe bump is taken because it is free, not because the path was reachable.
Note on
npm auditnpm auditwill continue to flag this after the bump, because the advisorydatabase range still covers 7.18.2. Do not run
npm audit fix --forcehere: on this tree it proposes
react-router-dom@7.11.0, a downgrade to amore vulnerable version, since the DB range offers it no valid 7.x target.
Alert 24 likely needs a manual dismissal noting that 7.18.2 carries the fix.
Test plan
All run locally on this commit, from
frontend/:npm run type-check— cleannpm run lint— cleannpm test— 92/92 passing across 10 filesnpm run build— succeeds;react-vendorchunk still forms correctly(the
vite.config.tschunk rule matches on package name, not version)integrity hashes updated, no other packages touched
🤖 Generated with Claude Code