Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
react2shell-poc-CVE-2025-55182 — Proof-of-concept exploit for CVE-2025-55182, a critical RCE vulnerability in Next.js Server Actions. Exploits insecure deserialization in the React Flight protocol to execute arbitrary commands via prototype pollution and sandbox bypass. | Kitploit
工具/GitHubGitHub/tamagorengs/react2shell-poc-cve-2025-55182
漏洞分析代码分析漏洞利用Web应用程序漏洞利用学习与教育Payload 开发
GitHubtamagorengs/react2shell-poc-cve-2025-55182

react2shell-poc-CVE-2025-55182

Proof-of-concept exploit for CVE-2025-55182, a critical RCE vulnerability in Next.js Server Actions. Exploits insecure deserialization in the React Flight protocol to execute arbitrary commands via prototype pollution and sandbox bypass.

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
8个月前尚未审核

React2Shell PoC (CVE-2025-55182)

一个针对 React2Shell (CVE-2025-55182) 的概念验证 (PoC) 脚本,这是一个影响使用 Server Actions 的 Next.js 应用的严重远程代码执行 (RCE) 漏洞。

[!WARNING] 免责声明:此工具仅用于教育和授权测试目的。我对任何滥用行为不承担责任。

描述

该脚本利用了 React Server Components "Flight" 协议中的一个不安全反序列化漏洞。它允许未经身份验证的攻击者在服务器上执行任意 JavaScript 代码,从而实现部分远程代码执行 (RCE)。

功能

  • 健壮的有效载荷:利用兼容性检查来查找 require(global.require 或通过模块构造函数),确保在较新的 Node.js 版本(v14+)上也能工作。
  • 动态配置:通过 CLI 参数指定目标 URL 和命令。
  • 错误处理:优雅地处理连接错误。

安装

  1. 克隆仓库。
  2. 安装依赖:
root@kitploit:~
pip install -r requirements.txt

使用方法

root@kitploit:~
python3 react2shell.py -u <TARGET_URL> [-c <COMMAND>]

示例

检查用户身份:

root@kitploit:~
python3 react2shell.py -u http://127.0.0.1:3000/

列出目录内容:

root@kitploit:~
python3 react2shell.py -u http://127.0.0.1:3000/ -c "ls -la"

读取敏感文件:

root@kitploit:~
python3 react2shell.py -u http://127.0.0.1:3000/ -c "cat /etc/passwd"

技术分析

该漏洞利用 Next.js Server Actions 处理 React Server Components (RSC) 时的一个原型污染 (Prototype Pollution) 和不安全反序列化 (Insecure Deserialization) 链。

  1. 入口点:Next-Action 头部信号告诉服务器处理一个 Server Action。
  2. 原型污染:JSON 有效载荷注入了一个恶意的 then 属性("$1:__proto__:then")。这会欺骗服务器的异步请求处理器,将有效载荷视为一个 "Thenable"(类 Promise 对象)。
  3. 代码注入:当服务器尝试解析这个虚假的 Promise 时,它会处理 _response 对象。_prefix 字段通常用于内部流缓冲,但通过操纵它,我们可以注入原始 JavaScript。
  4. 沙箱逃逸:在现代 Next.js/Webpack 环境中,require 函数通常从全局作用域中被移除以防止 RCE。该脚本通过遍历 process.mainModule 原型链来绕过此限制:
    root@kitploit:~
    var require = global.require || global.process.mainModule.constructor._load;
    
    这会检索内部模块加载器,允许我们导入 child_process 并执行系统命令。
  5. 执行与数据外泄:注入的代码同步运行(execSync),输出被作为一个 Error 对象抛出。该错误被序列化并通过 HTTP 响应体返回给客户端,从而使我们能够看到命令输出。

致谢

本工具由 Gemini 3 Pro 协助开发。

下载工具
参数描述默认值
-u, --url必需。目标 URL(例如 http://localhost:3000/)。无
-c, --cmd可选。要在服务器上执行的命令。id