### Maintainer resolution The 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. ##...
Full CISO analysis pending enrichment.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| DeepSeek TUI | npm | <= 0.8.67 | 0.9.0 |
| DeepSeek TUI | cargo | <= 0.8.67 | 0.9.0 |
How severe is it?
What is the attack surface?
What should I do?
Patch available
Update DeepSeek TUI to version 0.9.0
Update DeepSeek TUI to version 0.9.0
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Which compliance frameworks are affected?
Compliance analysis pending. Sign in for full compliance mapping when available.
Frequently Asked Questions
What is CVE-2026-83816?
### Maintainer resolution The 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. ## Summary The 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. ## Root Cause `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. ## Impact Arbitrary 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. ## Proof of Concept Model coerced (via indirect prompt injection from repo file / issue / fetched page — the seed threat model, in scope per SECURITY.md:48) to emit: ```json {"name":"exec_shell","arguments":{"command":"fd -u -tf -x ./pwn.sh"}} ``` Alternatives (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`. ## Attack Chain 1. **Entry.** Agent ingests attacker-controlled content; injected instruction coerces the model to emit `exec_shell {"command":"fd -u -tf -x ./pwn.sh"}`. - **Guard:** none — reading content and model tool-calls are by design (seed threat model: indirect prompt injection). - **Bypass proof:** n/a (in-scope by design per SECURITY.md:48). 2. **Gate — approval requirement.** turn_loop.rs:1738 → `spec.approval_requirement_for(&input)` → shell.rs:2314-2320 `exec_shell_input_is_parallel_readonly`. - **Guard:** metachar filter (command_safety.rs:394-400) + base-name allowlist. - **Bypass proof:** the string contains none of `; & | > < \` $(` or newlines; `-x <program> <args>` is `fd`'s own exec mechanism (no shell). `classify_command` strips `-u -tf -x`, positionals `[fd, ./pwn.sh]`; `fd` ∉ `COMMAND_ARITY` → canonical `"fd"` ∈ `PARALLEL_READONLY_PREFIXES` → returns true. Maintainer test `parallel_readonly_command_classifier_is_strict` (command_safety.rs:1162+) confirms bare `fd`/`rg` classify parallel-readonly. 3. **Gate — prompt decision.** `registered_tool_approval_required(name, Auto, auto_approve)`. - **Guard:** the approval prompt itself. - **Bypass proof:** `requirement == Auto` returns `false` at turn_loop.rs:37-38 unconditionally, before `!auto_approve`. No prompt regardless of user settings. Empty execpolicy → Skip; interactive safety_floor returns NoChange for fd. 4. **Sink.** `ExecShellTool::execute` (shell.rs:2334) → `analyze_command`. - **Guard:** `SafetyLevel::Dangerous` block (shell.rs:2408). - **Bypass proof:** `fd` ∈ `SAFE_COMMANDS` (command_safety.rs:530) → `analyze_command` returns `Safe`; not `Dangerous` → not blocked. Child runs the attacker's program. 5. **Impact.** Silent arbitrary-program execution on the developer host, no approval prompt, default interactive Agent profile. ## Bypass Evidence - Present on latest release tag v0.8.67: turn_loop.rs:37-38 `Auto`→`return false`; shell.rs:2314-2320 override; command_safety.rs allowlist includes `"rg"`,`"fd"`,`"git grep"`; SAFE_COMMANDS includes `"rg"`,`"fd"`; `fd`/`rg` absent from `COMMAND_ARITY`. command_safety.rs / turn_loop.rs finding-critical functions byte-identical v0.8.67↔HEAD. - Maintainer's own test `parallel_readonly_command_classifier_is_strict` confirms bare `rg`/`fd` classify parallel-readonly and only metachar forms are rejected. ## Affected Versions `<= 0.8.67` (present on latest release tag v0.8.67 and HEAD 6a3403e). ## Suggested Fix Remove exec-capable tools (`fd`, `rg`, `git grep`) from `PARALLEL_READONLY_PREFIXES`, or make the classifier reject their exec flags (`-x`/`--exec`, `--pre`, `--open-files-in-pager`), so a code-executing invocation cannot be auto-approved as read-only. Reported by **zx (Jace)**
Is CVE-2026-83816 actively exploited?
No confirmed active exploitation of CVE-2026-83816 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-83816?
Update to patched version: DeepSeek TUI 0.9.0, DeepSeek TUI 0.9.0.
What is the CVSS score for CVE-2026-83816?
CVE-2026-83816 has a CVSS v3.1 base score of 8.1 (HIGH). The EPSS exploitation probability is 0.61%.
What are the technical details?
Original Advisory
### Maintainer resolution The 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. ## Summary The 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. ## Root Cause `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. ## Impact Arbitrary 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. ## Proof of Concept Model coerced (via indirect prompt injection from repo file / issue / fetched page — the seed threat model, in scope per SECURITY.md:48) to emit: ```json {"name":"exec_shell","arguments":{"command":"fd -u -tf -x ./pwn.sh"}} ``` Alternatives (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`. ## Attack Chain 1. **Entry.** Agent ingests attacker-controlled content; injected instruction coerces the model to emit `exec_shell {"command":"fd -u -tf -x ./pwn.sh"}`. - **Guard:** none — reading content and model tool-calls are by design (seed threat model: indirect prompt injection). - **Bypass proof:** n/a (in-scope by design per SECURITY.md:48). 2. **Gate — approval requirement.** turn_loop.rs:1738 → `spec.approval_requirement_for(&input)` → shell.rs:2314-2320 `exec_shell_input_is_parallel_readonly`. - **Guard:** metachar filter (command_safety.rs:394-400) + base-name allowlist. - **Bypass proof:** the string contains none of `; & | > < \` $(` or newlines; `-x <program> <args>` is `fd`'s own exec mechanism (no shell). `classify_command` strips `-u -tf -x`, positionals `[fd, ./pwn.sh]`; `fd` ∉ `COMMAND_ARITY` → canonical `"fd"` ∈ `PARALLEL_READONLY_PREFIXES` → returns true. Maintainer test `parallel_readonly_command_classifier_is_strict` (command_safety.rs:1162+) confirms bare `fd`/`rg` classify parallel-readonly. 3. **Gate — prompt decision.** `registered_tool_approval_required(name, Auto, auto_approve)`. - **Guard:** the approval prompt itself. - **Bypass proof:** `requirement == Auto` returns `false` at turn_loop.rs:37-38 unconditionally, before `!auto_approve`. No prompt regardless of user settings. Empty execpolicy → Skip; interactive safety_floor returns NoChange for fd. 4. **Sink.** `ExecShellTool::execute` (shell.rs:2334) → `analyze_command`. - **Guard:** `SafetyLevel::Dangerous` block (shell.rs:2408). - **Bypass proof:** `fd` ∈ `SAFE_COMMANDS` (command_safety.rs:530) → `analyze_command` returns `Safe`; not `Dangerous` → not blocked. Child runs the attacker's program. 5. **Impact.** Silent arbitrary-program execution on the developer host, no approval prompt, default interactive Agent profile. ## Bypass Evidence - Present on latest release tag v0.8.67: turn_loop.rs:37-38 `Auto`→`return false`; shell.rs:2314-2320 override; command_safety.rs allowlist includes `"rg"`,`"fd"`,`"git grep"`; SAFE_COMMANDS includes `"rg"`,`"fd"`; `fd`/`rg` absent from `COMMAND_ARITY`. command_safety.rs / turn_loop.rs finding-critical functions byte-identical v0.8.67↔HEAD. - Maintainer's own test `parallel_readonly_command_classifier_is_strict` confirms bare `rg`/`fd` classify parallel-readonly and only metachar forms are rejected. ## Affected Versions `<= 0.8.67` (present on latest release tag v0.8.67 and HEAD 6a3403e). ## Suggested Fix Remove exec-capable tools (`fd`, `rg`, `git grep`) from `PARALLEL_READONLY_PREFIXES`, or make the classifier reject their exec flags (`-x`/`--exec`, `--pre`, `--open-files-in-pager`), so a code-executing invocation cannot be auto-approved as read-only. Reported by **zx (Jace)**
Weaknesses (CWE)
CWE-78Improper Neutralization of Special Elements used in an OS CommandPrimaryCWE-863Incorrect AuthorizationPrimaryCWE-78 — Improper Neutralization of Special Elements used in an OS Command: The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command before it is sent to a downstream component.
- [Architecture and Design] If at all possible, use library calls rather than external processes to recreate the desired functionality.
- [Architecture and Design, Operation] Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HReferences
Timeline
Related Vulnerabilities
CVE-2026-453119.6deepseek-tui: prompt injection enables zero-approval RCE
Same package: deepseek-tuiCVE-2026-759139.3CodeWhale: git_show argument injection enables file write
Same package: deepseek-tuiCVE-2026-758568.6deepseek-tui: SSRF via DNS-pinning TOCTOU bypass
Same package: deepseek-tuiCVE-2026-758587.8CodeWhale: rlm_eval RCE bypasses approval policy
Same package: deepseek-tuiCVE-2026-759117.8CodeWhale: repo config silently enables shell RCE
Same package: deepseek-tui