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.
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.
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.
Once the malicious website hijacked the WebSocket connection, it had full control over the agent's capabilities, leading to severe impacts:
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.
Security teams may want to hunt for the following patterns to identify vulnerable or compromised systems:
localhost from a web browser processcline or related agent processcurl, wget, or a reverse shell.localhost.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.localhost.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.

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.
Help others stay informed about cybersecurity threats
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.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
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 detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.