React Router has Path Traversal in File Session Storage
remix-run react-router
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @react-router/node npm |
|
|
| @remix-run/node npm |
|
|
| @remix-run/deno npm |
remix-run react-router
| Product | Affected | Fixed in |
|---|---|---|
| @react-router/node npm |
|
|
| @remix-run/node npm |
|
|
| @remix-run/deno npm |
< 2.17.2
|
React Router is a router for React. In @react-router/node versions 7.0.0 through 7.9.3, @remix-run/deno prior to version 2.17.2, and @remix-run/node prior to version 2.17.2, if createFileSessionStorage() is being used from @react-router/node (or @remix-run/node/@remix-run/deno in Remix v2) with an unsigned cookie, 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. This issue has been patched in @react-router/node version 7.9.4, @remix-run/deno version 2.17.2, and @remix-run/node version 2.17.2.
From the CVE record · GitHub_M
File session storage in the affected packages is vulnerable when createFileSessionStorage() uses an unsigned cookie. An attacker can cause session reads or writes outside the configured directory, subject to the web server process’s file permissions. File contents are not returned directly; reads succeed only for files in the expected session format, and session data is exposed only if application logic returns it.
Check applications using @react-router/node 7.0.0–7.9.3, @remix-run/node before 2.17.2, or @remix-run/deno before 2.17.2.