Exponential-time parsing in dcg lets commands bypass the guard
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service, Security bypass
- Confidentiality · integrity · availability
- None · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-400 and CWE-693.
Summary
destructive_command_guard (dcg) before 0.6.6 recursively rescans nested or unclosed command substitutions, which causes exponential-time work (CWE-407). A local attacker can submit a destructive command followed by crafted nested or unclosed $( or $(( sequences to hang the tool. A hung PreToolUse hook fails open, so the destructive command proceeds unchecked.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Dicklesworthstone | destructive_command_guard | before 0.6.6 | 0.6.6 | Patch available | CNA |
- destructive_command_guard VendorDicklesworthstone Affected before 0.6.6 Fixed in 0.6.6 Patch available CNA
Remediation
Upgrade destructive_command_guard to version 0.6.6, which fixes this issue.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
- Fix · CNA destructive_command_guard (Dicklesworthstone) Fixed in 0.6.6
Timeline
- 2026-10-16 Threatist record created from CVE-2026-77474
- 2026-10-18 Priority changed: MEDIUM → LOW
- 2026-10-19 CISA SSVC decision points changed
References
Other 4
- https://github.com/Dicklesworthstone/destructive_command_guard/security/advisories/GHSA-4cfr-w3v5-w5j5
- https://github.com/Dicklesworthstone/destructive_command_guard/issues/189
- https://github.com/Dicklesworthstone/destructive_command_guard/commit/ba16bdd074b045329dc0ca6ec9a08c44403cfe1b
- https://github.com/Dicklesworthstone/destructive_command_guard/releases/tag/v0.6.6
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences