CVE-2026-77474 Details
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.
A vulnerability in Destructive Command Guard (dcg) versions prior to 0.6.6 allows destructive shell commands to be executed by AI coding agents. This issue arises from a flaw in the command-substitution preprocessing, where nested or unclosed substitutions are recursively rescanned, leading to exponential-time processing. As a result, a crafted command containing a destructive action followed by approximately 30 nested substitutions can cause dcg to hang indefinitely. Since AI agents fail open when a hook times out, this allows the destructive command to be executed, bypassing the intended guard. The vulnerability has been confirmed on the v0.6.5 release binary.
Users can upgrade to Destructive Command Guard version 0.6.6, which fixes the vulnerability by eliminating the exponential-time command substitution handling that caused the hang. Instructions for downloading this version are available on the GitHub Releases page.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 16, 2026CISA-ADP
Assessed Oct 19, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/Dicklesworthstone/destructive_command_guard/commit/ba16bdd074b045329dc0ca6ec9a08c44403cfe1b | [email protected] | Source CodeVendor |
| https://github.com/Dicklesworthstone/destructive_command_guard/issues/189 | [email protected] | ExploitIssue TrackingTechnical DescriptionVendor |
| https://github.com/Dicklesworthstone/destructive_command_guard/releases/tag/v0.6.6 | [email protected] | Release NotesVendor |
| https://github.com/Dicklesworthstone/destructive_command_guard/security/advisories/GHSA-4cfr-w3v5-w5j5 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-400 | Uncontrolled Resource Consumption | [email protected] |
| CWE-407 | Inefficient Algorithmic Complexity | [email protected] |
| CWE-693 | Protection Mechanism Failure | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Dicklesworthstone destructive_command_guard | < 0.6.6 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 19, 2026 | CVE Modified | CISA-ADP |
| Oct 16, 2026 | New CVE Received | [email protected] |
Volerion