Sploitus

Exploit for fix-react2shell-next

kitploit · 2026-09-04

Exploit Code

MARKDOWN132 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-VERCEL-LABS-FIX-REACT2SHELL-NEXT
# fix-react2shell-next

![fix-react2shell-next](https://assets.kitploit.com/production/public/readmes/33960/c95613f2780a7b1b85ad95d16dd6f4715bd03c0f1a425dc11c23c82bcbb9457f.gif)

一条命令修复 Next.js / React RSC 应用中的 **CVE-2025-66478** (React 2 Shell RCE)漏洞。

root@kitploit:~
    
    
    npx fix-react2shell-next
    

按照官方公告进行确定性的版本升级。

## 功能简介

  1. **递归扫描** 所有 `package.json` 文件(支持 monorepo)
  2. **检查** 以下包是否存在易受攻击的版本: 
     * `next`
     * `react-server-dom-webpack`
     * `react-server-dom-parcel`
     * `react-server-dom-turbopack`
  3. **根据当前版本修补** 到正确的修复版本
  4. **使用检测到的包管理器刷新** lockfile



## 受影响版本

### Next.js

### React RSC 包

当前版本| 修复版本  
---|---  
19.0.0| 19.0.1  
19.1.0, 19.1.1| 19.1.2  
19.2.0| 19.2.1  
  
## 用法

### 检查并修复(交互式)

root@kitploit:~
    
    
    npx fix-react2shell-next
    

### 自动修复(CI / 非交互式)

root@kitploit:~
    
    
    npx fix-react2shell-next --fix
    

### 仅检查(试运行)

root@kitploit:~
    
    
    npx fix-react2shell-next --dry-run
    

### JSON 输出(用于脚本)

root@kitploit:~
    
    
    npx fix-react2shell-next --json
    

## 示例输出

root@kitploit:~
    
    
    🔍 fix-react2shell-next - CVE-2025-66478 vulnerability scanner
    
    📂 Found 3 package.json file(s)
    
    🚨 Found 2 vulnerable file(s):
    
      📄 package.json
         next: ^15.1.0 → 15.1.9
    
      📄 apps/web/package.json
         next: ^15.4.3 → 15.4.8
         react-server-dom-webpack: 19.1.0 → 19.1.2
    
    🔧 Apply fixes? [Y/n] y
    
    🔧 Applying fixes...
    
       ✓ Updated package.json
       ✓ Updated apps/web/package.json
    
    📦 Package manager: pnpm
    🔄 Refreshing lockfile...
    
    $ pnpm install
    
    ✅ Patches applied!
       Remember to test your app and commit the changes.
    

## Monorepo 支持

该工具会自动查找项目中的所有 `package.json` 文件,并排除以下路径:

  * `node_modules`
  * `.next`, `.turbo`, `.vercel`, `.nuxt`
  * `dist`, `build`, `.output`
  * `coverage`



支持 npm、yarn、pnpm 和 bun workspaces。

## 参考

  * GitHub 安全公告 GHSA-9qr9-h5gf-34mp
  * Next.js 安全公告
  * React 安全公告



## 许可证

MIT