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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-55182 — Advanced security research on CVE-2025-55182 (React2Shell). Features an exploitation framework with 6 functional impact scenarios (RCE to Secret Exfiltration), an interactive reverse shell, and a complete laboratory. Portfolio piece demonstrating deep analysis of Prototype Pollution and Insecure Deserialization in React Server Components | Kitploit
工具/GitHubGitHub/devianntsec/cve-2025-55182
Exploit FrameworksVulnerability AnalysisExploitationWeb Application ExploitationPost-ExploitationPenetration TestingPapers & ResearchLearning & EducationRemote Access Tool

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →

关于

Advanced security research on CVE-2025-55182 (React2Shell). Features an exploitation framework with 6 functional impact scenarios (RCE to Secret Exfiltration), an interactive reverse shell, and a complete laboratory. Portfolio piece demonstrating deep analysis of Prototype Pollution and Insecure Deserialization in React Server Components

分享
Payload Development
Labs & Practice
GitHubdevianntsec/cve-2025-55182

CVE-2025-55182

查看仓库
13个月前尚未审核

CVE-2025-55182 — React2Shell: 高级利用与硕士论文研究

Platform Language License: MIT Research CVSS

不可信数据反序列化 + React Server Components 中的原型污染
通过 Next.js Server Actions 实现未经认证的远程代码执行
受影响版本: React 19.0.0 - 19.2.0 · 补丁: React 19.0.1 / 19.1.2 / 19.2.1 (2025年12月3日)


高级利用演示 - RCE基本命令、交互式Shell以及针对易受攻击的Next.js应用的多种攻击向量

描述

该仓库包含我关于 CVE-2025-55182 的 硕士论文研究,这是 React Server Components 中的一个严重(CVSS v3.1: 10.0)远程代码执行漏洞。

该漏洞源于 React Flight 协议中的不安全反序列化机制。在处理 Server Actions 时,Next.js 会反序列化传入的多部分负载而未经适当验证。攻击者可以构造恶意负载,污染原型链并注入任意 JavaScript,这些代码通过 Function 构造函数(继而通过 child_process.execSync())在服务器上执行。

关于 CVE-2025-66478 的说明: Vercel 发布了一个并行的 CVE 来追踪同一漏洞在 Next.js 中的特定影响。由于 Next.js 以捆绑(vendored)方式引入 React,许多依赖扫描器不会自动检测到该漏洞。美国国家漏洞数据库(NVD)正式驳回了 CVE-2025-66478,认为其是 CVE-2025-55182 的重复,尽管它仍然在 Vercel 自身的安全公告中被引用。

后续漏洞: React团队随后披露了两个在初始补丁版本(19.0.1, 19.1.2, 19.2.1)中存在的附加问题:CVE-2025-55184(拒绝服务,CVSS 7.5)和 CVE-2025-55183(源代码泄露,CVSS 5.3)。用户应升级到 19.0.2, 19.1.3 或 19.2.2 以解决所有三个问题。

我的贡献


仓库结构

root@kitploit:~
CVE-2025-55182/
├── README.md                        # This file
├── LICENSE                          # MIT License
│
├── exploit/
│   ├── exploit-explanation.md       # Exploit usage documentation
│   └── react2shell.py               # Main exploit — 4 attack modules + interactive shell
│
├── vulnerable-app/                  # Vulnerable Next.js application
│   ├── README.md                    # Original vulnapp credits
│   ├── package.json                 # React 19.0.0 (vulnerable)
│   ├── app/                         # Application source code
│   ├── curl_id.sh                   # Original exploit script (by zack0x01)
│   └── scripts/
│       └── restore.sh               # Restoration script (my contribution)
│
└── docs/
    ├── screenshots/                 # Exploitation demonstrations
    │   ├── 01-app-initial.png
    │   ├── 02-rce-basic.png
    │   ├── 03-interactive-shell.png
    │   ├── 04-no-payload.png
    │   ├── 05-delete-result.png
    │   ├── 06-deface.png
    │   ├── 07-shutdown-servers.png
    │   ├── 08-restore-from-script.png
    │   └── 09-restore-from-interactive-shell.png
    │
    └── analysis/
        ├── 01-root-cause.md         # Vulnerability root cause analysis
        ├── 02-payload-breakdown.md  # Payload structure and execution flow
        └── 03-timeline.md           # CVE timeline

快速开始

前提条件

  • Node.js 18+ 和 npm
  • Python 3.9+
  • 易受攻击的 Next.js 应用(位于 vulnerable-app/)
  • 推荐使用隔离的虚拟机进行测试

第一步 — 启动易受攻击的应用

root@kitploit:~
cd vulnerable-app
npm install --legacy-peer-deps
npm run dev
# App available at http://localhost:3000

第二步 — 运行利用程序

root@kitploit:~
cd ../exploit

# Check if target is vulnerable
python3 react2shell.py -u http://localhost:3000 --check

# Execute single command
python3 react2shell.py -u http://localhost:3000 -c "whoami"

# Interactive shell mode
python3 react2shell.py -u http://localhost:3000 -i

攻击模块


技术概述

漏洞根本原因

React Server Components 使用自定义的序列化/反序列化机制("Flight" 协议)将组件数据从服务器发送到客户端。在处理服务端操作(Server Actions)时,服务器会在没有适当验证的情况下反序列化传入的负载。

核心缺陷是行为信任:反序列化器检查 typeof obj.then === 'function' 以识别 Promise,但没有验证该属性是否直接属于该对象。这使得攻击者可以污染 Object.prototype.then,使每个普通对象看起来都像是一个 thenable 对象。

攻击者可以构造一个恶意负载,实现:

  1. 污染原型链 — 使用 __proto__:then
  2. 将解析重定向到 Function 构造函数 — 通过 $1:constructor:constructor
  3. 执行任意 JavaScript — 通过 new Function(_prefix)
  4. 运行系统命令 — 通过 process.mainModule.require('child_process').execSync()
  5. 通过 HTTP 响应头 X-Action-Redirect 外渗输出
root@kitploit:~
用户模式(未经认证)
  │
  ├─ POST / (Next.js Server Action 端点)
  │    ├─ 头: Next-Action: x
  │    └─ 包含恶意JSON的多部分正文
  │
  └─ React Flight 反序列器处理负载
       └─ 通过 __proto__:then 进行原型污染
            └─ 通过 $1:constructor:constructor 到达 Function 构造函数
                 └─ new Function(_prefix) 执行攻击者的JavaScript
                      └─ execSync() 运行系统命令
                           └─ 输出嵌入到 NEXT_REDIRECT 错误中
                                └─ Next.js 转换为 X-Action-Redirect 头

范围澄清

该漏洞影响任何使用 App Router 和 React Server Components 的 Next.js 应用 — 这是 Next.js 14 以后的默认配置。不需要显式定义 Server Actions;存在受影响的 RSC 包就足够了。

为什么它重要

该漏洞允许未经认证的攻击者:

  • 在服务器上执行任意命令
  • 窃取环境变量和凭据
  • 修改或删除应用数据
  • 将服务器用作进一步攻击的跳板

攻击链

root@kitploit:~
1. [任意]   向任意 Server Action 端点发送精心构造的多部分 POST 请求
2. [服务器] React 反序列器处理恶意 JSON
3. [服务器] 原型污染污染 Object.prototype.then
4. [服务器] 普通对象被视为 thenable;到达 Function 构造函数
5. [服务器] new Function(_prefix) 执行攻击者的任意 JavaScript
6. [服务器] execSync() 运行系统命令;捕获输出
7. [服务器] 输出嵌入到 NEXT_REDIRECT 错误摘要中
8. [服务器] Next.js 返回带有 URL 编码输出的 X-Action-Redirect 头
9. [攻击者] 从头中提取并 URL 解码命令结果

实证测试

所有测试均在隔离的 VirtualBox 虚拟机上进行,运行 Kali Linux 2026.1,并安装 Next.js 15.0.0 和 React 19.0.0,未暴露网络。

确定性: 与概率性利用(如堆喷)不同,CVE-2025-55182 完全确定——任何格式正确的 HTTP POST 请求在运行 React 19.0.0–19.2.0 并启用 React Server Components 的未修补系统上,都会以概率 1 产生 RCE。


技术文档

文档描述
根本原因分析React Flight 中的反序列化缺陷和原型污染
负载分解恶意 JSON 结构的逐行分析

学术背景

本项研究是我 网络安全硕士论文 (UCAM — Campus Internacional de Ciberseguridad) 的一部分,旨在分析跨多种环境的 N 日漏洞。

该 CVE 代表了论文中的 现代 JavaScript 框架 向量,展示了:

  • React Server Components 中的反序列化漏洞
  • 原型污染作为 RCE 原语
  • 利用 Next.js Server Actions
  • Node.js 环境中的后利用技术
  • 安全的实验室恢复方法

关键词: RCE · Prototype Pollution · Deserialization · React · Next.js · Server Actions · CVE-2025-55182


作者

Annais Molina (devianntsec) — 安全研究员 | 网络安全硕士 (UCAM)

GitHub LinkedIn Blog Email


致谢

  • @zack0x01 — 原始易受攻击应用
  • Lachlan Davidson (Carapace) — 原始漏洞发现和负责任披露
  • AssetNote — react2shell-scanner 检测工具
  • Moritz Sanft — 第一个可公开使用的 PoC(披露后约30小时)
  • maple3142 — 原报告者的公开 PoC(2025年12月5日)

许可证

MIT 许可证 — 参见 LICENSE


法律免责声明

本仓库仅供教育和安全研究目的使用,作为学术硕士论文的一部分。所有测试均在隔离的虚拟机上执行,未暴露网络。仅在你拥有或已获明确书面授权测试的系统上使用。未经授权对系统进行测试是违法的,并可能导致刑事起诉。

© 2026 Annais Molina · 网络安全硕士论文
UCAM Universidad Católica San Antonio de Murcia · Campus Internacional de Ciberseguridad
下载工具
方面描述
四个攻击模块删除项目、篡改网站、窃取环境变量、关闭服务器
交互式Shell带有特殊命令和恢复能力的持久Shell
稳定外渗逐行读取以绕过HTTP头大小限制
恢复脚本攻击后的安全实验室恢复
学术文档根本原因、负载分解和漏洞时间线
模块命令描述影响
删除项目--delete-projects从仪表板删除所有项目数据破坏
篡改--deface "message"替换主页面篡改
窃取环境--steal-env窃取环境变量外渗
关闭服务器--shutdown-servers关闭所有服务器拒绝服务
攻击模块结果备注
命令执行✅ RCE 确认whoami、id、uname -a 可靠工作
删除项目✅ 仪表板已修改项目被移除,React 结构保持完整
篡改✅ 网站被篡改显示自定义消息
窃取环境✅ 环境变量被提取保存到 stolen_env.txt
关闭服务器✅ 所有服务器显示为已停止UI 更新,React 功能正常
交互式Shell✅ 持久Shell可以使用特殊命令
恢复✅ 恢复至原始状态通过 restore.sh 脚本
CVE 时间线
发现、披露和补丁时间线