CWE-444Weakness · CWE-444

CVE-2025-31137

HIGH · 7.5 CVSS v3.0 Published 2025-04-01
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A URL spoofing vulnerability in the Express adapter of React Router (affecting Remix 2 and React Router 7) allows attackers to manipulate the apparent request URL by placing a URL pathname in the port section of Host or X-Forwarded-Host headers, potentially enabling path-based access control bypass.

MitigationUpgrade to Remix 2.16.3 or React Router 7.4.1 or later to apply the patch that properly sanitizes Host header parsing in the Express adapter.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify the React Router or Remix package in use
    Inspect your project's package.json dependencies to confirm whether react-router, react-router-dom, or @remix-run/* packages are installed
    Affected if Either react-router version 7.x or @remix-run/* packages version 2.x are present in dependencies
  2. Confirm Express adapter is being used
    Check your server configuration for the Express adapter - typically in server.js, server.ts, or similar Express server setup files that import from @remix-run/express or use express() as the server handler
    Affected if The application uses @remix-run/express adapter or configures React Router with an Express server backend
  3. Check installed version against vulnerable ranges
    Run 'npm list react-router' or 'npm list @remix-run/react' to retrieve the exact installed version, then compare to the fixed versions: React Router 7.4.1 and Remix 2.16.3
    Affected if Installed version is lower than 7.4.1 for React Router or lower than 2.16.3 for Remix 2
  4. Verify Express host header handling
    Review your Express server configuration to confirm that Host and X-Forwarded-Host headers are processed without sanitization - the vulnerability exists when these headers are used directly without stripping pathname components from the port field
    Affected if The Express server uses Host or X-Forwarded-Host headers directly for routing or path validation without validation that prevents pathname injection in the port section

You are affected if your application uses the Express adapter with React Router 7 versions before 7.4.1 or Remix 2 versions before 2.16.3, where Host header values can be manipulated to include pathname-like content in the port section.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade to Remix 2.16.3 or React Router 7.4.1 or later to apply the patch that properly sanitizes Host header parsing in the Express adapter.

Recommended fix High confidence

Remix 2.16.3 or React Router 7.4.1 (depending on which framework you use)

  1. 1. Identify if your project uses Remix 2 or React Router 7 with the Express adapter
  2. 2. For Remix 2 users: Run `npm install @remix-run/[email protected]` or `npm install [email protected]` to update to the patched version
  3. 3. For React Router 7 users: Run `npm install [email protected]` or update your React Router 7 package to version 7.4.1
  4. 4. After updating, restart your Express server to apply the changes
  5. 5. Verify the fix by testing that malformed Host headers with paths in the port section are properly rejected
Caveat Check the changelog for 2.16.3/7.4.1 for any breaking changes; minor/patch updates typically have minimal breaking change risk

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation1.0 h
  • Implementation1.0 h
  • Testing2.0 h
  • Review / QA1.0 h
5.0 hours of engineering $860
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,376.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-31137 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-31137 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data