You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(desktop): shell.openExternal called without URL protocol validation #30613
The open-link IPC handler in packages/desktop/src/main/ipc.ts calls shell.openExternal(url) without validating the URL protocol. This allows arbitrary protocols (e.g., file:, javascript:, ms-msdt:, smb:) to be opened via the OS default handler.
The primary attack vector is the terminal component (packages/app/src/components/terminal.tsx:340), where getHoveredLinkText() reads URLs from xterm.js output and passes them directly to platform.openLink(). LLM-generated output could contain malicious URLs that a user opens via Shift+Click.
Steps to reproduce
Open OpenCode desktop app
Ask the LLM to output a file:// URL or craft terminal output containing one
Shift+Click the link in the terminal
The OS executes/opens the file:// URL without validation
Impact
Arbitrary application execution via file:///path/to/executable
NTLM hash leakage via smb:// URLs on Windows
Protocol handler abuse via ms-msdt:, ms-settings:, etc.
Activity
ulises-jeremias commentedon Jul 14, 2026
Reopened the fix PR after automated cleanup closure: #36862
@Brendonovich could you please take a look when you get a chance? Thanks!
github-actions commentedon Sep 14, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.