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

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.12%, higher than 2% of CVEs (2026-12-02)
- Published: 2026-10-16T16:10:57.120Z
- Modified: 2026-10-19T13:16:58.540Z
- Weaknesses: CWE-400, CWE-407, CWE-693
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Dicklesworthstone destructive_command_guard: < 0.6.6

## References

- <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

- CVE List: [CVE-2026-77474](https://www.cve.org/CVERecord?id=CVE-2026-77474), CVE Terms of Use, modified 2026-10-19
- NVD: [CVE-2026-77474](https://nvd.nist.gov/vuln/detail/CVE-2026-77474), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2026-77474 · Whole record: https://cve.day/CVE-2026-77474.json · Rebuilt by cve.day 2026-11-25T22:59:45.068Z
