CVE-2025-61686: @react router/node Path Traversal Vulnerability

CRITICAL
Advisory Identifier: GHSA-9583-h5hc-x8cw
CVSS 9.1
CWE-22
Published
Advisory Summary

CVE-2025-61686 is a CRITICAL (CVSS 9.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting @react router/node libraries in the npm ecosystem. The issue involves react router has path traversal in file session storage. Remediation is available by upgrading affected packages to version 7.9.4, 2.17.2.

CVE-2025-61686 at a Glance

CVE Identifier CVE-2025-61686
GHSA Identifier GHSA-9583-h5hc-x8cw
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product @react router/node
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-61686

To remediate this vulnerability, upgrade all affected @react router/node dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@react-router/node fixed: 7.9.4
npm install @react-router/node@7.9.4
@remix-run/node fixed: 2.17.2
npm install @remix-run/node@2.17.2
@remix-run/deno fixed: 2.17.2
npm install @remix-run/deno@2.17.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @react-router/node

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-61686, inspect your project dependencies using npm:

npm ls @react-router/node

Analyze the terminal output to locate any version of @react router/node in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.9.4), your application is affected.

Note: The npm ls @react-router/node command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In @react router/node, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

If applications use `createFileSessionStorage()` from `@react-router/node` (or `@remix-run/node`/`@remix-run/deno` in Remix v2) with an [**unsigned cookie**](https://reactrouter.com/explanation/sessions-and-cookies#signing-cookies), it is possible for an attacker to cause the session to try to read/write from a location outside the specified session file directory. The success of the attack would depend on the permissions of the web server process to access those files. Read files cannot be returned directly to the attacker. Session file reads would only succeed if the file matched the expected session file format. If the file matched the session file format, the data would be populated into the server side session but not directly returned to the attacker unless the application logic returned specific session information.

CVE-2025-61686 Affected @react router/node Versions

3 component(s)
Fixed Versions:
7.9.42.17.2
Product / Package Ecosystem Affected Versions Fixed Version
@react-router/node
npm
≥ 7.0.0
< 7.9.4
7.9.4
@remix-run/node
npm
< 2.17.2
2.17.2
@remix-run/deno
npm
< 2.17.2
2.17.2

References

Frequently Asked Questions

What is CVE-2025-61686?
CVE-2025-61686 is a security vulnerability in @react router/node involving React Router has Path Traversal in File Session Storage under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which @react router/node versions are affected?
Affected versions include releases prior to 7.9.4, 2.17.2 across affected packages: @react-router/node, @remix-run/node, @remix-run/deno.
What version fixes CVE-2025-61686?
Upgrading to 7.9.4, 2.17.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @react-router/node affected?
Yes, @react-router/node is affected in releases prior to 7.9.4. Upgrade your dependency to 7.9.4 or later.
Is @remix-run/node affected?
Yes, @remix-run/node is affected in releases prior to 2.17.2. Upgrade your dependency to 2.17.2 or later.
What is the CVSS score of CVE-2025-61686?
CVE-2025-61686 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2025-61686?
CVE-2025-61686 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2025-61686?
Run the dependency tree command: 'npm ls @react-router/node'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9583-h5hc-x8cw",
  "modified" : "2026-09-18T21:03:27Z",
  "published" : "2026-01-08T20:45:07Z",
  "aliases" : [ "CVE-2025-61686" ],
  "summary" : "React Router has Path Traversal in File Session Storage",
  "details" : "If applications use `createFileSessionStorage()` from `@react-router/node` (or `@remix-run/node`/`@remix-run/deno` in Remix v2) with an [**unsigned cookie**](https://reactrouter.com/explanation/sessions-and-cookies#signing-cookies), it is possible for an attacker to cause the session to try to read/write from a location outside the specified session file directory. The success of the attack would depend on the permissions of the web server process to access those files. \n\nRead files cannot be returned directly to the attacker.  Session file reads would only succeed if the file matched the expected session file format. If the file matched the session file format, the data would be populated into the server side session but not directly returned to the attacker unless the application logic returned specific session information.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@react-router/node"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.9.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.9.3"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@remix-run/node"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.17.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.17.1"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@remix-run/deno"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.17.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.17.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/security/advisories/GHSA-9583-h5hc-x8cw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-61686"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2025-61686"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2428423"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/remix-run/react-router"
  }, {
    "type" : "WEB",
    "url" : "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-61686.json"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-08T20:45:07Z",
    "nvd_published_at" : "2026-01-10T03:15:48Z"
  }
}