CVE-2026-75858: CodeWhale Remote Code Execution Vulnerability
HIGHCVE-2026-75858 is a HIGH (CVSS 7.8) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting CodeWhale libraries in the crates.io ecosystem. The issue involves rlm_eval auto-approves arbitrary python execution, bypassing the user's approval policy (rce). Remediation is available by upgrading affected packages to version 0.8.41, 0.8.64.
CVE-2026-75858 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-75858
To remediate this vulnerability, upgrade all affected CodeWhale dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade deepseek-tui to Latest secure release
npm install deepseek-tui@0.8.41
Upgrade codewhale-tui to 0.8.64
npm install codewhale@0.8.64
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for deepseek-tui
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-75858, inspect your project dependencies for CodeWhale:
inspect dependencies for deepseek-tui
Analyze the terminal output to locate any version of CodeWhale in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.41), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In CodeWhale, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-75858 Affected CodeWhale Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
deepseek-tui
|
crates.io |
≥ 0.8.33
≤ 0.8.41
|
|
|
deepseek-tui
|
npm |
≥ 0.8.33
< 0.8.41
|
0.8.41
|
|
codewhale-tui
|
crates.io |
≥ 0.8.41
< 0.8.64
|
0.8.64
|
|
codewhale
|
npm |
≥ 0.8.41
< 0.8.64
|
0.8.64
|
References
Frequently Asked Questions
What is CVE-2026-75858?
Which CodeWhale versions are affected?
What version fixes CVE-2026-75858?
Is deepseek-tui affected?
Is codewhale-tui affected?
What is the CVSS score of CVE-2026-75858?
What CWE is associated with CVE-2026-75858?
How can I check crates.io dependencies for CVE-2026-75858?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wrj3-vj8c-784f",
"modified" : "2026-09-04T18:12:15Z",
"published" : "2026-09-04T18:12:15Z",
"aliases" : [ "CVE-2026-75858" ],
"summary" : "CodeWhale: rlm_eval auto-approves arbitrary Python execution, bypassing the user's approval policy (RCE)",
"details" : "### Maintainer resolution\n\nThe 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.\n\n### Summary\nThe `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`).\n\n### Details\n`rlm_eval`'s `execute()` reads the LLM-controlled `code` field and runs it (`crates/tui/src/tools/rlm.rs:215-300`):\n\n```rust\nfn capabilities(&self) -> Vec<ToolCapability> {\n vec![ToolCapability::Network, ToolCapability::ExecutesCode]\n}\n\nfn approval_requirement(&self) -> ApprovalRequirement {\n ApprovalRequirement::Auto // overrides the safe default below\n}\n\nasync fn execute(&self, input: Value, context: &ToolContext) -> Result<ToolResult, ToolError> {\n let name = required_non_empty_str(&input, \"name\")?;\n let code = required_non_empty_str(&input, \"code\")?; // LLM-controlled\n ...\n let round = kernel.run(code, Some(&bridge)).await... // runs that code in python3\n```\n\nThe 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`.\n\nThe 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:\n\n```rust\nlet approval_required = spec.approval_requirement() != ApprovalRequirement::Auto\n && !registry.context().auto_approve;\n```\n\nWhen `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.\n\n### PoC\nSource-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:\n\n```python\nimport os, getpass, socket\nopen('/tmp/pwned_by_rlm_eval','w').write(getpass.getuser()+'@'+socket.gethostname()+':'+os.getcwd())\n```\n\nRun 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.\n\n### Impact\nUnsandboxed 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.\n\n### Credit\n[sai-sh](https://github.com/sai-sh)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "deepseek-tui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.33"
}, {
"last_affected" : "0.8.41"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "deepseek-tui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.33"
}, {
"fixed" : "0.8.41"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "codewhale-tui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.41"
}, {
"fixed" : "0.8.64"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "codewhale"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.41"
}, {
"fixed" : "0.8.64"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-wrj3-vj8c-784f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-75858"
}, {
"type" : "WEB",
"url" : "https://github.com/Hmbown/CodeWhale/commit/57f3c89471e27ac4032d9791f6885e5d4408c381"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Hmbown/CodeWhale"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/codewhale-rlm-eval-before-remote-code-execution"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-862", "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-04T18:12:15Z",
"nvd_published_at" : "2026-08-18T16:18:21Z"
}
}