Intel

AIKIDO-2025-10193

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

Cross-Site Request Forgery (CSRF)CVE-2025-31137 Published Mar 31, 2025

77

High Risk

This Affects:

JS@react-router/express
7.0.0 - 7.4.0
Fixed in 7.4.1
Are you affected? Scan for Free

TL;DR

Affected versions of this package are affected by a design flaw where it constructs a Request object using the incoming request's properties (method, headers, body) and builds a new URL from req.protocol and req.hostname (derived from untrusted headers like X-Forwarded-Host or Host). This request is forwarded to the tainted URL without proper validation, allowing forgery attacks like crafting a malicious site that sends forged state-changing requests, such as POST, using the victim's session cookies.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

@react-router/express is vulnerable to Cross-Site Request Forgery (CSRF) in versions 7.0.0 - 7.4.0.

How to fix this

Upgrade the @react-router/express library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform