Skip to main content

destructive_command_guard CVE-2026-77474

| EUVDEUVD-2026-102919 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-10-16 GitHub_M
7.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft destructive command with nested/unclosed $(
  2. Delivery
    Feed to AI agent PreToolUse hook
  3. Exploit
    Scanner recursively rescans suffix, hangs
  4. Execution
    Hook times out and fails open
  5. Impact
    Destructive command executes unguarded

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires dcg (versions prior to 0.6.6) to be deployed as a PreToolUse guard hook for an AI coding agent, and the hook must be configured/operate in a fail-open manner on timeout - which the description states is the case. The triggering input must reach the split_command_segments scanners in src/packs/mod.rs and contain a destructive command combined with nested or unclosed $( or $(( substitution sequences that cause repeated rescanning of the command suffix. Limiting factors that reduce realistic risk: the command must actually be submitted/executed (CVSS UI:R), the vector is local (the attacker influences the command text rather than acting over a network), exploitation depends on the fail-open-on-hang behavior, and only versions before 0.6.6 are affected.

Impact

This is a security-control-bypass issue dressed as a denial-of-service (CWE-400). The real danger is not the hang itself but its consequence: dcg is a PreToolUse guard that blocks destructive shell commands for AI coding agents, and when nested/unclosed $( or $(( sequences trigger exponential-time rescanning in the split_command_segments scanners, the hook hangs and fails open - so a destructive command (e.g. rm -rf) proceeds unguarded. The provided CVSS 3.1 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H, 7.1) is internally consistent: local attack surface (command text fed to the tool), no privileges, but requiring the command to actually be executed (UI:R), with high integrity/availability impact and no confidentiality impact - which matches a destructive-command bypass rather than data theft. Weighing all signals: no CISA KEV listing, no public exploit identified, no EPSS score supplied, and the affected product is an obscure individual open-source project, so widespread opportunistic exploitation is unlikely. The practical threat model is narrow but meaningful - a prompt-injected or malicious agent crafting a command that is simultaneously destructive and guard-evading - making this a real but context-dependent priority rather than a broad emergency. No key signals conflict; the main gap is the absence of EPSS/KEV/POC data, which is an absence rather than a contradiction.

Exploit ScenarioDerived

An AI coding agent is manipulated (e.g. via prompt injection) into proposing a destructive shell command padded with nested or unclosed $( / $(( sequences. When dcg's PreToolUse hook scans it, the scanner recursively rescans the command suffix in exponential time and hangs; the hook times out and fails open, so the destructive command executes without being blocked. No public exploit code was identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 16, 2026

Algorithmic resource exhaustion in destructive_command_guard (dcg) versions prior to 0.6.6 lets a crafted shell command - a destructive command followed by nested or unclosed $( or $(( substitution sequences - trigger exponential-time rescans in the split_command_segments scanners (src/packs/mod.rs), hanging the process. Because dcg runs as a PreToolUse guard hook for AI coding agents and that hook fails open on timeout, the hang does not block the command but instead allows the destructive command to be executed - turning a denial-of-service bug (CWE-400) into a safety-control bypass with high integrity impact. The issue is rated 7.1 (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H), indicating a local attack path with no privileges required but requiring user interaction (the command must actually be submitted), and the fix is the vendor-released version 0.6.6; no public exploit code was identified at time of analysis and the CVE is not in CISA KEV.

RemediationAI

Vendor-released patch: upgrade to destructive_command_guard 0.6.6 (https://github.com/Dicklesworthstone/destructive_command_guard/releases/tag/v0.6.6), which contains the fix commit ba16bdd074b045329dc0ca6ec9a08c44403cfe1b and eliminates the exponential rescans; see the advisory at https://github.com/Dicklesworthstone/destructive_command_guard/security/advisories/GHSA-4cfr-w3v5-w5j5. If upgrading is not immediately possible, the most effective compensating control is to configure the agent's PreToolUse hook to fail closed rather than fail open on timeout - accepting the trade-off that legitimate long-running commands may then be blocked or require manual approval, which is precisely the behavior the fail-open default was avoiding. Additionally, constrain the hook's wall-clock deadline to a short bounded timeout so a pathological command degrades to a fast refusal instead of a hang, and restrict or strip nested/unclosed $( and $(( substitutions from command text before it reaches the scanner (a wrapper or pre-filter), with the trade-off that such filtering can be bypassed by other shell syntaxes and may break legitimate commands using command substitution. Where feasible, reduce the guard's input surface by limiting command length and segment count. Note that no public exploit code was identified at time of analysis and the CVE is not listed in CISA KEV, so prioritization should be driven by whether dcg is deployed as a fail-open hook in an environment where untrusted or agent-generated commands are executed.

Affected VersionsENISA

destructive_command_guard < 0.6.6

Affected Packages

euvd destructive_command_guard fix: 0.6.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

dcg is a Rust command-line safety tool that intercepts and blocks destructive shell commands before AI coding agents run them; it is deployed as a PreToolUse hook. The vulnerable code path is reached through split_command_segments in src/packs/mod.rs, which decomposes a command line into segments and dispatches each to scanner packs. When a segment contains nested or unclosed $( or $(( command-substitution sequences, an inner scan returns unterminated and the remaining command suffix is recursively rescanned, so the work grows exponentially with the number of nested/unclosed substitutions rather than linearly - the classic CWE-400 uncontrolled-resource-consumption pattern of unbounded recursion on attacker-influenced input. The upstream fix landed in commit ba16bdd074b045329dc0ca6ec9a08c44403cfe1b and was released as v0.6.6; the accompanying commit also touched allowlist/project-path scoping (issue #186) and pack legend rendering (#187), indicating a maintenance release in which this hardening was bundled. The CPE cpe:2.3:a:dicklesworthstone:destructive_command_guard:*:*:*:*:*:*:*:* with a wildcard version confirms all prior releases are in scope, and the security impact is amplified by the hook's fail-open behavior on timeout: the guard process being stuck means the safety decision is never returned, and the agent proceeds with the destructive command.

Know when Destructive Command Guard gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.1 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
vuln.today AI 7.1 HIGH

Attacker supplies local command text (AV:L) with no privileges (PR:N); the guarded command must be run (UI:R); bypass lets a destructive command execute, giving high integrity/availability impact and no confidentiality impact.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Oct 16, 2026 - 17:17 EUVD
CVE Published
Oct 16, 2026 - 16:10 cve.org
HIGH 7.1

DescriptionCVE.org

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.

Technical POC Analysis

Note on evidence: the supplied material is the GHSA advisory (GHSA-4cfr-w3v5-w5j5) only.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A flaw in destructive_command_guard (dcg), the safety hook that screens shell commands issued by AI coding agents, causes the guard to hang and then fail open - allowing the destructive commands it is designed to block to execute. Any team running dcg versions earlier than 0.6.6 in agent tooling or CI automation is affected, and because the control fails silently, resulting data loss or system damage may not surface until long after the fact. This is a direct integrity failure of a security control rather than a conventional outage, and the vendor-released fix in version 0.6.6 makes it a fast, low-cost remediation.

Business Impact: High
Compensating Controls

Apply vendor patch: upgrade to dcg 0.6.6 or later. Until upgraded, disable or gate autonomous shell execution by AI coding agents, require human approval for commands containing nested or unclosed $( or $(( sequences, and change the PreToolUse hook timeout behavior to fail closed so a hung guard blocks rather than permits the command.

Threat Intelligence Overview

Prevalence
Rare
obscure individual open-source CLI tool, tiny production footprint
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy