CVE-2025-31137: Remix and React Router allow URL manipulation via Host / X-Forwarded-Host headers

Published Apr 1, 2025
·
Updated

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)

Other sources

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.

MITRE

Affected Software

4 affected componentsFixes available
Remix Remix
React Router React Router
npm/@remix-run/express>=2.11.1<2.16.3
2.16.3
npm/@react-router/express>=7.0.0<7.4.1
7.4.1

Event History

Apr 1, 2025
CVE Published
via MITRE·06:20 PM
Data Sourced
via MITRE·06:20 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·10:23 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-31137?

CVE-2025-31137 is classified as a moderate severity vulnerability.

2

How do I fix CVE-2025-31137?

To fix CVE-2025-31137, update to the latest version of Remix or React Router that addresses this vulnerability.

3

What impact does CVE-2025-31137 have on affected applications?

CVE-2025-31137 allows attackers to spoof URLs, potentially leading to phishing or other forms of attack on users.

4

Which versions of Remix and React Router are affected by CVE-2025-31137?

CVE-2025-31137 affects all versions of Remix 2 and React Router 7 that use the Express adapter.

5

Are there any workarounds for CVE-2025-31137?

Implementing strict validation and sanitization of URLs could serve as a workaround, but updating is the recommended action.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203