A newly disclosed vulnerability dubbed 'SneakPeek' in Anthropic's Claude Code Desktop application demonstrates something security teams have been warning about since AI coding assistants went mainstream: these tools sit at the intersection of your most sensitive credentials and untrusted external content. The flaw lives in the desktop application's preview pane — a component that renders content for developer convenience — and it can be triggered without any explicit user interaction (zero-click), enabling adversaries to quietly exfiltrate:
- SSH private keys (
~/.ssh/id_rsa,id_ed25519, etc.) - AWS credentials (
~/.aws/credentials,~/.aws/config, session tokens) - Claude OAuth tokens — the very tokens that authenticate the developer to Anthropic's API
This is a worst-case trifecta. SSH keys mean infrastructure access. AWS credentials mean cloud takeover. OAuth tokens mean impersonation of the developer's AI session and anything that session can reach. The attack chain is silent, requires no clicks, and targets precisely the population — developers — whose endpoints hold the crown jewels of most organizations.
If your engineering teams use Claude Code Desktop, treat this as an active remediation priority, not a patch-when-convenient item.
Why This Matters to Defenders
AI coding assistants have earned privileged positions on developer workstations. They read source trees, execute shell commands, and maintain authenticated sessions to cloud APIs. A flaw in any rendering or preview component of these tools converts them into a server-side request forgery-like primitive running on your endpoint — untrusted content gets rendered in a privileged context, and the privileged context has access to credentials.
The 'SneakPeek' scenario follows the classic pattern we've seen with Markdown preview vulnerabilities, Electron-based desktop app flaws, and renderer sandbox escapes: an attacker plants malicious content in something a developer is likely to open in the tool — a repository, a README, an issue, a code snippet shared in chat — and the preview pane processes it without requiring the developer to click anything. From there, the attacker pivots to local credential files and exfiltrates them over the network.
Technical Analysis
Affected Component
- Product: Anthropic Claude Code Desktop application
- Component: Preview pane (content rendering surface)
- Trigger: Rendering of attacker-controlled content — no user click required
- Impact: Local file read of credential material and network exfiltration
At time of writing, no CVE identifier has been published in the public reporting for this flaw. Do not wait for a CVE to act — credential-theft primitives in developer tooling are exploited quickly once technique details circulate.
Attack Chain (Defender's View)
- Delivery: Attacker seeds malicious content into an artifact a developer will open in Claude Code Desktop — a git repository, README, documentation file, or shared snippet.
- Trigger: Claude Code Desktop's preview pane renders the content automatically. No click, no confirmation dialog.
- Local access: The rendered payload abuses the preview component's privileges to read local credential stores —
~/.ssh/,~/.aws/, and the OAuth token cache used by the Claude desktop session. - Exfiltration: Stolen material is sent outbound to attacker infrastructure, typically over HTTPS to blend with normal application traffic.
Exploitation Requirements
The attacker needs the victim to open attacker-influenced content in Claude Code Desktop. Given how developers pull repositories, review shared code, and browse AI-generated or community content, this is a low bar — arguably lower than a phishing click, because the developer's normal workflow is the trigger.
Exploitation Status
Public reporting frames this as a demonstrated, practical credential-theft flaw, not a theoretical weakness. Even in the absence of confirmed in-the-wild campaigns, assume technique replication is underway. Credential-harvesting primitives against developer tooling are consistently among the fastest to be weaponized by both criminal and nation-state actors — developer endpoints are high-value initial access vectors for supply-chain operations.
Detection & Response
The observable behaviors of this attack are: (a) the Claude Code Desktop process accessing credential files it has no business touching, (b) the application spawning unexpected child processes or shell activity, and (c) network connections from the desktop app to infrastructure that isn't Anthropic's. These are high-fidelity signals when scoped properly — legitimate Claude Code traffic goes to a small, known set of endpoints, and legitimate Claude Code behavior does not include reading id_rsa or .aws/credentials.
SIGMA Rules
---
title: Claude Code Desktop Process Accessing Credential Files
id: 3f8a2c14-7b9d-4e51-a6c2-9d1e4f7a8b3c
status: experimental
description: Detects the Claude Code Desktop process (claude/claude-code) reading SSH private keys, AWS credential files, or OAuth token caches. Consistent with 'SneakPeek' preview-pane credential theft behavior.
references:
- https://www.darkreading.com/threat-intelligence/new-anthropic-sneakpeek-silent-zero-click-threat
- https://attack.mitre.org/techniques/T1552/001/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.credential_access
- attack.t1552.001
logsource:
category: file_event
product: windows
detection:
selection_source:
Image|contains:
- '\Claude'
- '\claude-code'
selection_target:
TargetFilename|contains:
- '\.ssh\id_rsa'
- '\.ssh\id_ed25519'
- '\.ssh\id_ecdsa'
- '\.aws\credentials'
- '\.aws\config'
- 'claude\oauth'
- 'claude\.credentials'
condition: selection_source and selection_target
falsepositives:
- Rare; Claude Code Desktop has no legitimate reason to read raw private key or AWS credential files outside an explicit user-initiated action
level: high
---
title: Claude Code Desktop Spawning Shell or Script Interpreter
id: 8c4e1a72-2d6f-4b38-91e5-5a3c7b9d2e41
status: experimental
description: Detects the Claude Code Desktop application spawning command shells or script interpreters with network or credential-access commands. May indicate malicious rendered content executing in the application context via the SneakPeek preview-pane flaw.
references:
- https://www.darkreading.com/threat-intelligence/new-anthropic-sneakpeek-silent-zero-click-threat
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.execution
- attack.t1059
- attack.credential_access
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|contains:
- '\Claude'
- '\claude-code'
selection_child:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\curl.exe'
- '\wget.exe'
selection_flags:
CommandLine|contains:
- '.ssh'
- '.aws'
- 'credentials'
- 'id_rsa'
- 'invoke-webrequest'
- 'curl '
- 'http://'
- 'https://'
condition: selection_parent and selection_child and selection_flags
falsepositives:
- Developer-initiated shell tool calls through Claude Code where the user explicitly approves command execution; tune for approved-session markers if your deployment logs them
level: high
---
title: Claude Code Desktop Network Connection to Non-Anthropic Infrastructure
id: 5b2d9f63-1a4c-4e87-b3d6-7f2a8c5e9d14
status: experimental
description: Detects Claude Code Desktop establishing outbound connections to domains outside known Anthropic/API endpoints. Exfiltration of stolen SSH keys, AWS credentials, or OAuth tokens via the SneakPeek flaw must traverse attacker-controlled infrastructure.
references:
- https://www.darkreading.com/threat-intelligence/new-anthropic-sneakpeek-silent-zero-click-threat
- https://attack.mitre.org/techniques/T1041/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.exfiltration
- attack.t1041
logsource:
category: network_connection
product: windows
detection:
selection_process:
Image|contains:
- '\Claude'
- '\claude-code'
filter_known:
DestinationHostname|contains:
- 'anthropic.com'
- 'claude.ai'
- 'api.anthropic.com'
- 'github.com'
- 'githubusercontent.com'
- 'registry.npmjs.org'
- 'pypi.org'
condition: selection_process and not filter_known
falsepositives:
- MCP server integrations and user-configured tool endpoints; maintain an allowlist of approved MCP/tool destinations per team and alert on deviations
level: medium
KQL (Microsoft Sentinel / Defender)
// Hunt: Claude Code Desktop accessing credential stores or making anomalous network connections
// Covers SneakPeek preview-pane credential theft behaviors
// Part 1: Claude process accessing SSH/AWS/OAuth credential files
DeviceFileEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFolderPath has_any ("Claude", "claude-code")
or InitiatingProcessFileName =~ "Claude.exe"
| where FolderPath has_any (".ssh\\id_", ".aws\\credentials", ".aws\\config", "oauth", ".credentials")
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName,
InitiatingProcessCommandLine, FolderPath, ActionType, SHA256
| sort by TimeGenerated desc
;
// Part 2: Claude Desktop spawning shells/network tools with credential or web strings
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFolderPath has_any ("Claude", "claude-code")
or InitiatingProcessFileName =~ "Claude.exe"
| where FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "curl.exe", "wget.exe")
| where ProcessCommandLine has_any (".ssh", ".aws", "credentials", "id_rsa",
"invoke-webrequest", "http://", "https://", "curl")
| project TimeGenerated, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessCommandLine, ReportId
| sort by TimeGenerated desc
;
// Part 3: Outbound connections from Claude to non-allowlisted destinations
let AllowedDests = dynamic(["anthropic.com", "claude.ai", "github.com",
"githubusercontent.com", "registry.npmjs.org", "pypi.org"]);
DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFolderPath has_any ("Claude", "claude-code")
or InitiatingProcessFileName =~ "Claude.exe"
| where isnotempty(RemoteUrl)
| where not(RemoteUrl has_any (AllowedDests))
| summarize ConnectionCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated)
by DeviceName, AccountName, RemoteUrl, RemoteIP, RemotePort, InitiatingProcessCommandLine
| sort by ConnectionCount desc
Velociraptor VQL
-- Artifact: Hunt.ClaudeCode.SneakPeekExposure
-- Identifies Claude Code Desktop processes, their child processes,
-- and outbound connections to aid SneakPeek credential-theft hunting
-- Part 1: Running Claude processes and their command lines
SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM pslist()
WHERE Name =~ '(?i)claude'
OR Exe =~ '(?i)claude'
-- Part 2: Child processes spawned by Claude (potential payload execution)
SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM pslist()
WHERE Ppid IN (
SELECT Pid FROM pslist() WHERE Name =~ '(?i)claude'
)
AND Name =~ '(?i)(cmd|powershell|pwsh|curl|wget|sh|bash|zsh)'
-- Part 3: Network connections held by Claude processes
SELECT Pid, Name, Family, Type, Status,
Laddr.IP AS LocalIP, Laddr.Port AS LocalPort,
Raddr.IP AS RemoteIP, Raddr.Port AS RemotePort
FROM netstat()
WHERE Name =~ '(?i)claude'
AND Status =~ 'ESTABLISHED'
-- Part 4: Recent access/modification timestamps on credential files (Linux/macOS endpoints)
SELECT FullPath, Size, Mtime, Atime
FROM glob(globs=[
'/home/*/.ssh/id_*',
'/home/*/.aws/credentials',
'/home/*/.aws/config',
'/root/.ssh/id_*',
'/Users/*/.ssh/id_*',
'/Users/*/.aws/credentials'
])
ORDER BY Atime DESC
Remediation & Verification Script
The following PowerShell script inventories Claude Code Desktop installations, checks the installed version against your minimum approved build, flags suspicious recent access to credential stores, and enumerates established outbound connections from the Claude process to non-Anthropic destinations. Run it across your developer fleet via your RMM or Intune.
# Requires: Run as Administrator for full visibility
# Security Arsenal - SneakPeek exposure check for Claude Code Desktop
$ErrorActionPreference = 'SilentlyContinue'
$report = [System.Collections.Generic.List[object]]::new()
# --- 1. Locate and version-check Claude Code Desktop ---
$claudePaths = @(
"$env:LOCALAPPDATA\Programs\Claude",
"$env:LOCALAPPDATA\AnthropicClaude",
"$env:ProgramFiles\Claude"
)
$claudeExe = foreach ($p in $claudePaths) {
if (Test-Path $p) { Get-ChildItem $p -Recurse -Filter "*.exe" |
Where-Object { $_.Name -match 'claude' } }
}
if ($claudeExe) {
foreach ($exe in $claudeExe) {
$ver = $exe.VersionInfo.ProductVersion
$report.Add([pscustomobject]@{
Check = 'Install'; Path = $exe.FullName; Version = $ver
Status = 'REVIEW - confirm against latest Anthropic release'
})
}
} else {
$report.Add([pscustomobject]@{ Check='Install'; Path='N/A'; Version='N/A'; Status='Claude Desktop not found' })
}
# --- 2. Detect Claude processes with unexpected child processes ---
$claudeProcs = Get-Process | Where-Object { $_.Name -match 'claude' }
foreach ($proc in $claudeProcs) {
$children = Get-CimInstance Win32_Process |
Where-Object { $_.ParentProcessId -eq $proc.Id -and
$_.Name -match 'cmd|powershell|pwsh|curl|wget' }
foreach ($c in $children) {
$report.Add([pscustomobject]@{
Check='ChildProcess'; Path=$c.ExecutablePath; Version=''
Status="ALERT: $($c.Name) spawned by Claude (PID $($proc.Id)) - CmdLine: $($c.CommandLine)"
})
}
}
# --- 3. Outbound connections from Claude to non-Anthropic IPs ---
foreach ($proc in $claudeProcs) {
$conns = Get-NetTCPConnection -OwningProcess $proc.Id -State Established
foreach ($conn in $conns) {
$dns = (Resolve-DnsName $conn.RemoteAddress -ErrorAction SilentlyContinue |
Select-Object -First 1).NameHost
if ($dns -and $dns -notmatch 'anthropic|claude\.ai|github|npmjs|pypi') {
$report.Add([pscustomobject]@{
Check='Network'; Path=$conn.RemoteAddress; Version=$conn.RemotePort
Status="ALERT: non-standard destination ($dns)"
})
}
}
}
# --- 4. Recent access to credential files (possible staging) ---
$credTargets = @("$env:USERPROFILE\.ssh", "$env:USERPROFILE\.aws")
foreach ($t in $credTargets) {
if (Test-Path $t) {
Get-ChildItem $t -Recurse | Where-Object {
$_.LastAccessTime -gt (Get-Date).AddDays(-3)
} | ForEach-Object {
$report.Add([pscustomobject]@{
Check='CredAccess'; Path=$_.FullName; Version=''
Status="Accessed $($_.LastAccessTime) - correlate with process logs"
})
}
}
}
$report | Format-Table -AutoSize
$report | Export-Csv "$env:TEMP\sneakpeek_check_$(Get-Date -Format yyyyMMdd_HHmmss).csv" -NoTypeInformation
For macOS/Linux developer endpoints, an equivalent Bash audit:
#!/usr/bin/env bash
# Security Arsenal - SneakPeek exposure audit (macOS/Linux)
MIN_VERSION="REPLACE_WITH_CURRENT_VENDOR_RELEASE" # set from Anthropic release notes
echo "=== Claude Code Desktop version ==="
if command -v claude >/dev/null 2>&1; then
claude --version
else
echo "claude binary not in PATH; check app bundle"
fi
echo -e "\n=== Claude processes and children ==="
pgrep -af -i claude
for pid in $(pgrep -i claude); do
pgrep -P "$pid" -l | grep -Ei 'sh|bash|zsh|curl|wget|python' && \
echo "ALERT: shell/network child under Claude PID $pid"
done
echo -e "\n=== Established connections from Claude ==="
lsof -nP -iTCP -sTCP:ESTABLISHED 2>/dev/null | grep -i claude
echo -e "\n=== Credential files accessed in last 72h ==="
find ~/.ssh ~/.aws -type f -atime -3 2>/dev/null -exec ls -la {} \;
echo -e "\n=== OAuth/token caches ==="
ls -la ~/.claude* ~/.config/claude* 2>/dev/null
Remediation
-
Update Claude Code Desktop immediately. Apply the latest release from Anthropic's official distribution channel. Do not rely on in-app auto-update alone on developer machines — push the update through your software management tooling and verify version parity across the fleet. Monitor Anthropic's official security bulletins and release notes for the patched build number addressing the preview-pane flaw.
-
Disable or restrict the preview pane where operationally feasible until the patch is confirmed deployed. If the application offers a setting to suppress automatic content rendering/previews, enforce it. Where it doesn't, instruct developers to avoid opening untrusted repositories, shared snippets, or external documentation in the desktop app until patched.
-
Rotate exposed credentials on any potentially affected endpoint. If Claude Code Desktop was in use on a machine that opened untrusted content before patching, assume exposure and rotate:
- SSH private keys (deploy new keypairs, remove old public keys from
authorized_keysacross infrastructure) - AWS access keys (deactivate and reissue; audit CloudTrail for anomalous
AssumeRole,CreateAccessKey, or console logins) - Claude/Anthropic OAuth tokens (revoke active sessions and re-authenticate)
- SSH private keys (deploy new keypairs, remove old public keys from
-
Reduce the blast radius structurally. This class of flaw recurs across developer tooling. Harden the credential posture of developer workstations now:
- Move AWS authentication to short-lived credentials via IAM Identity Center / SSO instead of static keys in
~/.aws/credentials - Require SSH keys be passphrase-protected and loaded only via ssh-agent, or better, use hardware-backed keys (FIDO2/YubiKey) so private material never sits as a readable file
- Enforce egress filtering on developer VLANs — a desktop AI tool has no business reaching arbitrary internet destinations; allowlist Anthropic, package registries, and approved MCP endpoints
- Move AWS authentication to short-lived credentials via IAM Identity Center / SSO instead of static keys in
-
Deploy the detections above and run retroactive hunts over the last 30 days of telemetry. Look specifically for Claude processes touching credential stores or connecting to unfamiliar destinations — these are low-noise, high-signal indicators.
-
Extend this lesson to your AI-tool governance. Inventory every AI assistant, agent, and MCP integration in your environment. Each one is a privileged execution surface with credential access. Your acceptable-use policy and vendor risk process should now explicitly cover AI tooling, and your SOC should have process/network baselines for each approved tool.
Bottom Line
'SneakPeek' is a textbook example of the emerging AI-toolchain threat surface: a convenience feature (the preview pane) becoming a zero-click credential-theft primitive aimed squarely at developers. The defenders who get ahead of this are the ones who treat AI coding assistants as what they are — privileged, network-connected, credential-adjacent software that demands the same hardening, monitoring, and patching discipline as any other high-risk endpoint application. Patch, hunt, rotate, and architect your credential posture so that the next rendering bug in the next AI tool has nothing to steal.
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.