Intel

AIKIDO-2026-274519

react-router is vulnerable to Cross-Site Request Forgery (CSRF)

Cross-Site Request Forgery (CSRF) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 4 days ago

59

Medium Risk

This Affects:

JSreact-router
7.12.0 - 7.17.0
Fixed in 7.18.0
Are you affected? Scan for Free

TL;DR

React Router Framework Mode compares the Origin header to a host derived from x-forwarded-host or Host when validating action requests. An attacker who can supply a matching forwarded host value alongside a cross-site origin can satisfy the check and submit forged mutations. The patch derives the comparison host from new URL(request.url).host instead of forwarded headers.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and running Framework Mode server actions where untrusted clients can influence forwarded host headers or request URL construction.

Background info

react-router is vulnerable to Cross-Site Request Forgery (CSRF) in versions 7.12.0 - 7.17.0.

How to fix this

Upgrade the react-router and/or the react-router-dom library to the patch version.