harden RSC CSRF codepaths - #15311
Merged
Merged
Conversation
Contributor
Preview Build AvailablePreview builds have been created for this PR. You can install pnpm install "remix-run/react-router#preview/pr-15311&path:packages/react-router"And/or install other packages via: pnpm install "remix-run/react-router#preview/pr-15311&path:packages/react-router-dev"
pnpm install "remix-run/react-router#preview/pr-15311&path:packages/react-router-express"
pnpm install "remix-run/react-router#preview/pr-15311&path:packages/react-router-node"
pnpm install "remix-run/react-router#preview/pr-15311&path:packages/react-router-serve"These preview builds will be updated automatically as you push new commits. |
Contributor
✅ CLA SignedThanks for signing the Contributor License Agreement. |
Contributor
✅ Change File FoundOne or more change files found.
|
Contributor
|
The preview branch |
Merged
Contributor
|
🤖 Hello there, We recently published version Thanks! |
|
@jacob-ebey is this planned for v7 as well? Thanks! |
brookslybrand
added a commit
that referenced
this pull request
Jul 28, 2026
AlvanChow
pushed a commit
to AlvanChow/personalityquizzes
that referenced
this pull request
Jul 29, 2026
Clears GHSA-qwww-vcr4-c8h2, which was failing `npm audit --omit=dev --audit-level=high` in both ci.yml and deploy.yml. The deploy workflow runs that audit before build and `wrangler deploy`, so the gate was blocking production releases outright, not just showing a red check. The advisory was never exploitable here — it affects only the unstable RSC APIs, and the fix (remix-run/react-router#15311) touches a single file, packages/react-router/lib/rsc/server.rsc.ts, reachable only through the `react-server` conditional export that a browser SPA bundle never resolves. This app is declarative-mode only. But there is no patched 7.x: the advisory range covers 7.12.0 through 8.2.0, `react-router-dom` ends at 7.18.1 with no v8 line, and the sole patched version is react-router@8.3.0. - Replace the react-router-dom dependency with react-router@^8.3.0. In v8 the v6-compat re-export shim is gone, so the import specifier moves in 34 files (32 imports plus the vi.mock in Dashboard.test.jsx and the manualChunks entry in vite.config.js). All nine APIs this app uses — BrowserRouter, Routes, Route, Navigate, Link, MemoryRouter, useNavigate, useLocation, useParams — are unchanged in v8 and verified present in the v8 root export. Only RouterProvider/HydratedRouter moved to react-router/dom; neither is used here. - Raise react and react-dom floors to ^19.2.7 to match v8's declared peer range. The old ^19.2.0 permitted an under-minimum resolution even though npm happens to resolve 19.2.8 today. - Raise engines.node to >=22.22.0 to match v8. CI and deploy both run Node 24. Verified: npm run check passes end to end for the first time, including `npm audit --omit=dev --audit-level=high` reporting 0 vulnerabilities. 361 tests across 42 files pass. Also driven in Chromium against the real production build with SPA fallback, exercising every router API in use: eager and lazy routes render their own content, useParams resolves through the quiz registry, Navigate redirects /crew to /circle, the catch-all renders NotFound, useNavigate moves route imperatively, and Link navigates client-side without a document reload. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PmuxLEfqmMeqBg8gpuXNHa
4 tasks
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.
No description provided.