A security vulnerability has been discovered in Claude Code, specifically affecting its guardrail functionality. When guardrail hooks designed to prevent dangerous commands like `rm -rf *` fail to execute, Claude Code proceeds to run the command anyway. This oversight was tested on Claude Code version 2.1.336 on Windows 11, where commands were executed even when the guardrail mechanism malfunctioned. The issue can be mitigated by adding the `"onFailure": "block"` setting to guardrail hook configurations, ensuring that any failure in the guardrail process halts the command execution. AI
IMPACT This vulnerability could lead to unintended data loss or system compromise if guardrails fail during critical operations.
RANK_REASON Identifies a specific flaw in a software product's security features.
Read on dev.to — Claude Code tag →
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →