{"vuln_id":"CVE-2026-83816","aliases":["GHSA-3mgh-93r5-r7jf","CVE-2026-45311"],"description":"CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE","published_at":"2026-11-16T19:17:53.433000Z","modified_at":"2026-11-19T23:00:36.642645Z","first_seen_at":"2026-11-21T19:15:19.387129Z","severity":"high","severity_source":"nvd","cvss_score":8.1,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","cwe":["CWE-78","CWE-863"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00606,"epss_percentile":0.49909,"nvd_status":"Received","enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-83816"},"matched_alias":null,"items":[{"id":10938,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-3mgh-93r5-r7jf: CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE","summary":"CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE\n\n### Maintainer resolution\n\nThe CodeWhale maintainers validated this report. CodeWhale 0.8.67 and earlier are affected. Version 0.9.0 contains the fix in commit 208421b9d23d81cea3311a1eeb2a2ea81d637686. Users should upgrade to 0.9.0 or later. The original reporter analysis is preserved below.\n\n## Summary\nThe interactive Agent profile of DeepSeek-TUI (CodeWhale) is explicitly documented to gate **every** shell command behind an approval prompt (config.rs:3725-3736). However, `ExecShellTool::approval_requirement_for(&tool_input)` downgrades the requirement from `Required` to `Auto` for any command the classifier deems \"parallel read-only\" (shell.rs:2314-2320). `registered_tool_approval_required` returns `false` for `Auto` **before** the `auto_approve` check runs (turn_loop.rs:37-38), so no prompt is shown even for a user who never enabled YOLO. The classifier `is_parallel_readonly_command` (command_safety.rs:389) rejects only shell metacharacters and then matches the flag-stripped base command name against an allowlist that includes `fd`, `rg`, and `git grep`. Those tools execute arbitrary external programs through documented flags (`fd -x/--exec`, `rg --pre`, `git grep --open-files-in-pager`) that need **no** shell metacharacters — yielding silent arbitrary-program execution in the default profile. Same silent-RCE class as CVE-2026-45311 (run_tests) but via a different, unpatched tool and code path.\n\n## Root Cause\n`approval_requirement_for` downgrades `exec_shell` to `Auto` when `exec_shell_input_is_parallel_readonly` returns true (shell.rs:2314-2320). The classifier strips all flags and matches the base command name against `PARALLEL_READONLY_PREFIXES` (command_safety.rs:363-385, 419-433). `fd`/`rg` are absent from `COMMAND_ARITY`, so `fd -x cp {} /tmp/exfil` canonicalizes to `\"fd\"` ∈ allowlist. The only remaining gate at the execute sink is `analyze_command`, which rates `fd`/`rg` as `Safe` (SAFE_COMMANDS command_safety.rs:527,530), so the `SafetyLevel::Dangerous`-only block (shell.rs:2408) never fires. Default execpolicy is empty (engine.rs:494) → Skip. Interactive-origin auto_review safety_floor holds only `Publish` (auto_review.rs:344-357), not interactive shell.\n\n## Impact\nArbitrary external program execution (any binary, any argv, including a repo-committed script) on the developer host, with no approval prompt, in the default interactive Agent profile — bypassing the boundary config.rs:3725-3736 explicitly promises. Identical outcome to seed CVE-2026-45311 via a different, unpatched tool.\n\n## Proof of Concept\nModel coerced (via indirect prompt injection from repo file / issue / fetched page — the seed threat model, in scope per SECURITY.md:48) to emit:\n```json\n{\"name\":\"exec_shell\",\"arguments\":{\"command\":\"fd -u -tf -x ./pwn.sh\"}}\n```\nAlternatives (all metachar-free, all auto-approved): `fd -tf -x cp {} /tmp/exfil`; `rg --pre /tmp/evil.sh --pre-glob '*' needle .`; `git grep --open-files-in-pager=/tmp/evil.sh needle`.\n\n## Attack Chain\n1. **Ent\n\nAffected: crates.io:codewhale-tui, npm:codewhale\n\nFixed in: 0.9.0\n\nReferences:\nhttps://github.com/codewhale-hq/Codewhale/security/advisories/GHSA-3mgh-93r5-r7jf\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-83816\nhttps://github.com/codewhale-hq/Codewhale/commit/208421b9d23d81cea3311a1eeb2a2ea81d637686\nhttps://github.com/codewhale-hq/Codewhale\nhttps://github.com/codewhale-hq/Codewhale/releases/tag/v0.9.0","url":"https://osv.dev/vulnerability/GHSA-3mgh-93r5-r7jf","published_at":"2026-11-19T22:48:14Z","updated_at":"2026-11-19T23:00:36.642645Z","fetched_at":"2026-11-21T19:15:55.946309Z","severity":"critical","cvss_score":9.6,"epss":0.00606,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"codewhale-tui","vuln_id":"CVE-2026-83816","vuln_ids":["CVE-2026-45311","CVE-2026-83816","GHSA-3MGH-93R5-R7JF"],"tags":["osv","crates.io","fix-available"],"cluster_id":2175,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10938","html":"https://vulnwatch.ve1ve2.com/item/10938"}},{"id":2372,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-3mgh-93r5-r7jf / CVE-2026-83816: CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE","summary":"CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE\n\n### Maintainer resolution\n\nThe CodeWhale maintainers validated this report. CodeWhale 0.8.67 and earlier are affected. Version 0.9.0 contains the fix in commit 208421b9d23d81cea3311a1eeb2a2ea81d637686. Users should upgrade to 0.9.0 or later. The original reporter analysis is preserved below.\n\n## Summary\nThe interactive Agent profile of DeepSeek-TUI (CodeWhale) is explicitly documented to gate **every** shell command behind an approval prompt (config.rs:3725-3736). However, `ExecShellTool::approval_requirement_for(&tool_input)` downgrades the requirement from `Required` to `Auto` for any command the classifier deems \"parallel read-only\" (shell.rs:2314-2320). `registered_tool_approval_required` returns `false` for `Auto` **before** the `auto_approve` check runs (turn_loop.rs:37-38), so no prompt is shown even for a user who never enabled YOLO. The classifier `is_parallel_readonly_command` (command_safety.rs:389) rejects only shell metacharacters and then matches the flag-stripped base command name against an allowlist that includes `fd`, `rg`, and `git grep`. Those tools execute arbitrary external programs through documented flags (`fd -x/--exec`, `rg --pre`, `git grep --open-files-in-pager`) that need **no** shell metacharacters — yielding silent arbitrary-program execution in the default profile. Same silent-RCE class as CVE-2026-45311 (run_tests) but via a different, unpatched tool and code path.\n\n## Root Cause\n`approval_requirement_for` downgrades `exec_shell` to `Auto` when `exec_shell_input_is_parallel_readonly` returns true (shell.rs:2314-2320). The classifier strips all flags and matches the base command name against `PARALLEL_READONLY_PREFIXES` (command_safety.rs:363-385, 419-433). `fd`/`rg` are absent from `COMMAND_ARITY`, so `fd -x cp {} /tmp/exfil` canonicalizes to `\"fd\"` ∈ allowlist. The only remaining gate at the execute sink is `analyze_command`, which rates `fd`/`rg` as `Safe` (SAFE_COMMANDS command_safety.rs:527,530), so the `SafetyLevel::Dangerous`-only block (shell.rs:2408) never fires. Default execpolicy is empty (engine.rs:494) → Skip. Interactive-origin auto_review safety_floor holds only `Publish` (auto_review.rs:344-357), not interactive shell.\n\n## Impact\nArbitrary external program execution (any binary, any argv, including a repo-committed script) on the developer host, with no approval prompt, in the default interactive Agent profile — bypassing the boundary config.rs:3725-3736 explicitly promises. Identical outcome to seed CVE-2026-45311 via a different, unpatched tool.\n\n## Proof of Concept\nModel coerced (via indirect prompt injection from repo file / issue / fetched page — the seed threat model, in scope per SECURITY.md:48) to emit:\n```json\n{\"name\":\"exec_shell\",\"arguments\":{\"command\":\"fd -u -tf -x ./pwn.sh\"}}\n```\nAlternatives (all metachar-free, all auto-approved): `fd -tf -x cp {} /tmp/exfil`; `rg --pre /tmp/evil.sh --pre-glob '*' needle .`; `git grep --open-files-in-pager=/tmp/evil.sh needle`.\n\n## Attack Chain\n1. **Ent\n\nAffected packages: npm:codewhale, rust:codewhale-tui\nPatched: codewhale-tui 0.9.0, codewhale 0.9.0","url":"https://github.com/advisories/GHSA-3mgh-93r5-r7jf","published_at":"2026-11-19T22:48:14Z","updated_at":"2026-11-19T22:48:14Z","fetched_at":"2026-11-21T19:15:18.416786Z","severity":"critical","cvss_score":9.6,"epss":0.00606,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"codewhale-tui","vuln_id":"CVE-2026-83816","vuln_ids":["CVE-2026-45311","CVE-2026-83816","GHSA-3MGH-93R5-R7JF"],"tags":["ghsa","npm","rust","CWE-78","CWE-863"],"cluster_id":2175,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2372","html":"https://vulnwatch.ve1ve2.com/item/2372"}},{"id":6249,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-83816: CodeWhale is a DeepSeek and MiMo coding agent for the terminal. Prior to 0.9.0, the ExecShellTool::approval_requirement_for path used is_parallel_readonly_comm…","summary":"CodeWhale is a DeepSeek and MiMo coding agent for the terminal. Prior to 0.9.0, the ExecShellTool::approval_requirement_for path used is_parallel_readonly_command to downgrade commands to automatic approval based on a flag-stripped command allowlist. The allowlist treated fd, rg, and git grep as read-only even when fd -x or fd --exec, rg --pre, or git grep --open-files-in-pager selected an external program. registered_tool_approval_required returned without displaying a prompt for that automatic classification, and the later command-safety check also treated the base utilities as safe. Attacker-controlled content that influenced an agent tool call could therefore cause arbitrary program execution on the developer host without the approval promised by the default interactive profile, resulting in unauthorized access, modification, or disruption. This issue is fixed in version 0.9.0.\n\nReferences:\nhttps://github.com/codewhale-hq/Codewhale/commit/208421b9d23d81cea3311a1eeb2a2ea81d637686\nhttps://github.com/codewhale-hq/Codewhale/releases/tag/v0.9.0\nhttps://github.com/codewhale-hq/Codewhale/security/advisories/GHSA-3mgh-93r5-r7jf","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-83816","published_at":"2026-11-16T19:17:53.433000Z","updated_at":"2026-11-16T22:18:25.607000Z","fetched_at":"2026-11-21T19:15:31.482024Z","severity":"high","cvss_score":8.1,"epss":0.00606,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-83816","vuln_ids":["CVE-2026-45311","CVE-2026-83816","GHSA-3MGH-93R5-R7JF"],"tags":["CWE-78","CWE-863"],"cluster_id":2176,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/6249","html":"https://vulnwatch.ve1ve2.com/item/6249"}}]}