CVE-2026-75857

CVE-2026-75857 is a high-severity improper privilege management vulnerability in deepseek-tui (rust), affecting versions >= 0.3.10, <= 0.8.41. It is fixed in 0.8.41, 0.8.64.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

CodeWhale: execshellinteract sends LLM-controlled input to a running shell without an approval prompt (privilege escalation)

Maintainer resolution

The CodeWhale maintainers validated this report. The affected package ranges are recorded in the advisory metadata. Version 0.8.64 contains the fix in commit 57f3c89471e27ac4032d9791f6885e5d4408c381. Users should upgrade to 0.8.64 or later. The original reporter analysis is preserved below.

exec_shell is correctly approval-gated. Its sibling exec_shell_interact returns ApprovalRequirement::Auto, so when the model writes input into a shell the user already approved (a python3 -i REPL, mysql, ssh, sudo -i, etc.), no prompt fires. Inside those processes, "stdin" is the command surface, so the model gets to run commands at whatever privilege that process holds. The user approved opening the shell once, for a stated purpose; the input that then runs in it is chosen by the model, and can be steered by any prompt injection the agent ingests afterward.

Details

The vulnerability requires two ordinary preconditions: shell tools are enabled (the normal config for using CodeWhale as a coding agent), and the session already has one approved long-running interactive process. After that, any untrusted content the agent reads can drive a exec_shell_interact call.

crates/tui/src/tools/shell.rs:2834-2910:

fn capabilities(&self) -> Vec<ToolCapability> {
    vec![ToolCapability::ExecutesCode]
}

fn approval_requirement(&self) -> ApprovalRequirement {
    ApprovalRequirement::Auto          // overrides the Required-for-ExecutesCode default
}

async fn execute(&self, input: Value, context: &ToolContext) -> Result<ToolResult, ToolError> {
    let task_id = required_task_id(&input)?;
    let close_stdin = optional_bool(&input, "close_stdin", false);
    let interaction_input = input
        .get("input").or_else(|| input.get("stdin")).or_else(|| input.get("data"))  // LLM-controlled
        .and_then(serde_json::Value::as_str).unwrap_or("");
    {
        let mut manager = context.shell_manager.lock()...;
        if !interaction_input.is_empty() || close_stdin {
            manager.write_stdin(task_id, interaction_input, close_stdin)...;          // no prompt
        }
    }
    ...
}

Same gate as the rlm_eval finding: the Auto at approval_requirement() makes approval_required false at engine.rs:845, so the --approval-policy is never consulted for the stdin write. The trait default at spec.rs:632 would have been Required. The tool is registered unconditionally (registry.rs:527), and an alias exec_interact on the same struct is registered at registry.rs:530, so a fix must cover both names (it does, since they share ShellInteractTool).

PoC

  1. User asks the agent to open a REPL; the model calls exec_shell command="python3 -i"; the user sees and approves it once.
  2. Later in the session, untrusted content (a fetched page, an MCP result, a repo AGENTS.md) instructs the model to send a payload to the open REPL.
  3. The model calls exec_shell_interact task_id=<repl> input="import os; os.system('...')\n". No prompt fires; Python runs it.

Driving the interactive TUI through a pty and scanning the output for an approval dialog shows the only Approval needed: lines are for the initial exec_shell; exec_shell_interact never produces one, while a sentinel file proves the injected input ran.

When the approved process is privileged, the reach scales with it: mysql -u root becomes arbitrary SQL, ssh host becomes commands on the remote host, sudo -i becomes root, none re-prompted.

Credit

sai-sh

Impact

Code or command execution inside an already-approved process, at that process's privilege level, with no prompt for the escalating input. Lower severity than the rlm_eval finding because it needs a prior user approval of an interactive shell, but higher reach when that shell is privileged.

The application assigns, modifies, tracks, or checks privileges incorrectly, allowing a user to gain elevated access. Typical impact: privilege escalation beyond the intended level.

CVE-2026-75857 has a CVSS score of 7.0 (High). The vector is requires local access, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.8.41, 0.8.64); upgrading removes the vulnerable code path.

Affected versions

deepseek-tui (>= 0.3.10, <= 0.8.41) deepseek-tui (>= 0.3.10, < 0.8.41) codewhale-tui (>= 0.8.41, < 0.8.64) codewhale (>= 0.8.41, < 0.8.64)

Security releases

deepseek-tui → 0.8.41 (npm) codewhale-tui → 0.8.64 (rust) codewhale → 0.8.64 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

deepseek-tui to 0.8.41 or later; codewhale-tui to 0.8.64 or later; codewhale to 0.8.64 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-75857? CVE-2026-75857 is a high-severity improper privilege management vulnerability in deepseek-tui (rust), affecting versions >= 0.3.10, <= 0.8.41. It is fixed in 0.8.41, 0.8.64. The application assigns, modifies, tracks, or checks privileges incorrectly, allowing a user to gain elevated access.
  2. How severe is CVE-2026-75857? CVE-2026-75857 has a CVSS score of 7.0 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-75857?
    • deepseek-tui (rust) (versions >= 0.3.10, <= 0.8.41)
    • codewhale-tui (rust) (versions >= 0.8.41, < 0.8.64)
    • codewhale (npm) (versions >= 0.8.41, < 0.8.64)
  4. Is there a fix for CVE-2026-75857? Yes. CVE-2026-75857 is fixed in 0.8.41, 0.8.64. Upgrade to this version or later.
  5. Is CVE-2026-75857 exploitable, and should I be worried? Whether CVE-2026-75857 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-75857 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-75857?
    • Upgrade deepseek-tui to 0.8.41 or later
    • Upgrade codewhale-tui to 0.8.64 or later
    • Upgrade codewhale to 0.8.64 or later

Stop the waste.
Protect your environment with Kodem.