CVE-2026-75857 — Vulnerability in codewhale — CVE Details
CodeWhale: exec_shell_interact sends LLM-controlled input to a running shell without an approval prompt (privilege escalation)
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.16%). Schedule for your next planned update.
Does your project use an affected codewhale version?
Paste your package-lock.json to check it for CVE-2026-75857 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
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
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
- User asks the agent to open a REPL; the model calls
exec_shell command="python3 -i"; the user sees and approves it once. - 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. - 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.
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.
Credit
Advisory Timeline
- First published September 4, 2026 (83 days ago).
- Last revised September 4, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install codewhale@0.8.64
cargo update -p codewhale-tui --precise 0.8.64
npm install deepseek-tui@0.8.41
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (4)
Affects 2 ecosystems: crates.io (2), npm (2).
| Package | Fixed In |
|---|---|
| codewhale npm · Affected: All versions | 0.8.64 |
| codewhale-tui crates.io · Affected: All versions | 0.8.64 |
| deepseek-tui crates.io · Affected: All versions | Range-based data available |
| deepseek-tui npm · Affected: All versions | 0.8.41 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-269Improper Privilege ManagementMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.0 score means for each attack dimension.
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-g29h-pfmp-qp9rWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-75857ADVISORY
- https://github.com/Hmbown/CodeWhale/commit/57f3c89471e27ac4032d9791f6885e5d4408c381WEB
- https://github.com/Hmbown/CodeWhalePACKAGE
- https://www.vulncheck.com/advisories/codewhale-before-privilege-escalation-via-exec-shell-interactWEB
Frequently Asked Questions
- What is CVE-2026-75857?
- CodeWhale: exec_shell_interact sends LLM-controlled input to a running shell without an approval prompt (privilege escalation). This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.0/10).
- How do I check if my project is affected by CVE-2026-75857?
- CVE-2026-75857 affects codewhale, codewhale-tui and deepseek-tui. It has a 0.2% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-75857 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 2.4% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-75856CRITICAL
CodeWhale: SSRF bypass - TOCTOU on DNS failure for DNS pinning
- CVE-2026-75859HIGH
CodeWhale: Project config `instructions` override enables arbitrary file read into AI system prompt via cloned repository
- CVE-2026-75913HIGH
CodeWhale: Argument Injection in `git_show` Tool Allows Arbitrary File Write Without Approval
- CVE-2026-75912HIGH
CodeWhale: Argument Injection in `git_blame` Tool Allows Arbitrary File Read Without Approval
- CVE-2026-75911HIGH
CodeWhale: Project config `allow_shell` override enables arbitrary shell command execution via cloned repository
- CVE-2026-75915HIGH
CodeWhale: js_execution leaks parent environment to model context via missing env scrub
- CVE-2026-75914HIGH
CodeWhale: image_analyze follows workspace symlinks, leaking external file bytes
- CVE-2026-75858HIGH
CodeWhale: rlm_eval auto-approves arbitrary Python execution, bypassing the user's approval policy (RCE)