Skip to content

[Snyk] Security upgrade react-router-dom from 6.30.3 to 7.18.0 - #13034

Open
sestinj wants to merge 1 commit into
mainfrom
snyk-fix-5f5db977c086abbdea4dd855fa6712ed
Open

[Snyk] Security upgrade react-router-dom from 6.30.3 to 7.18.0#13034
sestinj wants to merge 1 commit into
mainfrom
snyk-fix-5f5db977c086abbdea4dd855fa6712ed

Conversation

@sestinj

@sestinj sestinj commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • gui/package.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Open Redirect
SNYK-JS-REACTROUTER-18313144
  641  

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Open Redirect

@sestinj

sestinj commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Merge Risk: High

The upgrade from react-router-dom v6 to v7 is a major version jump with significant breaking changes and a shift in the library's core philosophy. It requires code modifications and a careful migration strategy.

Key Breaking Changes:

  • Package Consolidation: The react-router-dom package is now a wrapper around the main react-router package. All imports should be updated to source from react-router or react-router/dom. The react-router-dom package is deprecated and will be removed in v8.

  • Required Response Objects in Loaders: Data loader and action functions can no longer return plain JavaScript objects. They must now return a Response object, typically by using the json() utility from react-router.

    • Before (v6): return { data: '...' }
    • After (v7): return json({ data: '...' })
  • Architectural Shift: Version 7 fully embraces the "Data Router" paradigm introduced in v6.4, moving away from component-based data fetching (useEffect) towards route-level loader and action functions. It also introduces a "Framework Mode" that provides capabilities similar to full-stack frameworks like Remix, including SSR and optimized builds.

  • Prerequisites: React Router v7 requires react@18 and react-dom@18.

Recommendation:
This is a high-impact upgrade. Before merging, you must:

  1. Update all package imports from react-router-dom to react-router.
  2. Audit all data loaders and actions to ensure they return Response objects using helpers like json().
  3. Review the official migration guides and consider using the "future flags" available in v6 to adopt these changes incrementally before the final version jump.

Source: React Router v7 Release Information

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants