CVE-2026-77474
Received Received - Intake

destructive_command_guard Command Injection Vulnerability

Vulnerability report for CVE-2026-77474, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-16

Last updated on: 2026-10-16

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-16
Last Modified
2026-10-16
Generated
2026-10-16
AI Q&A
2026-10-16
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
Dicklesworthstone destructive_command_guard < 0.6.6

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-400 The product does not properly control the allocation and maintenance of a limited resource.
CWE-693 The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.
CWE-407 An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in destructive_command_guard (dcg) is a command-line safety tool that blocks destructive shell commands. Prior to version 0.6.6, crafted commands with nested or unclosed command substitutions like $( or $(( cause exponential-time processing during scanning. This leads to a denial-of-service where dcg hangs indefinitely, allowing destructive commands to bypass detection due to a fail-open design in AI coding agents.

Detection Guidance

To detect this vulnerability, check the installed version of destructive_command_guard (dcg) using the command: dcg --version. If the version is below 0.6.6, the system is vulnerable. Additionally, monitor for system hangs or excessive CPU usage when running commands with nested or unclosed command substitutions like $( or $((.

Impact Analysis

An attacker could craft a command with around 90 bytes of nested $( sequences to hang dcg, causing AI coding agents to fail open and execute destructive commands. This could lead to unauthorized file deletion, system modifications, or other harmful actions depending on the agent's permissions.

Compliance Impact

This vulnerability does not directly affect compliance with GDPR or HIPAA as it pertains to a command-line safety tool failing to block destructive shell commands. However, if destructive commands bypass the guard and execute, they could lead to unauthorized data access, modification, or deletion, potentially violating GDPR (data integrity/availability) or HIPAA (protected health information integrity). The fail-open behavior during resource exhaustion could result in non-compliance if destructive actions occur.

Mitigation Strategies

Upgrade destructive_command_guard to version 0.6.6 or later immediately. Use the command: pip install --upgrade destructive_command_guard. If upgrading is not possible, avoid running dcg on untrusted input or disable the tool until patched.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-77474. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart