fix(security): update react-router to patched v7 (CVEs) - #680
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
birme
left a comment
There was a problem hiding this comment.
code-reviewer (daily-backlog-pr Phase 3):
Code Review
Verdict: LGTM
Summary: Clean, minimal security patch bumping react-router/react-router-dom from 7.13.1 to 7.18.3 (within v7, staying off the v8 major). No app-facing breaking changes and the lockfile is internally consistent.
Blocking
None.
Warnings
None.
Suggestions
package.json:39-40— All react-router API usage in the app is confined to stable v7 hooks/components with no behavioral changes between 7.13 and 7.18:BrowserRouter,Routes,Route,Navigate,useLocation,useNavigate,useSearchParams,useParams,useRouteError(verified acrosssrc/App.tsx,src/components/header.tsx,calls-page,production-line,use-calls-navigation.tsx,router-error.tsx, and ~8 others). No data-router APIs (loaders/actions,json(),defer(),Form,redirect()) are used, so the turbo-stream / Location-header / DOM XSS advisory surfaces are either not exercised or now patched. No action needed — noted for reviewer confidence.- Imports correctly target
react-router(v7 consolidated thereact-router-domre-exports into the core package);react-router-domis retained as a dep, which is fine.
NPM Migration / Lockfile Hygiene
package-lock.jsonis consistent:react-router-dom@7.18.3->react-router@7.18.3(versions aligned, no divergent nested copy), package.json^7.18.3ranges match the resolved 7.18.3 entries, andengines/dependenciesblocks are intact. Noyarnreintroduction, noyarn.lock. Dual-package check per PR body confirms no nested divergent copies.
PR body correctly reports the prior version as 7.13.1 (range ^7.13.0), matching the removed lockfile lines.
birme
left a comment
There was a problem hiding this comment.
Code Review
Verdict: LGTM
Summary: Clean, correctly-scoped dependency security bump. react-router/react-router-dom moved from ^7.13.0 (resolved 7.13.1) to ^7.18.3, which fully patches all three cited advisories and, in fact, every currently-known high-severity react-router advisory. package.json and package-lock.json are consistent, versions stay aligned, and there is no dual-package divergence.
Blocking
None.
Warnings
None.
Suggestions
package.json:39-40— Consider whether staying on the caret range^7.18.3is desired long-term. Thelatestdist-tag is now v8; the PR intentionally pins to patched v7, which is the right call to avoid an unreviewed major bump. Worth a follow-up issue to plan the eventual v8 migration.
Verification notes (npm migration hygiene + CVE coverage)
- CVE coverage confirmed against GitHub Advisory DB:
- GHSA-49rj-9fvp-4h2h (turbo-stream RCE, 8.1) — vulnerable
>= 7.0.0, <= 7.14.1, patched7.14.2. 7.18.3 safe. - GHSA-8646-j5j9-6r62 (RSC redirect XSS, 8.0) — vulnerable
>= 7.7.0, < 7.13.2, patched7.13.2. 7.18.3 safe. - GHSA-f22v-gfqf-p8f3 (stored XSS via Location header) — vulnerable
>= 7.5.1, < 7.13.2, patched7.13.2. 7.18.3 safe. - The previously-installed
7.13.1was affected by all three (in particular the RCE, which needs7.14.2), so the bump was necessary. - Bonus: 7.18.3 also clears the newer high-severity GHSA-qwww-vcr4-c8h2 (vulnerable
< 7.18.2) and every other current react-router advisory (all< 7.18.x). No known react-router advisory affects 7.18.3.
- GHSA-49rj-9fvp-4h2h (turbo-stream RCE, 8.1) — vulnerable
- Lockfile consistency (npm, not yarn):
package.jsonranges (^7.18.3both) matchpackage-lock.jsonroot ranges; both packages resolve to7.18.3;react-router-dom's pinned dep onreact-routeris7.18.3. Noyarn.lockpresent or added. - Dual-package hazard: No nested divergent copies —
node_modules/react-router-dom/node_modules/react-routerandnode_modules/react-router/node_modules/react-router-domare both absent (single hoisted copy). - Build sanity:
npm ci+npm run typecheck(tsc --noEmit) pass cleanly on the checked-out branch. - Changeset scope is exactly
package.json+package-lock.json— no unrelated changes.
Categories 1-7 (TypeScript, error handling, architecture, testing, WebRTC/SDP) are N/A — this PR touches no source or test files.
Code ReviewVerdict: LGTM Summary: Clean minimal bump of react-router/react-router-dom 7.13.1→7.18.3, staying within v7; lock and manifest consistent. Reviewed against the Open Intercom |
Summary
react-routerandreact-router-domfrom7.13.1to7.18.3(range^7.18.3for both, kept version-aligned).npm auditnow reports zero react-router advisories at any level.7.18.3;latestdist-tag is now v8 major — intentionally not taken).node_modules/react-router-dom/node_modules/react-routerandnode_modules/react-router/node_modules/react-router-domarenone (OK).Test plan
npm test) — 18 files / 147 testsnpm run typecheck)npm run lint)npm audit --audit-level=highclear for react-routerCloses #647
🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com