Unauthenticated Remote Command Execution in Next.js on Windows
A critical path traversal vulnerability (CVE-2026-75604) in the Next.js FileSystemCache on Windows allows unauthenticated attackers to steal Server Action encryption keys and execute arbitrary commands.
What's new
- 1. new product Aug 26, 14:02 via bsi
CVE-2026-75604 is a critical vulnerability affecting Next.js applications hosted on Windows environments. The flaw originates in the FileSystemCache component, which fails to correctly identify backslashes (\) as path separators on Windows systems. This improper validation enables path traversal attacks via the ..%5C sequence. An unauthenticated attacker can exploit this to access the sensitive server-reference-manifest.json file, which contains the encryptionKey used for Server Actions. Possession of this key allows an attacker to forge legitimate-looking, closure-based Server Action requests. When these forged requests are processed by the server, they lead to unauthenticated remote command execution (RCE) on the underlying host. The vulnerability specifically impacts configurations that utilize both the Pages Router and the App Router without Cache Components enabled.
Attack Chain
- Attacker identifies a Windows-hosted Next.js application using both Pages and App Routers.
- Attacker crafts a malicious HTTP request containing the
..%5Ctraversal sequence. - The request exploits the
FileSystemCachepath parsing flaw to bypass cache directory constraints. - The application improperly returns the contents of the
server-reference-manifest.jsonfile. - Attacker parses the response to extract the
encryptionKeyused for signing Server Actions. - Attacker signs a malicious Server Action payload using the stolen
encryptionKey. - Attacker submits the forged Server Action request to the target application.
- The Next.js application executes the attacker-supplied command within the server-side runtime, resulting in full system compromise.
Impact
Successful exploitation results in full unauthenticated remote command execution on the host server. Given the nature of Server Actions, attackers can gain code execution with the privileges of the service account running the Next.js application. This impacts any enterprise organization running Next.js versions between 13.4 and 15.5.23 or 16.0.0 and 16.3.2 on Windows platforms.
Recommendation
- Immediately patch all instances of Next.js to versions
15.5.24or16.3.3to remediate CVE-2026-75604. - Inspect web server logs for HTTP requests containing the
..%5Ctraversal string directed at cache-related endpoints. - Monitor for abnormal child processes spawned by the web application service account (e.g.,
cmd.exe,powershell.exe). - Review configuration files for any instances where Pages and App Routers coexist without explicit Cache Component definitions.
Immediate actions
Patch Next.js to 15.5.24 or 16.3.3
Mitigations
Block requests containing ..%5C at the WAF or ingress gateway
CVE-2026-75604
Detection coverage 1
Detect CVE-2026-75604 Exploitation Attempt - Path Traversal
criticalDetects exploitation attempts against Next.js utilizing path traversal sequences targeting the FileSystemCache to retrieve manifest files.
Detection queries are available on the platform. Get full rules →