Loading...
Skip to main content

CVE-2026-75858 — Vulnerability in deepseek-tui — CVE Details

HIGH

CodeWhale: rlm_eval auto-approves arbitrary Python execution, bypassing the user's approval policy (RCE)

Published September 4, 2026Updated September 4, 2026Source: osv

Summary

### 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. ### Summary The `rlm_eval` tool runs an arbitrary Python string chosen by the model in a real `python3` interpreter. Its `approval_requirement()` returns `ApprovalRequirement::Auto`, which the engine treats as "never prompt," regardless of the user's configured `--approval-policy`. A single tool call — which prompt injection from any untrusted content the agent reads (a web page, a fetched URL, a repo file, an MCP tool result) can induce — runs code on the user's machine at the user's privilege with no prompt and no audit step. This is the same defect that was already patched on the sibling `run_tests` tool (CVE-2026-45311); the fix never reached `rlm_eval` or `rlm_open`, which expose a broader surface (full Python on the host, not just `cargo test`). ### Details `rlm_eval`'s `execute()` reads the LLM-controlled `code` field and runs it (`crates/tui/src/tools/rlm.rs:215-300`): ```rust fn capabilities(&self) -> Vec<ToolCapability> { vec![ToolCapability::Network, ToolCapability::ExecutesCode] } fn approval_requirement(&self) -> ApprovalRequirement { ApprovalRequirement::Auto // overrides the safe default below } async fn execute(&self, input: Value, context: &ToolContext) -> Result<ToolResult, ToolError> { let name = required_non_empty_str(&input, "name")?; let code = required_non_empty_str(&input, "code")?; // LLM-controlled ... let round = kernel.run(code, Some(&bridge)).await... // runs that code in python3 ``` The trait default at `crates/tui/src/tools/spec.rs:632-633` would have returned `Required` for any tool whose capabilities include `ExecutesCode`. `rlm_eval` deliberately overrides that to `Auto`. The engine's approval gate (`crates/tui/src/core/engine.rs:845`) is two AND-ed conditions, and a per-tool `Auto` makes the first one false: ```rust let approval_required = spec.approval_requirement() != ApprovalRequirement::Auto && !registry.context().auto_approve; ``` When `approval_requirement()` is `Auto`, `approval_required` is `false`, no `Event::ApprovalRequired` is emitted, and the user's `--approval-policy` (`on-request`, `unless-trusted`, `never`) is never consulted. The companion tool `rlm_open` (`rlm.rs:142-143`, same `Auto`, capabilities include `ExecutesCode` + `Network`) spawns the same Python kernel via `PythonRuntime::spawn_with_context` (`rlm.rs:181`) and can stage a `content` string, a `file_path` read, or a `url` fetch into the kernel before `rlm_eval` runs against it. Both tools are registered unconditionally by the default registry (`crates/tui/src/tools/registry.rs:802-803`); there is no flag to disable them. ### PoC Source-level reproduction. Point a provider's `base_url` at a local mock that returns canned `tool_calls`, then have the agent call `rlm_open` followed by `rlm_eval` with a `code` payload such as: ```python import os, getpass, socket open('/tmp/pwned_by_rlm_eval','w').write(getpass.getuser()+'@'+socket.gethostname()+':'+os.getcwd()) ``` Run it through the non-interactive path (`codewhale exec --auto`) to confirm the tool executes, and through the plain interactive TUI under `--approval-policy on-request` (no `--auto`, no `--yolo`) to confirm no approval dialog appears. The sentinel file is written either way; the interactive run is the one that proves the policy is bypassed rather than waived. ### Impact Unsandboxed code execution on the user's workstation at the user's UID: read SSH keys, cloud credentials, `~/.codewhale/auth.json`, and other secrets; write to shell rc files or `authorized_keys` for persistence; spawn subprocesses; reach the network. No filesystem, network, or process sandbox is applied to the spawned interpreter. Reachable with user interaction (running the agent over attacker-influenced content), no further prompt. ### Credit [sai-sh](https://github.com/sai-sh)

Advisory Timeline

  • First published September 4, 2026 (38 days ago).
  • Last revised September 4, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update deepseek-tui to 0.8.41 or later
npm install deepseek-tui@0.8.41
npm
Update codewhale to 0.8.64 or later
npm install codewhale@0.8.64
Cargo
Update codewhale-tui to 0.8.64 or later
cargo update -p codewhale-tui --precise 0.8.64

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (4)

Affects 2 ecosystems: crates.io (2), npm (2).

PackageEcosystemAffectedFixed In
deepseek-tui
npm
All versions0.8.41
deepseek-tui
crates.io
All versionsRange-based data available
codewhale
npm
All versions0.8.64
codewhale-tui
crates.io
All versions0.8.64

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-862
    Missing AuthorizationMITRE
  • CWE-94
    Code InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.8 score means for each attack dimension.

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-75858?
CodeWhale: rlm_eval auto-approves arbitrary Python execution, bypassing the user's approval policy (RCE) This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.8/10).
How do I check if my project is affected by CVE-2026-75858?
CVE-2026-75858 affects deepseek-tui, codewhale and codewhale-tui. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-75858 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.8

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-wrj3-vj8c-784f

Related CVEs

  • CVE-2026-75856
    CRITICAL

    CodeWhale: SSRF bypass - TOCTOU on DNS failure for DNS pinning

  • CVE-2026-75859
    HIGH

    CodeWhale: Project config `instructions` override enables arbitrary file read into AI system prompt via cloned repository

  • CVE-2026-75913
    HIGH

    CodeWhale: Argument Injection in `git_show` Tool Allows Arbitrary File Write Without Approval

  • CVE-2026-75912
    HIGH

    CodeWhale: Argument Injection in `git_blame` Tool Allows Arbitrary File Read Without Approval

  • CVE-2026-75857
    HIGH

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

  • CVE-2026-75911
    HIGH

    CodeWhale: Project config `allow_shell` override enables arbitrary shell command execution via cloned repository

  • CVE-2026-75915
    HIGH

    CodeWhale: js_execution leaks parent environment to model context via missing env scrub

  • CVE-2026-75914
    HIGH

    CodeWhale: image_analyze follows workspace symlinks, leaking external file bytes

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies