A critical security flaw has been discovered in React Router and Remix frameworks that could enable attackers to access or modify sensitive files on web servers, potentially compromising entire applications and their underlying infrastructure.
The vulnerability, identified as CVE-2025-61686, carries a Critical severity rating with a CVSS score of 8.8/10, signaling significant risk to affected systems.
Security researchers warn that the flaw stems from improper handling of unsigned cookies in the createFileSessionStorage() function, creating a dangerous attack vector for malicious actors.
CVE Details
| Field | Details |
|---|---|
| CVE ID | CVE-2025-61686 |
| Severity | Critical |
| CVSS Score | 8.8/10 |
| Vulnerability Type | Directory Traversal / Path Injection |
| Attack Vector | Network-based |
| Privileges Required | None |
| User Interaction | None |
The core issue lies in how these frameworks handle session cookies. When developers implement unsigned cookies for user session management, attackers can craft malicious session cookies containing directory traversal sequences such as ../ to read and write files outside the intended session directory.
This path injection vulnerability bypasses normal access controls and enables unauthorized file-system operations.
The security advisory published on GitHub reveals that affected packages include @react-router/node versions 7.0.0 to 7.9.3, @remix-run/node versions up to 2.17.1, and @remix-run/deno versions up to 2.17.1.
The widespread adoption of these packages across modern web applications amplifies the potential impact of this vulnerability.
Attackers exploiting this weakness could potentially access sensitive server files, including configuration files, source code, or other critical system data. However, the exploitation method carries specific limitations.
Rather than directly reading arbitrary files, attackers must craft session cookies that reference files matching the expected session file format.
When a matching file is found, its data is loaded into the server-side session and may be exposed through standard application logic.
The write capability presents equally concerning risks. Attackers can inject malicious data into files outside the intended directory, potentially enabling code execution or complete system compromise if critical configuration or executable files are overwritten.
The success of such attacks depends heavily on the file system permissions granted to the web server process.
Immediate action is required for developers using the affected packages. The maintainers have released patched versions that address this vulnerability: @react-router/node version 7.9.4 or higher, @remix-run/node version 2.17.2 or higher, and @remix-run/deno version 2.17.2 or higher.
Security experts emphasize that implementing signed cookies represents the most effective mitigation strategy.
Signed cookies cryptographically verify session integrity and prevent attackers from modifying cookie contents, effectively neutralizing this attack vector even on unpatched systems.
Organizations should prioritize upgrading to patched versions immediately and simultaneously auditing their applications for potential exploitation.
The critical nature of this vulnerability, combined with its network-based attack vector that requires no user interaction, makes it a prime target for automated exploitation campaigns against vulnerable web applications.
Follow us on Google News , LinkedIn and X to Get More Instant Updates. Set Cyberpress as a Preferred Source in Google.