HighVulnerabilityPatch available

Claude Code 2026 CVEs: approval-prompt bypass, sandbox symlink escape, Hugging Face exfiltration and the 50-subcommand deny-rule gap

Claude Code fixed CVEs in 2026 that let prompt injection skip approvals, escape the sandbox or leak data. Update to 2.1.163 or later; three CVEs were rejected.

Published
Updated
Fixed in
Claude Code 2.0.72, 2.1.64, 2.1.75 and 2.1.163 (per CVE)
Exploitation
No in-the-wild exploitation reported

Live scores

CVE-2026-24887
EPSS
0.006
low predicted chance of attack
VEDAS
0.048
little exploit evidence
On CISA KEV
Not listed
Detection rule
No public rule yet

Live scores

CVE-2026-39861
EPSS
0.007
low predicted chance of attack
VEDAS
0.044
little exploit evidence
On CISA KEV
Not listed
Detection rule
No public rule yet

Live scores

CVE-2026-35603
EPSS
0.001
low predicted chance of attack
VEDAS
0.054
little exploit evidence
On CISA KEV
Not listed
Detection rule
Out of scope (local)

Live scores

CVE-2026-54316
EPSS
0.005
low predicted chance of attack
VEDAS
0.055
little exploit evidence
On CISA KEV
Not listed
Detection rule
No public rule yet
EPSS (chance of attack)
100.1CVE-2026-54316 EPSS over time2026-082026-11-11
VEDAS (exploit evidence)
100.5CVE-2026-54316 VEDAS over time2026-082026-11-11

Thin horizontal line: the “likely exploited” threshold (EPSS 0.10, VEDAS 0.5). Shaded “no data” areas are periods when cve-scores did not publish.

Live scores

CVE-2026-35020
EPSS
0.001
low predicted chance of attack
VEDAS
0.047
little exploit evidence
On CISA KEV
Not listed
Detection rule
No public rule yet

Live scores

CVE-2026-35021
EPSS
0.000
low predicted chance of attack
VEDAS
0.047
little exploit evidence
On CISA KEV
Not listed
Detection rule
No public rule yet

Live scores

CVE-2026-35022
EPSS
0.006
low predicted chance of attack
VEDAS
0.050
little exploit evidence
On CISA KEV
Not listed
Detection rule
No public rule yet

What happened

Anthropic published several advisories for Claude Code in 2026. Each one needs an attacker to get text into Claude Code’s context, for example through a repository file, an issue, a web page or a tool result. The model then follows the text, and the bug lets that action skip a check it should have hit.

CVEFlawAffectedFixedRating
CVE-2026-24887Command parsing flaw lets a find command skip the approval prompt and run untrusted commandsbefore 2.0.722.0.72CVSS 4.0 7.7
CVE-2026-39861Sandboxed process creates a symlink out of the workspace; the unsandboxed app then writes through it without askingbefore 2.1.642.1.64CVSS 4.0 7.7
CVE-2026-35603Windows: system-wide config loaded from user-writable C:\ProgramData\ClaudeCode\before 2.1.752.1.75CVSS 4.0 5.4
CVE-2026-54316huggingface.co pre-approved for WebFetch, so injected text could leak data through download counts0.2.54 to before 2.1.1632.1.163CVSS 4.0 6.0

Sources: GHSA-qgqw-h4xq-7w8w, GHSA-vp62-r36r-9xqp, CVE-2026-35603, CVE-2026-54316.

  • CVE-2026-24887 was published on 3 February 2026. Exploiting it reliably required putting untrusted content into the context window (GitHub advisory).
  • CVE-2026-39861 was published on 20 April. Neither the sandboxed command nor the app could write outside the workspace on its own; together they could, which could lead to code execution outside the sandbox (GitHub advisory).
  • CVE-2026-35603 only matters on shared Windows machines. We cover it, and the same flaw in Cursor, Codex CLI and Gemini CLI, in a separate advisory.
  • CVE-2026-54316 was published on 23 June. Any path on huggingface.co was auto-approved for WebFetch. Novee showed it could leak an API key one character at a time through Hugging Face’s public download counter. Anthropic rates it CVSS 4.0 6.0; NVD assigned CVSS 3.1 9.1 (CVE record; The Hacker News). It was part of Novee’s CI research, covered in our CI advisory.

Rejected CVEs. CVE-2026-35020, CVE-2026-35021 and CVE-2026-35022 were published on 6 April 2026 for a command injection chain in the Claude Code CLI and Agent SDK. CVE-2026-35021 described file paths containing command substitution in the prompt editor utility (SentinelOne). VulnCheck, the CNA that issued them, rejected all three on 29 May. Its reasons: CVE-2026-35020 required an attacker to “already control arbitrary environment variables”; the CVE-2026-35021 code path “cannot be triggered through normal usage”; and the CVE-2026-35022 -p flag behavior is documented and intended (CVE-2026-35020; CVE-2026-35021; CVE-2026-35022). Some vulnerability databases still list them as live; we found no fixed version tied to them.

No CVE: deny rules skipped past 50 subcommands. Adversa found a hard-coded cap, MAX_SUBCOMMANDS_FOR_SECURITY_CHECK = 50, in bashPermissions.ts. For a command chaining more than 50 subcommands, Claude Code stopped enforcing deny rules and asked the user instead. Adversa’s proof of concept was 50 true commands followed by curl: Claude asked for approval instead of blocking curl. Adversa said a malicious CLAUDE.md could get the model to build such a command. The Register reported on 1 April that the issue “appears to have been fixed” in v2.1.90; Anthropic did not comment (The Register).

No CVE: single-quote stripping in the command validator. Novee found that the validator removed single-quoted text before its checks ran, so a payload in the value of git push --receive-pack reached the shell unchecked. No fixed version has been stated (The Hacker News).

Am I affected?

bash
# Installed version; you need 2.1.163 or later
claude --version
npm ls -g @anthropic-ai/claude-code

# Installs in projects, containers and CI images
npm ls @anthropic-ai/claude-code @anthropic-ai/claude-agent-sdk
grep -rnE '@anthropic-ai/claude-code(@|":)' Dockerfile* package.json .github/workflows/ 2>/dev/null

Check the settings that decide how much a bypass can do:

  • permissions.deny in ~/.claude/settings.json, .claude/settings.json and managed settings. Before about 2.1.90 these rules did not apply to commands longer than 50 subcommands.
  • WebFetch allow rules. Look for broad domain rules, such as whole hosting or file-sharing domains, that let fetched URLs carry data out without a prompt.
  • Permission-skipping modes in scripts and CI, such as --dangerously-skip-permissions. With them, approval-prompt bugs like CVE-2026-24887 no longer matter, because there is no prompt to bypass.
bash
grep -rnE 'dangerously-skip-permissions|bypassPermissions|WebFetch\(domain:' ~/.claude/settings.json .claude/ .github/workflows/ 2>/dev/null

What to do now

  1. Update to Claude Code 2.1.163 or later, for example npm install -g @anthropic-ai/claude-code@latest. Rebuild container images and CI runners that pin an older version (CVE-2026-54316).
  2. Do not count on deny rules alone in unattended runs. On versions before the 50-subcommand fix, an over-long command fell back to asking. In CI with permission prompts skipped, there is nobody to ask. Run CI agents in a container with no secrets they do not need and outbound network limited to what the job requires (The Register).
  3. Treat CLAUDE.md, .claude/ and other repository files from outsiders as untrusted input. Every CVE above starts with attacker text in the context window. Review those files before starting Claude Code in a repository you did not write.
  4. Remove broad WebFetch allow rules you added for convenience. CVE-2026-54316 shows that one pre-approved domain with user-controlled content is enough to leak data (CVE record).
  5. Do not chase the rejected CVEs. If a scanner flags CVE-2026-35020, CVE-2026-35021 or CVE-2026-35022, the records were rejected on 29 May 2026. Being on 2.1.163 or later is the action that matters.

Sources