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

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

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

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

工具目录

分类

查看所有分类
Loading categories
nextjs-security-scanner — 用于检测 Next.js 项目中 CVE-2025-55182 (React2Shell) 和凭据泄露的 Bash 脚本。零依赖。 | Kitploit
工具/GitHubGitHub/aliksir/nextjs-security-scanner
漏洞扫描器代码分析Web安全秘密检测威胁情报事件响应
GitHubaliksir/nextjs-security-scanner

nextjs-security-scanner

用于检测 Next.js 项目中 CVE-2025-55182 (React2Shell) 和凭据泄露的 Bash 脚本。零依赖。

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

日文版请参阅 README.ja.md。

nextjs-security-scanner

用于检测 Next.js 项目中 CVE-2025-55182 (React2Shell) 与凭据泄露的 Bash 脚本。零依赖。

CVE-2025-55182:React2Shell

CVSS:10.0(严重) | CWE-502:不可信数据反序列化 | SNORT SID:65554

通过 Next.js Server Components 中对不可信数据的反序列化实现未认证远程代码执行。攻击者向任意 Next.js Server Component 端点发送特制 HTTP 请求;服务器反序列化该载荷并执行任意代码。

受影响版本:

软件包受影响版本范围
Next.js15.0.0–15.0.4, 15.1.0–15.1.8, 15.2.0–15.2.5, 15.3.0–15.3.5, 15.4.0–15.4.7, 15.5.0–15.5.6, 15.6.0, 16.0.0–16.0.6
React19.0.0, 19.1.0, 19.1.1, 19.2.0

参考资料:

  • NVD:https://nvd.nist.gov/vuln/detail/CVE-2025-55182
  • Cisco Talos:在 https://blog.talosintelligence.com/ 搜索“React2Shell”

本扫描器检查内容

阶段 1 — Next.js 版本: 读取 package.json、package-lock.json 和 yarn.lock,查找解析后的 Next.js 版本,并与受影响版本范围进行比较。

阶段 2 — React 版本: 对 React(19.0.0、19.1.0、19.1.1、19.2.0)采用相同方法。

阶段 3 — App Router / Server Components: 检测 app/ 目录和 "use server" 指令。启用 Server Components 的易受攻击版本即为活跃攻击面。

阶段 4 — 凭据泄露: 扫描 .env* 文件(排除 .env.example 和 .env.sample)、next.config.* 及源文件,检查 API 密钥、数据库 URL、JWT 密钥及硬编码的密钥前缀(sk-、AKIA、ghp_、npm_)。

阶段 5 — SSH 密钥: 查找项目内已提交的私钥文件(id_rsa、*.pem、*.p12 等)和 .ssh/ 目录。

阶段 6 — 云配置: 检查 Docker Compose 文件中的硬编码密钥、Kubernetes 清单中的服务账户令牌泄露,以及 AWS SDK 使用中是否存在 IMDSv2 迹象。

阶段 7 — IOC 检查: 搜索 Cisco Talos 情报中的 C2 IP 地址以及可疑的 /tmp/ 点文件模式(Linux)。

root@kitploit:~
C2 IPs (Cisco Talos): 144.172.102.88 / 172.86.127.128 / 144.172.112.136 / 144.172.117.112

阶段 8 — 汇总: 统计 CRITICAL/WARNING/INFO 数量并提供修复步骤。

安装

无需安装。下载并运行:

root@kitploit:~
curl -O https://raw.githubusercontent.com/aliksir/nextjs-security-scanner/main/scan.sh
bash scan.sh [target-directory]

或克隆:

root@kitploit:~
git clone https://github.com/aliksir/nextjs-security-scanner.git
bash nextjs-security-scanner/scan.sh /path/to/your/nextjs-app

用法

root@kitploit:~
# Scan current directory
bash scan.sh

# Scan a specific project
bash scan.sh /path/to/nextjs-app

# In CI/CD (non-zero exit = fail the pipeline)
bash scan.sh . || exit 1

退出码:

  • 0 — 无问题
  • 1 — 警告(检测到凭据模式,需要审查)
  • 2 — 严重(已确认存在漏洞版本,需要立即处置)

输出示例

root@kitploit:~
=== Next.js Security Scanner ===
Target: /home/user/myapp
Date: 2026-04-04 12:00
CVE: CVE-2025-55182 (React2Shell, CVSS 10.0)

[Phase 1] Next.js version check
  [CRITICAL] Next.js v15.2.4 is vulnerable to CVE-2025-55182 (React2Shell)
             -> package.json: "next": "^15.2.4"
             -> This version allows unauthenticated RCE via deserialization of Server Components

[Phase 2] React version check
  [CRITICAL] React v19.1.0 is in the CVE-2025-55182 vulnerable list

[Phase 3] App Router / Server Components detection
  [INFO]     App Router detected (app/ directory exists)
  [CRITICAL] Vulnerable Next.js + Server Components = active attack surface for React2Shell

...

=== Scan Summary ===
  CRITICAL : 3
  WARNING  : 0
  INFO     : 2

CRITICAL issues found. Immediate action required.

=== Remediation (CVE-2025-55182) ===

1. Upgrade Next.js to a patched version:
   npm install next@latest
...

修复措施

立即升级:

root@kitploit:~
npm install next@latest
npm install react@latest react-dom@latest

请访问 https://github.com/vercel/next.js/releases,查看每个次要版本系列中首个已修复版本。

如果怀疑已被利用:

  1. 轮换所有密钥(API 密钥、数据库凭据、JWT 密钥、SSH 密钥、云 IAM)
  2. 检查利用后的痕迹:
    root@kitploit:~
    ps aux | grep -E '\.sh|\.py'
    crontab -l; cat /etc/cron*
    ss -tnp | grep -E '144\.172|172\.86'
    ls -la /tmp/ | grep '^\.'
    
  3. 在防火墙上阻止 C2 IP:144.172.102.88、172.86.127.128、144.172.112.136、144.172.117.112
  4. 启用 SNORT 规则 SID:65554

作为 Claude Code 技能使用

root@kitploit:~
bash scan.sh [target-directory]

触发关键词:“next.js security check”、“CVE-2025-55182”、“React2Shell”、“Next.js vulnerability scan”

有关技能包装器,请参阅 claude-code/SKILL.md。


免责声明

本工具仅用于防御性安全目的。它仅对你的项目文件执行本地、只读检查。不会建立任何网络连接,不会向外部发送任何数据,也不会执行任何利用代码。

漏洞信息和 IOC 数据基于公开来源(NVD、Cisco Talos)。本扫描器可能产生误报或遗漏某些攻击向量。它不能替代专业安全审计、渗透测试或厂商提供的安全补丁。

风险自负。 作者不对因使用本工具造成的损害承担任何责任。

许可证

MIT — 参见 LICENSE

下载工具