CVE-2026-77474: dcg: Exponential-time command-substitution preprocessing lets a crafted command hang dcg and bypass the guard via hook-timeout fail-open

Published Oct 16, 2026
·
Updated

destructivecommandguard (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 splitcommandsegments 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.

Affected Software

1 affected component
dcg destructive_command_guard<0.6.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade dcg to a version that resolves this vulnerability.

    Fixed in 0.6.6

Event History

Oct 16, 2026
CVE Published
via MITRE·04:10 PM
Data Sourced
via MITRE·04:10 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Users of destructive_command_guard (dcg) versions before 0.6.6 are affected when dcg processes commands containing nested or unclosed command-substitution sequences such as $( or $((. The impact is particularly relevant where dcg runs as a PreToolUse hook and a hook timeout fails open.

2

What does an attacker need to trigger the bypass?

An attacker needs to cause dcg to inspect a command that includes a destructive command followed by nested or unclosed $( or $(( sequences. These sequences trigger repeated rescanning of the remaining command suffix, potentially hanging the hook until its timeout behavior allows the command to proceed.

3

Is there a fix?

Yes. The issue is fixed in dcg version 0.6.6.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203