Back to Intelligence

Cursor Supply Chain Attack: Malicious Claude Code Extension Deploys Reverse SSH Tunnels

SA
Security Arsenal Team
November 2, 2026
12 min read

Security researchers have identified a supply chain compromise affecting the Cursor IDE ecosystem, where a malicious extension masquerading as legitimate Claude Code tooling was distributed to developers. Unlike typical nuisance malware, this threat demonstrates a clear intent to establish persistent, covert access to developer workstations through reverse SSH tunnels.

The extension performs host reconnaissance—gathering system information, network configuration, and user context—before attempting to create outbound SSH connections to attacker-controlled infrastructure. This technique allows adversaries to bypass inbound firewall restrictions by having the victim initiate the connection outward, then tunneling command-and-control (C2) traffic through the established SSH session.

Development environments represent high-value targets. They typically contain sensitive credentials, API keys, source code, and direct access to production deployment pipelines. A compromised developer workstation can serve as a beachhead for lateral movement into build systems, artifact repositories, and ultimately, production infrastructure. Given the trusted nature of IDE extensions and the elevated privileges under which they often execute, this attack vector requires immediate attention from security teams managing developer endpoints.

Technical Analysis

Attack Vector and Delivery

The malicious extension was distributed through Cursor’s extension ecosystem, leveraging the trust users place in IDE marketplaces. Cursor, an AI-powered code editor gaining rapid adoption among developers, allows third-party extensions to execute with the privileges of the host process—typically the developer’s user context, which often includes access to SSH keys, cloud credentials, and internal network resources.

The extension specifically impersonated Claude Code, Anthropic’s official CLI tool, exploiting its popularity among developers using Cursor for AI-assisted coding. Upon installation, the extension initiated two distinct malicious behaviors:

  1. Host Reconnaissance: Systematic enumeration of the local environment to identify valuable targets, network topology, and security controls.
  2. Reverse SSH Tunnel Establishment: Creation of an outbound SSH connection from the victim machine to attacker-controlled infrastructure, configured with remote port forwarding to allow inbound access back through the tunnel.

Reverse SSH Tunnel Mechanics

Reverse SSH tunnels (ssh -R) are a legitimate administrative technique frequently abused by threat actors for command-and-control. The attack chain typically follows this pattern:

  1. Outbound Connection: The compromised host initiates an SSH connection to a remote server on a standard port (often 443 or 22 to blend with legitimate traffic).
  2. Remote Port Forwarding: Using the -R flag, the attacker specifies a port on their server that forwards traffic back through the tunnel to a port on the victim machine (commonly port 22 for shell access).
  3. Persistence: The SSH client may be configured to maintain the connection indefinitely, reconnect automatically if dropped, or spawn through scheduled tasks/launch agents.

This technique effectively bypasses perimeter firewalls and NAT, as the connection appears as legitimate outbound SSH traffic from the internal network.

Host Reconnaissance Activities

The extension performed systematic reconnaissance to map the target environment. Typical activities observed in similar supply chain compromises include:

  • System Information Gathering: Hostname, OS version, kernel details, and architecture
  • Network Enumeration: Active interfaces, routing tables, ARP caches, and established connections
  • User Context: Current user privileges, group memberships, and sudo access
  • Credential Hunting: Enumeration of SSH keys (~/.ssh/), cloud configuration files (~/.aws/, ~/.azure/), and API tokens
  • Process Discovery: Identification of security tools, development frameworks, and potential lateral movement targets

Exploitation Status

This threat is confirmed as actively exploited in the wild through the Cursor extension marketplace. While no CVE identifier has been assigned to this specific supply chain incident, it aligns with MITRE ATT&CK techniques T1195 (Supply Chain Compromise) and T1572 (Protocol Tunneling). Security teams should treat any installation of unverified Claude Code extensions from third-party marketplaces as potentially compromised.

Detection & Response

Sigma Rules

YAML
---
title: Reverse SSH Tunnel Establishment via SSH Client
id: 8f7a2b1c-3e4d-4c5a-9b8f-1a2b3c4d5e6f
status: experimental
description: Detects SSH client execution with remote port forwarding flags, commonly used in reverse tunnel attacks to establish C2 channels through outbound connections.
references:
  - https://attack.mitre.org/techniques/T1572/
  - https://www.securityweek.com/malicious-claude-code-extension-served-in-cursor-supply-chain-attack/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.command_and_control
  - attack.t1572
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    Image|endswith:
      - '\ssh.exe'
      - '\sshd.exe'
    CommandLine|contains:
      - ' -R '
      - ' -L '
      - ' -D '
  condition: selection
falsepositives:
  - Legitimate administrative SSH tunneling for remote access
  - Database administrators using SSH tunnels for secure database connections
level: high
---
title: SSH Connection to Non-Standard High Ports
id: 9a8b7c6d-5e4f-3a2b-1c9d-8e7f6a5b4c3d
status: experimental
description: Detects SSH connections to high-numbered ports (10000-65535) which are uncommon for legitimate SSH administration but frequently used in reverse tunnel configurations.
references:
  - https://attack.mitre.org/techniques/T1571/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.command_and_control
  - attack.t1571
logsource:
  category: network_connection
  product: windows
detection:
  selection:
    Image|endswith:
      - '\ssh.exe'
      - '\sshd.exe'
    DestinationPort|gte: 10000
  condition: selection
falsepositives:
  - Legacy applications using non-standard SSH ports
  - Development environments with custom SSH configurations
level: medium
---
title: Suspicious Process Spawning SSH Client
id: 7c6d5e4f-3a2b-1c9d-8e7f-6a5b4c3d2e1f
status: experimental
description: Detects code editors, IDEs, or text editors spawning SSH client processes, potentially indicating malicious extension activity or supply chain compromise.
references:
  - https://attack.mitre.org/techniques/T1195/
  - https://attack.mitre.org/techniques/T1572/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.initial_access
  - attack.t1195
  - attack.command_and_control
logsource:
  category: process_creation
  product: windows
detection:
  selection_parent:
    ParentImage|endswith:
      - '\cursor.exe'
      - '\code.exe'
      - '\code-insiders.exe'
      - '\atom.exe'
      - '\sublime_text.exe'
  selection_child:
    Image|endswith:
      - '\ssh.exe'
      - '\sshd.exe'
      - '\plink.exe'
      - '\putty.exe'
  condition: selection_parent and selection_child
falsepositives:
  - Integrated terminal usage within IDEs for legitimate SSH sessions
  - DevOps engineers using IDE terminals for server management
level: high

KQL (Microsoft Sentinel / Defender)

Hunt for reverse SSH tunnel activity and suspicious network connections originating from developer environments. This query identifies SSH processes with tunneling flags and correlates them with network connections to external IP addresses.

KQL — Microsoft Sentinel / Defender
// Hunt for SSH tunneling activity from developer workstations
let SSHProcesses = DeviceProcessEvents
| where FileName in~ ("ssh.exe", "sshd.exe", "ssh", "sshd")
| where ProcessCommandLine has_any (" -R ", " -L ", " -D ", "-o ServerAliveInterval")
| project DeviceId, TimeGenerated, FileName, ProcessCommandLine, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine;

SSHProcesses
| join kind=inner (
    DeviceNetworkEvents
    | where RemotePort >= 10000 or RemotePort == 22
    | where InitiatingProcessFileName in~ ("ssh.exe", "sshd.exe", "ssh", "sshd")
    | project DeviceId, TimeGenerated, RemoteIP, RemotePort, RemoteUrl
) on DeviceId
| project TimeGenerated, DeviceName, AccountName, FileName, ProcessCommandLine, RemoteIP, RemotePort, InitiatingProcessFileName
| order by TimeGenerated desc
KQL — Microsoft Sentinel / Defender
// Hunt for IDE processes spawning suspicious command-line tools
DeviceProcessEvents
| where InitiatingProcessFileName in~ ("cursor.exe", "code.exe", "code", "cursor")
| where FileName in~ ("ssh.exe", "sshd.exe", "netstat.exe", "ifconfig", "ipconfig.exe", "whoami.exe", "hostname.exe")
| project TimeGenerated, DeviceName, InitiatingProcessFileName, FileName, ProcessCommandLine, AccountName, SHA256
| order by TimeGenerated desc

Velociraptor VQL

Hunt for active SSH tunneling processes and network connections across the enterprise. This artifact identifies processes with suspicious command lines and correlates them with established network connections.

VQL — Velociraptor
-- Hunt for SSH tunneling processes and their network connections
SELECT 
    Pid,
    Name,
    CommandLine,
    Exe,
    Username,
    CreateTime,
    Netstat.LocalIP,
    Netstat.LocalPort,
    Netstat.RemoteIP,
    Netstat.RemotePort,
    Netstat.Status
FROM pslist()
JOIN netstat() ON Pid = Netstat.Pid
WHERE CommandLine =~ '(ssh|sshd).*(-R|-L|-D|ServerAlive)'
   OR (Name =~ 'ssh|sshd' AND Netstat.RemotePort >= 10000)
VQL — Velociraptor
-- Hunt for IDE processes with suspicious child processes indicating extension activity
SELECT 
    Pid,
    Ppid,
    Name,
    CommandLine,
    Exe,
    Username,
    CreateTime,
    Parent.Name as ParentName,
    Parent.CommandLine as ParentCommandLine
FROM pslist()
WHERE Parent.Name =~ '(cursor|code|code-insiders|sublime|atom)'
  AND Name =~ '(ssh|sshd|netstat|ifconfig|ipconfig|whoami|hostname|uname)'

Remediation Script

For Windows environments, use PowerShell to audit installed Cursor extensions, check for suspicious SSH processes, and terminate potential reverse tunnels.

PowerShell
# Cursor Supply Chain Compromise Detection and Remediation Script
# Requires administrative privileges for process termination

Write-Host "[+] Scanning for suspicious SSH processes and Cursor extensions..." -ForegroundColor Cyan

# Check for SSH processes with tunneling flags
$SuspiciousSSH = Get-Process | Where-Object {
    ($_.Name -match "ssh|sshd") -and 
    ($_.CommandLine -match "\-R|\-L|\-D")
}

if ($SuspiciousSSH) {
    Write-Host "[!] ALERT: Found SSH processes with tunneling flags:" -ForegroundColor Red
    $SuspiciousSSH | Select-Object Name, Id, CommandLine | Format-Table -AutoSize
    
    $Confirm = Read-Host "Do you want to terminate these processes? (Y/N)"
    if ($Confirm -eq "Y") {
        $SuspiciousSSH | Stop-Process -Force
        Write-Host "[+] Terminated suspicious SSH processes" -ForegroundColor Green
    }
}

# Check for network connections on high ports
$HighPortConnections = Get-NetTCPConnection | Where-Object {
    ($_.RemotePort -ge 10000 -and $_.RemotePort -ne 0) -and
    ($_.OwningProcess -ne 0)
} | ForEach-Object {
    $Process = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
    if ($Process.Name -match "ssh|sshd") {
        [PSCustomObject]@{
            ProcessName = $Process.Name
            ProcessId = $_.OwningProcess
            RemoteAddress = $_.RemoteAddress
            RemotePort = $_.RemotePort
            State = $_.State
        }
    }
}

if ($HighPortConnections) {
    Write-Host "[!] ALERT: SSH connections on high ports detected:" -ForegroundColor Red
    $HighPortConnections | Format-Table -AutoSize
}

# Check Cursor extensions directory for recently modified or suspicious extensions
$CursorExtensionsPath = "$env:USERPROFILE\.cursor\extensions"
if (Test-Path $CursorExtensionsPath) {
    Write-Host "[+] Scanning Cursor extensions directory: $CursorExtensionsPath" -ForegroundColor Cyan
    
    $SuspiciousExtensions = Get-ChildItem -Path $CursorExtensionsPath -Recurse -Filter "package.json" | 
        ForEach-Object {
            $PackageJson = Get-Content $_.FullName -Raw | ConvertFrom-Json
            $ExtensionDir = $_.DirectoryName
            
            # Check for extensions with suspicious keywords or recent modifications
            if ($PackageJson.name -match "claude|anthropic" -and $PackageJson.publisher -ne "anthropic") {
                [PSCustomObject]@{
                    Name = $PackageJson.name
                    Publisher = $PackageJson.publisher
                    Version = $PackageJson.version
                    Path = $ExtensionDir
                    LastWriteTime = (Get-Item $ExtensionDir).LastWriteTime
                }
            }
        }
    
    if ($SuspiciousExtensions) {
        Write-Host "[!] ALERT: Potentially malicious Claude-related extensions found:" -ForegroundColor Red
        $SuspiciousExtensions | Format-Table -AutoSize
        
        Write-Host "[?] Recommended action: Remove these extensions immediately and audit for compromise" -ForegroundColor Yellow
    }
}

# Check for recently created scheduled tasks or persistence mechanisms
$RecentTasks = Get-ScheduledTask | Where-Object {
    ($_.Date -gt (Get-Date).AddDays(-7)) -and
    ($_.TaskName -match "ssh|tunnel|update")
}

if ($RecentTasks) {
    Write-Host "[!] Recently created suspicious scheduled tasks:" -ForegroundColor Yellow
    $RecentTasks | Select-Object TaskName, Date, TaskPath | Format-Table -AutoSize
}

Write-Host "[+] Scan complete. Review any alerts above and investigate affected systems for compromise." -ForegroundColor Green

For Linux/macOS environments (common for developers), use this Bash script:

Bash / Shell
#!/bin/bash
# Cursor Supply Chain Compromise Detection Script for Linux/macOS

echo "[+] Scanning for reverse SSH tunnels and malicious Cursor extensions..."

# Check for SSH processes with tunneling flags
echo "[+] Checking for SSH tunneling processes..."
ps aux | grep -E "ssh.*-[RLD]" | grep -v grep | while read line; do
    echo "[!] ALERT: Suspicious SSH process detected:"
    echo "    $line"
    # Optional: kill -9 $(echo $line | awk '{print $2}')
done

# Check for established SSH connections on high ports
echo "[+] Checking for SSH connections on non-standard ports..."
if command -v ss &> /dev/null; then
    ss -tunap | grep -E ":1[0-9]{4}" | grep ssh
elif command -v netstat &> /dev/null; then
    netstat -tunap 2>/dev/null | grep -E ":1[0-9]{4}" | grep ssh
fi

# Check Cursor extensions directory
CURSOR_EXT_DIR="$HOME/.cursor/extensions"
if [ -d "$CURSOR_EXT_DIR" ]; then
    echo "[+] Scanning Cursor extensions in $CURSOR_EXT_DIR"
    
    find "$CURSOR_EXT_DIR" -name "package.json" -mtime -30 | while read pkg; do
        # Check for unofficial Claude extensions
        if grep -q "claude" "$pkg" && ! grep -q '"publisher": "anthropic"' "$pkg"; then
            echo "[!] ALERT: Suspicious Claude extension found:"
            echo "    Path: $(dirname $pkg)"
            echo "    Package: $(grep '"name"' "$pkg" | cut -d'"' -f4)"
            echo "    Publisher: $(grep '"publisher"' "$pkg" | cut -d'"' -f4)"
        fi
    done
fi

# Check for recent SSH key modifications or new authorized_keys
echo "[+] Checking SSH configuration for unauthorized modifications..."
find ~/.ssh -name "authorized_keys" -o -name "*.pub" -mtime -7 | while read keyfile; do
    echo "[!] Recently modified SSH file: $keyfile"
    ls -la "$keyfile"
done

# Check for persistence mechanisms in cron
echo "[+] Checking for suspicious cron jobs..."
crontab -l 2>/dev/null | grep -E "ssh|curl|wget|nc|bash" | while read cron; do
    echo "[!] Suspicious cron entry: $cron"
done

echo "[+] Scan complete. If any alerts were generated, isolate the system and perform forensic analysis."

Remediation

Immediate Actions

  1. Isolate Affected Systems: Immediately disconnect any developer workstation identified as running the malicious extension from the network to prevent tunnel establishment and lateral movement.

  2. Extension Audit: Enumerate all installed extensions across Cursor installations in your environment. Remove any Claude Code extensions not published by Anthropic. Verify extension publishers through official channels rather than marketplace metadata alone.

  3. Credential Rotation: Assume compromise of any credentials accessible from affected systems. Rotate:

    • SSH private keys (generate new key pairs)
    • Cloud provider access keys (AWS, Azure, GCP)
    • Git repository credentials and personal access tokens
    • Database connection strings
    • Any API keys stored in environment variables or configuration files
  4. Network Segmentation: Review firewall logs for outbound SSH connections (port 22, 443, or high-numbered ports) to unknown IP addresses. Block identified C2 infrastructure at the network perimeter.

Long-term Hardening

Implement Extension Allowlisting: Configure Cursor and other IDEs to only permit extensions from verified publishers. Where possible, maintain an internal extension marketplace or repository of vetted tools.

Egress Filtering: Implement strict egress filtering rules that restrict outbound SSH connections to approved destinations only. Consider using SSH bastion hosts for legitimate administrative access, eliminating the need for direct outbound SSH from developer workstations.

Developer Environment Isolation: Use containerized development environments (DevContainers, GitHub Codespaces, or local Docker) that limit access to host credentials and network resources. This contains potential supply chain compromises within isolated environments.

Monitoring and Detection: Deploy the Sigma rules and hunting queries provided above to your SIEM platform. Specifically monitor for:

  • SSH processes spawning from IDE processes
  • Outbound connections on high-numbered ports (10000+)
  • Process execution containing SSH tunneling flags (-R, -L, -D)
  • Unexpected child processes from cursor.exe, code.exe, or similar IDE executables

Supply Chain Security: Establish a policy requiring security review of all third-party IDE extensions before installation. Consider using endpoint detection and response (EDR) solutions that monitor for suspicious behaviors in development tools, not just traditional malware signatures.

Vendor Advisories

Monitor Cursor and Anthropic for official security advisories regarding this incident. While no specific CVE has been assigned, the Cursor security team should be notified of any malicious extensions discovered in their ecosystem. Report suspicious extensions to Cursor's security team and consider temporarily disabling extension auto-updates until the scope of the compromise is fully understood.

For organizations using Cursor in regulated environments (PCI-DSS, HIPAA), conduct a formal incident response assessment to determine if developer credentials or access tokens were exfiltrated, which may trigger breach notification requirements depending on the data accessible from compromised systems.

Related Resources

Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.

Cursor Supply Chain Attack: Malicious Claude Code Extension Deploys Reverse SSH Tunnels | Security Arsenal | Security Arsenal