Anthropic’s flagship AI coding agent, Claude Code, was just lately found to include a vital safety flaw that silently bypasses developer-configured security guidelines.
The vulnerability permits attackers to execute blocked instructions, akin to knowledge exfiltration scripts, by merely padding them with 50 or extra innocent subcommands.
Claude Code permits builders to configure “deny guidelines” to forestall the AI from working harmful actions like curl or rm.
The system’s legacy command parser stops evaluating these safety guidelines as soon as a compound command exceeds a hard-coded restrict of fifty subcommands.
As a substitute of safely blocking an excessively advanced command, the applying utterly skips the deny guidelines and falls again to a generic person immediate.
In steady integration pipelines or automated environments, this immediate may even auto-approve the execution.
This flaw leaves builders totally uncovered as a result of their configured protections are silently ignored with none warning.
Flaw Bypasses Person-Configured Safety Guidelines
The assault path for this vulnerability is sensible and targets on a regular basis software program engineering habits.
An attacker can publish a legitimate-looking open-source repository that features a poisoned CLAUDE.md configuration file. This configuration file acts as a set of trusted directions for the AI assistant.
The attacker can write construct directions containing 50 utterly regular duties, however secretly cover a malicious payload at place 51.
When a sufferer clones the repository and asks Claude Code to construct the venture, the AI generates the lengthy sequence of instructions.
As a result of the 50-command restrict is triggered, the deny guidelines fail to fireplace. The developer’s SSH keys, cloud platform credentials, or API tokens are then silently transmitted to the attacker’s server.
The foundation explanation for this vulnerability highlights a serious tradeoff in fashionable synthetic intelligence instruments. Checking each subcommand for safety violations consumes vital processing energy and costly AI tokens.
To forestall the person interface from freezing and to scale back compute prices, Anthropic engineers instituted the 50-command restrict.
Surprisingly, a safer code parsing mechanism that appropriately enforces deny guidelines for instructions of any size already existed inside Anthropic’s codebase.
Nonetheless, this improved model was not deployed to the general public builds that clients really use. The corporate primarily traded complete safety enforcement for sooner efficiency and decrease operational prices.
This incident demonstrates a structural problem for the AI agent trade, the place safety checks compete straight with core product performance for a similar sources.
Anthropic has now patched the vulnerability within the newly launched Claude Code v2.1.90, referring to the bug internally as a “parse-fail fallback deny-rule degradation”, as reported by Adversa AI.
For builders who haven’t but up to date, safety specialists advocate treating deny guidelines as totally unreliable.
Organizations ought to limit Claude Code’s shell entry to the bottom attainable privilege stage.
Moreover, builders should actively monitor for uncommon outbound community connections and manually audit any exterior repository’s configuration recordsdata earlier than working the AI assistant.
Observe us on Google Information, LinkedIn, and X to Get Instantaneous Updates and Set GBH as a Most popular Supply in Google.

