Claude Code exposed for silent deny rule bypass: commands with more than 50 subcommands skip security checks
Critical Claude Code vulnerability: Deny rules silently bypassed because security checks cost too many tokens
Adversa AI disclosed a security policy bypass vulnerability in Claude Code: when a shell command contains more than 50 subcommands joined by &&, ||, or ;, bashPermissions.ts skips per-subcommand security analysis, including deny rule checks, and falls back to a generic confirmation prompt that can be automatically approved. The attack path is a malicious repository that writes over 50 seemingly normal build commands into CLAUDE.md, hiding a credential-stealing command in the 51st position; when a developer has Claude Code build the project, the deny rules do not trigger. The author's testing showed that running curl alone is blocked by deny rules, but after prepending 50 true no-ops, Claude Code prompts that it cannot check each command individually and asks whether to continue.
Disclosed the specific code path and exploitation chain where Claude Code silently skips deny rules when compound commands exceed 50 subcommands, allowing you to check your own agent permission configurations accordingly.