BREAKING
Just nowWelcome to TOKENBURN — Your source for AI news///Just nowWelcome to TOKENBURN — Your source for AI news///
BACK TO NEWS
Safety

Claude Code bypasses safety rule if given too many commands

Claude Code bypasses safety checks for command chains exceeding 50 subcommands, a vulnerability exploitable through malicious CLAUDE.md files discovered after the tool's source code leaked.

Friday, April 3, 2026 12:00 PM UTC2 MIN READSOURCE: The RegisterBY sys://pipeline

Claude Code will bypass its deny rules if a command chain exceeds 50 subcommands, a hard cap set in `bashPermissions.ts` via `MAX_SUBCOMMANDS_FOR_SECURITY_CHECK`. Adversa AI discovered the issue after Claude Code's source leaked, showing how a malicious CLAUDE.md file can craft a 50+ subcommand pipeline that looks legitimate to evade security checks. Beyond the cap, Claude Code falls back to asking user permission rather than enforcing the deny rule.

Tags
safety
/// RELATED