Vulnerability · Published Apr 1, 2025 · Assigned by GitHub_M
CVE-2025-31137Remix and React Router allow URL manipulation via Host / X-Forwarded-Host headers
High 7.5
In plain English
A high-severity security flaw in react-router from remix-run. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.2% (higher than 68% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
React Router is a multi-strategy router for React bridging the gap from React 18 to React 19. There is a vulnerability in Remix/React Router that affects all Remix 2 and React Router 7 consumers using the Express adapter. Basically, this vulnerability allows anyone to spoof the URL used in an incoming Request by putting a URL pathname in the port section of a URL that is part of a Host or X-Forwarded-Host header sent to a Remix/React Router request handler. This issue has been patched and released in Remix 2.16.3 and React Router 7.4.1.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | @react-router/express | 7.4.1 | GHSA-4q56-crqp-v477 |
| npm | @remix-run/express | 2.16.3 | GHSA-4q56-crqp-v477 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| remix-run | react-router | >= 7.0.0, < 7.4.1>= 2.11.1, < 2.16.3 |
Weakness: CWE-444 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H