CVE-2026-77474
7.1HighPublished 16 Oct 2026 · NVD status: Deferred · AI triage by gemini-3.8-flash
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
- Impact
- High impact on integrity, availability
- Weakness
- CWE-400, CWE-407, CWE-693
Impact
Attackers can bypass the safety guard and execute destructive commands via AI coding agents. To trigger it, an attacker needs to pass a command containing nested or unclosed substitution sequences that tricks the tool into hanging and failing open.
Root cause
Nested or unclosed command substitutions trigger exponential-time rescanning in split_command_segments, causing the pre-tool execution hook to hang and fail open.
Affected systems
destructive_command_guard prior to 0.6.6
CVSS v3.1 · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Fix & remediation
Upgrade destructive_command_guard to version 0.6.6 or later. No interim configuration mitigation is specified, so disable automated execution of uninspected AI tool calls until upgraded.
$ cargo install destructive_command_guard --version '>=0.6.6'AI-suggested. Run it in staging first and check it against the vendor advisory. Why?
NVD description
destructive_command_guard (dcg) is a command-line safety tool that blocks destructive shell commands before AI coding agents run them. Prior to 0.6.6, nested or unclosed substitutions are recursively rescanned after an inner scan returns unterminated, producing exponential-time work. The affected scanners are reached through split_command_segments in src/packs/mod.rs. a destructive command followed by nested or unclosed $( or $(( sequences. nested or unclosed $( and $(( sequences cause repeated rescanning of the remaining command suffix. a hung PreToolUse hook fails open, allowing the destructive command to proceed. This issue is fixed in version 0.6.6.
References
- https://github.com/Dicklesworthstone/destructive_command_guard/commit/ba16bdd074b045329dc0ca6ec9a08c44403cfe1b
- https://github.com/Dicklesworthstone/destructive_command_guard/issues/189
- https://github.com/Dicklesworthstone/destructive_command_guard/releases/tag/v0.6.6
- https://github.com/Dicklesworthstone/destructive_command_guard/security/advisories/GHSA-4cfr-w3v5-w5j5