GHSA-5c57-rqjx-35g2 Cline Kanban Server has a Cross-Origin WebSocket Hijacking Vulnerability
SummaryThe `kanban` npm package (used by the `cline` CLI) starts a WebSocket server on `127.0.0.1:3484` with no Origin header validation. Any website a developer visits can silently connect to the kanban server via WebSocket and:Leak sensitive data in real-time: workspace filesystem paths, task titles/descriptions, git branch info, AI agent chat messagesHijack running AI agent terminals by injecting arbitrary prompts into the agent's input, leading to remote code executionKill running agent tasks by terminating active sessions via the control WebSocketWebSocket connections are not subject to CORS restrictions. The browser sends them freely to localhost regardless of the page's origin. The kanban server accepts all connections without checking the Origin header.Affected ComponentPackage: `kanban` on npm (https://www.npmjs.com/package/kanban)Repository: https://github.com/cline/kanbanTested version: 0.1.59Installed via: `cline` CLI (`cline --kanban` or default `cline` command)Endpoints: `ws://127.0.0.1:3484/api/runtime/ws`, `ws://127.0.0.1:3484/api/terminal/io`, `ws://127.0.0.1:3484/api/terminal/control`Root CauseThree WebSocket endpoints are exposed without authentication or Origin validation.1. Runtime state stream (no Origin check on upgrade)On connection, the server immediately sends a full snapshot of the developer's workspace:2. Terminal I/O (raw bytes written to agent terminal, no auth)3. Terminal control (can kill tasks, no auth)ExploitationStep 1: Cross-Origin Info LeakFrom any website, JavaScript connects to the runtime WebSocket. No CORS applies:The WebSocket also streams live updates as the developer works: task state changes, AI agent chat messages, git activity, all in real-time.Step 2: Detect Running Agent SessionThe runtime WebSocket broadcasts `task_sessions_updated` messages when an AI agent is active:Step 3: Terminal Hijack into RCEWhen a running session is detected, connect to the terminal I/O WebSocket and inject a prompt followed by a carriage return:The AI agent receives this as a user message and executes the shell command. The carriage return (`\r`) submits the input, the same as pressing Enter.Step 4: Kill Tasks (DoS)The control WebSocket can terminate any active task:Proof of ConceptA full interactive PoC is hosted at:
http://cline.sagilayani.com:1337/?key=clinevuln2026This page demonstrates the entire attack from a remote server:Have kanban running locally (via `cline` or `cline --kanban`)Visit the PoC URL in any browserClick "Connect to Kanban". Workspace paths, tasks, and git info are leaked immediately.Click "Arm Exploit". The exploit monitors for active agent sessions.In your kanban UI, open any task and interact with the agent.The exploit detects the running session, hijacks the terminal, and injects a command that triggers a native macOS dialog as proof of execution.The exploit continuously monitors all tasks and will hijack every new session.Minimal Reproduction (browser console)Paste on any website (e.g. https://example.com) to confirm the info leak:Impact| Capability | Details |
|-----------|---------|
| Information Disclosure | Workspace paths, task content, git branches, AI chat streamed in real-time from any website |
| Remote Code Execution | Terminal hijack injects commands into the AI agent when a task is active |
| Denial of Service | Kill any running agent task via the control WebSocket |Attack requirements: victim has Cline kanban running and visits any attacker-controlled webpage. No user interaction needed beyond normal kanban usage.Recommended FixesValidate the Origin header on all WebSocket upgrade requests. Reject connections from origins other than the kanban UI itself (127.0.0.1:3484).Require a session token. Generate a random secret at server startup and require it as a query parameter on all WebSocket connections. The kanban UI receives the token at page load; external origins cannot guess it.Authenticate terminal WebSocket connections. Verify that the connecting client is the legitimate kanban UI, not a cross-origin attacker.EnvironmentmacOS 15.x (also affects Linux/Windows, any platform where Cline runs)Node.js v20.19.0kanban v0.1.59 (latest at time of testing)cline v2.13.0Tested browsers: Firefox, Chrome, Arc
CVSS v3.1 score: 9.6