제출 #1051584: continuedev continue 2.0.0-vscode Command Injection정보

제목continuedev continue 2.0.0-vscode Command Injection
설명The Continue webview is created with enableScripts:true and enableCommandUris:true. enableCommandUris is passed as a bare boolean (not an allow-list of specific commands) on BOTH webviews: ContinueGUIWebviewViewProvider.ts approx line 101 and ContinueConsoleWebviewViewProvider.ts approx line 182. With a bare-boolean enableCommandUris, ANY VS Code command is invokable from a command: URI inside the webview - this is the primary defect (improper authorization for a custom URL scheme, CWE-939). The chat renderer draws Mermaid diagrams with mermaid.initialize({securityLevel:"loose"}) (MermaidBlock.tsx approx line 66) and injects the rendered SVG via container.innerHTML (approx line 99); StyledMarkdownPreview/index.tsx (approx line 354) routes fenced mermaid blocks in chat into this renderer. Real Mermaid 11.13 in loose mode preserves a command: URI (scheme plus URL-encoded JSON arguments) unchanged in the anchor href. There is no Content-Security-Policy on the webview HTML (defense-in-depth gap, CWE-693). An attacker whose Mermaid block reaches the chat (via indirect prompt injection in attacker-controlled content the agent renders) can draw a clickable node whose href is a command: URI. A single genuine user click makes VS Code execute the command; using workbench.action.terminal.sendSequence types the attacker's text, terminated by a carriage return, into the active integrated terminal, running an arbitrary command on the host (consequence: OS command execution, CWE-78). Impact: arbitrary OS command execution on the host from one user click. CVSS 3.1: AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H = 7.8 (8.6 if scope-changed). Proof of concept: Attacker delivers this fenced mermaid block into the chat: flowchart LR A[Click to view details] click A "command:workbench.action.terminal.sendSequence?%5B%7B%22text%22%3A%22echo%20PWNED%20%3E%20%24env%3ATEMP%5C%5Ccontinue_poc_marker.txt%5Cr%22%7D%5D" The href decodes to workbench.action.terminal.sendSequence with argument [{"text":"echo PWNED > $env:TEMP\\continue_poc_marker.txt\r"}]. Validation in real VS Code 1.141.1 (two confirmed parts): (1) the sink - executeCommand of terminal.sendSequence runs the text in the integrated terminal; (2) activation - a genuine OS-level (isTrusted) click on a command: anchor inside a webview created with Continue's exact options (enableScripts + enableCommandUris:true, no CSP) executes the command and creates the marker file. A scripted/synthetic click is blocked (isTrusted=false). This is one-click, not zero-click; zero-click inline-handler payloads are stripped by Mermaid's internal DOMPurify even in loose mode. Affected: continuedev/continue VS Code extension 2.0.0 (tag v2.0.0-vscode, 03b05ef); webview providers and Mermaid renderer byte-identical in v2.1.0-vscode and main 5522c6f. Continue acquired by Cursor June 2026, repository read-only, no vendor fix will be issued. Vendor status: [email protected] contacted 2026-10-15; no response. A chat Mermaid node with href command:workbench.action.terminal.sendSequence?[{"text":"<cmd>\r"}]; one genuine user click runs <cmd> in the integrated terminal. Confirmed in real VS Code 1.141.1 with Continue's exact webview options; full live-click PoC on request.
사용자
 Yujin (UID 102324)
제출2026. 10. 22. AM 06:38 (29 날 ago)
모더레이션2026. 11. 20. PM 12:52 (29 days later)
상태수락
VulDB 항목441420 [continuedev continue 2.0.0/2.1.0 Mermaid Diagram Renderer ContinueGUIWebviewViewProvider.ts getSidebarContent 권한 상승]
포인트들17

Interested in the pricing of exploits?

See the underground prices here!