Critical WebSocket Hijacking Vulnerability (CVSS 9.7) in Cline AI Coding Agent Allows RCE and Data Theft

Critical Flaw in Cline AI Agent Lets Any Website Hijack Developer Workspaces

CRITICAL
May 11, 2026
4m read
VulnerabilityMalwareThreat Intelligence

Related Entities

Organizations

Oasis Security

Products & Tech

Full Report

Executive Summary

Researchers at Oasis Security have uncovered a critical (CVSS 9.7) vulnerability in Cline, a popular open-source AI coding agent. The flaw allowed for a complete takeover of the agent through a WebSocket hijacking attack. Because the agent's local server did not properly validate the origin of incoming WebSocket connections, any website opened in a developer's browser could silently connect to the agent. This allowed a malicious website to exfiltrate the developer's entire workspace, including code and AI chat history, and execute arbitrary commands on the local machine with the agent's permissions. The vulnerability, now patched in version 0.1.66, exposes a significant new attack surface created by the rise of powerful, locally-running AI assistants.

Vulnerability Details

  • Vulnerability: WebSocket Hijacking due to missing origin validation.
  • CVSS Score: 9.7 (Critical)
  • Affected Component: The local Kanban server in the Cline AI coding agent.
  • Impact: Information Disclosure, Remote Code Execution (RCE), Denial of Service.

WebSockets, unlike standard HTTP requests, are not always subject to the same-origin policy (SOP), especially for connections to localhost. The Cline agent ran a server on the developer's machine that listened for WebSocket connections. The server failed to check the Origin header of incoming connection requests. This meant that a script running on evil.com in the user's browser could successfully establish a WebSocket connection to ws://localhost:<port>, a server it should not be able to talk to.

Affected Systems

  • Cline AI coding agent versions prior to 0.1.66.
  • Any developer using the vulnerable versions of the agent.

Exploitation Status

The vulnerability was discovered by security researchers and a patch has been released. There is no indication of in-the-wild exploitation. However, the public disclosure of the flaw could lead to attackers targeting unpatched users.

Impact Assessment

Once the malicious website hijacked the WebSocket connection, it had full control over the agent's capabilities, leading to severe impacts:

  1. Information Disclosure: The attacker could connect to the agent's runtime state stream and receive a full snapshot of the developer's workspace, including all open files, source code, and the history of AI chat interactions. This could lead to the theft of intellectual property and sensitive credentials stored in code.
  2. Remote Code Execution: The attacker could use the terminal I/O endpoint to send commands to the agent's built-in terminal. The agent would then execute these commands on the developer's machine with the user's privileges. This could be used to install malware, steal files, or pivot deeper into the corporate network.
  3. Denial of Service: The attacker could use the terminal control endpoint to kill active processes, disrupting the developer's work.

This new attack vector is particularly dangerous because it is completely transparent to the user. No pop-ups or permission prompts are required; simply visiting a malicious website is enough to trigger the attack.

Cyber Observables — Hunting Hints

Security teams may want to hunt for the following patterns to identify vulnerable or compromised systems:

Type
Network Traffic Pattern
Value
Inbound connections to localhost from a web browser process
Description
Legitimate for some local development, but a spike in such connections or connections to unusual ports could indicate an attack.
Type
Process Name
Value
cline or related agent process
Description
Monitor for this process spawning unexpected child processes like curl, wget, or a reverse shell.
Type
Log Source
Value
Browser developer tools (Network tab)
Description
A user could inspect the network tab to see if a website is making unexpected WebSocket connections to localhost.

Detection Methods

  • Endpoint Detection and Response (EDR): An EDR solution can be configured to detect and alert when a browser process (chrome.exe, firefox.exe) initiates a network connection to a local port associated with a development tool like Cline. It can also detect when the Cline process spawns suspicious child processes.
  • Software Inventory: Use software inventory tools to identify all developer machines running vulnerable versions of the Cline AI agent.
  • Browser Extensions: Security-focused browser extensions can be configured to block or alert on cross-origin WebSocket connection attempts to localhost.

Remediation Steps

  1. Patch Immediately: The primary remediation is to update the Cline AI coding agent to version 0.1.66 or later. This version correctly implements origin validation for all WebSocket connections.
  2. Developer Awareness: Educate developers about the risks of locally-running servers and AI agents. They should be cautious about the tools they install and keep them updated.
  3. Principle of Least Privilege: AI agents should be run with the minimum necessary permissions. They should not have unrestricted access to the entire file system or the ability to execute arbitrary commands unless explicitly required and approved by the user for a specific task. This aligns with D3FEND Application Hardening (D3-AH).

Timeline of Events

1
May 11, 2026
This article was published

MITRE ATT&CK Mitigations

Updating the Cline agent to the patched version (0.1.66) is the primary and most effective mitigation.

Running developer tools and AI agents in sandboxed environments or with restricted permissions can limit the impact of a compromise.

Using web filters or browser security policies to control which websites can execute scripts or make network connections.

Sources & References

11th May – Threat Intelligence Report
Check Point Research (research.checkpoint.com) May 11, 2026
Cline Kanban Flaw Lets Websites Hijack AI Coding Agents
NetworkUstad (networkustad.com) May 10, 2026

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Tags

VulnerabilityClineAI AgentWebSocket HijackingRCECVSS 9.7Developer Security

📢 Share This Article

Help others stay informed about cybersecurity threats

🎯 MITRE ATT&CK Mapped

Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.

🧠 Enriched & Analyzed

Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.

🛡️ Actionable Guidance

Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.

🔗 STIX Visualizer

Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.

Sigma Generator

Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.