Skip to main content
Mallory
CriticalPublic exploitVulnerability

CVE-2025-61686: Path Traversal in React Router and Remix File Session Storage

Published Jan 10, 2026 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.1Critical · v3.1
EPSS0.84%55th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Shopify
IdentifiersCVE-2025-61686CWE-22 · Improper Limitation of a Pathname…

CVE-2025-61686 is a path traversal vulnerability in createFileSessionStorage() affecting @react-router/node versions 7.0.0 through 7.9.3 and @remix-run/node and @remix-run/deno versions before 2.17.2. When file session storage uses an unsigned cookie, an attacker can manipulate the session identifier to cause session operations to read or write outside the configured session directory. Access is constrained by the web-server process's filesystem permissions. Reads succeed only when the target file matches the expected session-file format, and the resulting data enters the server-side session rather than being returned directly to the attacker.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can compromise filesystem integrity through unauthorized writes outside the session directory and potentially compromise confidentiality through unauthorized reads. Both are limited by the web-server process's filesystem permissions. Disclosure additionally requires a target file in the expected session-file format and application logic that exposes the loaded session information; the vulnerability does not directly return arbitrary file contents.

Mitigation

If you can’t patch tonight, do this now.

Configure createFileSessionStorage() to use signed cookies to prevent manipulation of session identifiers. Apply least-privilege filesystem permissions to the web-server process and restrict its access to files outside the configured session directory.

Remediation

Patch, then assume compromise.

Upgrade @react-router/node to version 7.9.4 or later. For Remix v2, upgrade @remix-run/node and @remix-run/deno, as applicable, to version 2.17.2 or later.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.

View more in app →
CVE-2025-61686_dockerRepository is a minimal Docker-based reproduction lab/PoC for CVE-2025-61686 affecting @react-router/node file session storage (notably version 7.9.3). Structure: (1) docker-compose.yml builds and exposes a single Node service, mapping host 3001->container 3000 and bind-mounting ./vulnerable/sessions to /app/sessions. (2) vulnerable/Dockerfile builds a Node 20 image, installs dependencies, and runs server.js. (3) vulnerable/server.js starts an HTTP server and uses createFileSessionStorage({dir:'./sessions', cookie:{name:'session', secrets:[]}}). The empty secrets array makes the session cookie unsigned for demonstration, enabling an attacker to supply an arbitrary session id. The underlying vulnerable logic (described in README) splits the session id into a subdirectory (first 4 chars) and filename (rest) via path.join(dir, id.slice(0,4), id.slice(4)); if the remainder contains '../' sequences, path.join resolves a path outside the intended sessions directory, enabling directory traversal in session file operations. README provides a working example: base64url-encode a JSON string like "AAAA../../../tmp/flower", place it in the Cookie: session=..., request http://localhost:3001/, and observe a file created/accessible under /tmp/flower in the container. This repo is a PoC/lab (no weaponized payload beyond demonstrating traversal).FlowerWitch · Disclosed Jan 15, 2026 · markdown · yaml · networkPoCReact-Router-CVE-2025-61686-Repository is a CVE demo/PoC for CVE-2025-61686 affecting @react-router/node file-based session storage when cookies are unsigned (no `secrets`). Structure: top-level README.md provides a detailed vulnerability write-up (cookie decoding, getFile() path join behavior, and impacts: read/write/delete). The `vulnerable-app/` directory contains a runnable Dockerized Express server (`server.js`) intentionally configured with `createFileSessionStorage({dir:'/tmp/sessions', cookie:{name:'__session'}})` without secrets, plus a Node PoC client (`exploit.js`) that crafts base64(JSON.stringify(sessionId)) cookies and sends GET requests to `/profile` to confirm the server accepts attacker-controlled session IDs and to illustrate path resolution escaping `/tmp/sessions`. Dockerfile/docker-compose/quick-start.sh provide an easy lab environment; the server also creates demo sensitive files `/tmp/secret.txt` and `/tmp/config.json` to show potential traversal targets. The PoC primarily verifies the condition (server accepts malicious session IDs) and demonstrates path traversal feasibility; it does not implement a full arbitrary file read exfiltration beyond the server’s reflected sessionId behavior.Kai-One001 · Disclosed Jan 16, 2026 · javascript · bash · networkPoCCVE-2025-61686-PoCRepository purpose: a PoC for CVE-2025-61686 demonstrating an arbitrary file read/path traversal condition in @react-router/node's createFileSessionStorage when the session cookie value can be attacker-controlled. Structure and key files: - server.js: Minimal Express server on port 3005 that initializes createFileSessionStorage with dir=./sessions and cookie name 'session'. On GET / it calls storage.getSession(cookieHeader) and returns session.id and session.data. On error it returns HTTP 500 with {error: error.message}, which can leak parsing details. - exploit.js: Sends a single HTTP request to localhost:3005/ with a crafted Cookie header. The cookie value is base64(JSON.stringify(traversalId)) where traversalId is '../../../../../../etc/passwd'. Comments explain a path-joining quirk (splitting '..' via slicing) that reduces effective traversal depth. - exploit-2.js: Similar request, but expects the server to attempt JSON.parse on the loaded file content; it then parses the returned JSON error message and uses regexes to extract the embedded file content from the "Invalid JSON" / "Unexpected token" error text. - secret_session / secret_session.json: Sample artifacts containing a mock secret flag, likely to illustrate what a session file might look like. - package.json / package-lock.json: Node project dependencies (notably @react-router/node 7.0.0, express 5.2.1). Exploit capability details: - Primary capability is arbitrary file read via path traversal by embedding traversal sequences in the session identifier carried in the 'session' cookie. - exploit.js is closer to a confirmation PoC (may only yield a 500 and error due to JSON.parse failing on non-JSON files). - exploit-2.js attempts to turn the JSON.parse failure into an information disclosure by extracting file bytes echoed inside the error message, effectively upgrading confirmation into content exfiltration when the runtime includes offending input in parse errors. No evidence of RCE, persistence, or lateral movement is present; the code is narrowly focused on file read/verification against a local test server.boroeurnprach · Disclosed Jan 21, 2026 · javascript · json · network (HTTP request with crafted Cookie header to trigger path traversal in file session storage)PoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
ShopifyReact-Router/Nodeapplication
ShopifyRemix-Run/Denoapplication
ShopifyRemix-Run/Nodeapplication
FAQ

Frequently asked questions

Is CVE-2025-61686 exploited in the wild?
As of Oct 22, 2026, Mallory has no reports of CVE-2025-61686 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2025-61686?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2025-61686, the earliest disclosed Jan 15, 2026.
Is there a patch for CVE-2025-61686?
Upgrade @react-router/node to version 7.9.4 or later. For Remix v2, upgrade @remix-run/node and @remix-run/deno, as applicable, to version 2.17.2 or later.
What products are affected by CVE-2025-61686?
Shopify React-Router/Node, Shopify Remix-Run/Deno, and Shopify Remix-Run/Node.
How severe is CVE-2025-61686?
CVE-2025-61686 has a CVSS v3.1 score of 9.1 (Critical) and an EPSS score of 0.84% (55th percentile) as of Oct 22, 2026.
Activity feed

Recent activity

21 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity17Community discussion across Reddit, Mastodon, and other social sources.