CVE-2025-31137
JSON

7.5high

Remix and React Router allow URL manipulation via Host / X-Forwarded-Host headers

Severity
7.5high CVSS:3.0 by GitHub_M
Exploit likelihood
1.20% (higher than 69% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4q56-crqp-v477

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

Product or packageVersionsReported by
remix-run react-router>= 7.0.0, < 7.4.1, >= 2.11.1, < 2.16.3CVE List
@react-router/express (npm)from 7.0.0 before 7.4.1GitHub Advisory Database
@remix-run/express (npm)from 2.11.1 before 2.16.3GitHub Advisory Database

All scores

GitHub_M7.5high CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-444

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

We received a report about 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.

Patches

This issue has been patched and released in Remix 2.16.3 React Router 7.4.1.

Credits
  • Rachid Allam (zhero;)
  • Yasser Allam (inzo_)
NVD (es)

React Router es un enrutador multiestrategia para React que conecta React 18 con React 19. Existe una vulnerabilidad en Remix/React Router que afecta a todos los consumidores de Remix 2 y React Router 7 que usan el adaptador Express. Esta vulnerabilidad permite falsificar la URL utilizada en una solicitud entrante al incluir una ruta de URL en la sección de puerto de una URL que forma parte de un encabezado Host o X-Forwarded-Host enviado a un controlador de solicitudes de Remix/React Router. Este problema se ha corregido y publicado en Remix 2.16.3 y React Router 7.4.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-31137 changed 2025-04-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-4q56-crqp-v477 changed 2025-04-01CC-BY-4.0
NVDCVE-2025-31137 changed 2026-06-17Public domain