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

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

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

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

工具目录

分类

查看所有分类
Loading categories
React2Shell-Vulnerability-Verification-Script — 独立 Python 脚本,用于验证项目是否受 CVE-2025-55182(React2Shell)影响。检查 package.json 依赖项,并对 React Server Component 模式执行可选的深度代码库扫描。 | Kitploit
工具/GitHubGitHub/degenwithheart/react2shell-vulnerability-verification-script
静态分析漏洞扫描器漏洞分析代码分析Web安全学习与教育
GitHubdegenwithheart/react2shell-vulnerability-verification-script

React2Shell-Vulnerability-Verification-Script

独立 Python 脚本,用于验证项目是否受 CVE-2025-55182(React2Shell)影响。检查 package.json 依赖项,并对 React Server Component 模式执行可选的深度代码库扫描。

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

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

React2Shell 漏洞验证脚本 (verify_react_vulnerability.py)

这个脚本是什么?

这是一个简单、独立的 Python 脚本,旨在帮助你快速判断你的项目是否受到严重的 React2Shell 漏洞(也称为 CVE-2025-55182)的影响。

它执行两级检查:

  1. 依赖项检查:检查你的 package.json 文件中是否存在已知存在漏洞的 React 和 Next.js 版本。
  2. 全面代码库扫描(可选):如果依赖项检查通过,它会提议对源代码进行深度扫描。该扫描会寻找一系列线索,判断你的项目是否使用了存在漏洞的 React Server Components 功能集。

这个脚本有什么作用?

  1. 查找 package.json:在脚本运行的目录中查找 package.json 文件。
  2. 读取依赖项:获取项目中列出的 react 和 next 的确切版本。
  3. 比较版本:将你安装的版本与内置的已知存在漏洞的版本列表进行比对。
  4. 提供修复方案:如果发现存在漏洞的依赖项,脚本会提供确切的 npm install 命令,用于更新到安全版本。
  5. 提供全面深度扫描:如果依赖项看起来安全,它会请求许可对代码进行更深入的分析。该扫描会查找多种模式,包括:
    • "use server"
    • "use client"
    • createSafeActionClient
    • registerServerReference
    • react-server-dom-webpack
  6. 报告详细发现:如果深度扫描发现任何模式,它会提供详细报告,解释每种模式的含义,并列出发现这些模式的文件。

如何使用

先决条件

  1. Python 3:你需要安装 Python 3。你可以通过运行 python3 --version 来检查。
  2. Packaging 库:脚本使用一个常见的 Python 库来比较软件版本。如果没有安装,请使用 pip 安装:
    root@kitploit:~
    pip install packaging
    

运行脚本

  1. 确保 verify_react_vulnerability.py 脚本位于项目的根目录(即与 package.json 相同的目录)。

  2. 打开终端并运行命令:

    root@kitploit:~
    python3 verify_react_vulnerability.py
    

理解输出结果

场景 1:发现存在漏洞的依赖项

如果发现存在漏洞的库版本,脚本会立即停止并报告该问题:

root@kitploit:~
--- Step 1: Checking versions in package.json ---
❌ VULNERABLE: Found React version 19.0.1.
...
-------------------------------------------------

❌ SUMMARY: Your project is VULNERABLE based on dependency versions.
   Please update the following dependencies immediately.

--- Recommended Fixes ---
npm install [email protected] [email protected]
...
-------------------------------------------------

场景 2:未发现存在漏洞的依赖项(执行全面代码扫描)

如果依赖项安全,脚本会提议进行深度扫描。

root@kitploit:~
--- Step 1: Checking versions in package.json ---
✅ OK: Found React version 18.3.1. Not in a known vulnerable range.
...
-------------------------------------------------

✅ INFO: Your project's dependencies do not seem to be affected by React2Shell.
   However, vulnerable features might be in use if code was copy-pasted or 'vendored'.
   Do you want to perform a comprehensive deep code scan? (y/n): y

如果深度扫描发现相关迹象,它将提供一份详细报告:

root@kitploit:~
--- Step 2: Performing Comprehensive Deep Code Scan ---
Searching for patterns related to React Server Components...

⚠️ WARNING: Deep scan found indicators of React Server Component usage.
   This does not guarantee a vulnerability, but warrants a manual review.
   Ensure your framework versions are fully patched.

   - Found pattern '"use server"':
     Reason: Indicates a file contains React Server Actions, the primary feature associated with the vulnerability.
     In files: ['src/actions/auth.ts']

   - Found pattern '"use client"':
     Reason: Indicates a Client Component, which may import and use Server Actions from other files.
     In files: ['src/components/LoginButton.tsx', 'src/components/ThemeSwitcher.tsx']
-------------------------------------------------

如果深度扫描未发现任何内容,它将确认你的项目可能是安全的:

root@kitploit:~
--- Step 2: Performing Comprehensive Deep Code Scan ---
Searching for patterns related to React Server Components...

✅ OK: The comprehensive deep scan did not find any indicators of RSC usage.
-------------------------------------------------
下载工具