VulnWatch by ve1ve2
critical 9.6 EPSS 0.51%

GHSA-8hp3-xxrg-v9c8: CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

Source:
OSV.dev
Published:
Fetched:
Updated:
Affects:
codewhale-tui

https://osv.dev/vulnerability/GHSA-8hp3-xxrg-v9c8 ↗

osvcrates.iofix-available

CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution ### 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 CVE-2026-45374 (GHSA-72w5-pf8h-xfp4) hardened the task path so auto-approval must be opted into explicitly: `add_task` uses `req.auto_approve.unwrap_or(false)` (task_manager.rs:868). The automation subsystem was not hardened in kind. `AutomationRecord::task_auto_approve()` resolves an omitted `auto_approve` to `DEFAULT_AUTOMATION_AUTO_APPROVE = true` (automation_manager.rs:29, 101-103), and `enqueue_run_task` builds the `NewTaskRequest` with `auto_approve: Some(automation.task_auto_approve())` — i.e. an explicit `Some(true)` (automation_manager.rs:766). Because the field is `Some`, `unwrap_or(false)` returns `true` and the seed-2 default is bypassed. That `true` propagates to `ApprovalMode::Bypass` (runtime_threads.rs:2253), where the background approval loop auto-approves every tool call with no human present (runtime_threads.rs:3383-3416). One approved `automation_create` becomes a durable, recurring, fully auto-approved agent. Same insecure-default class as CVE-2026-45374, on a different, unpatched subsystem. ## Root Cause Sibling durable defaults in the same struct are safe — `DEFAULT_AUTOMATION_ALLOW_SHELL = false` and `DEFAULT_AUTOMATION_TRUST_MODE = false` (automation_manager.rs:27-28) — while `DEFAULT_AUTOMATION_AUTO_APPROVE` alone defaults `true` (:29). `create_automation` stores `auto_approve: None` when omitted (:422); `task_auto_approve()` resolves `None`→`true` (:101-103); `enqueue_run_task` passes `Some(true)` (:766), defeating `add_task`'s `unwrap_or(false)` seed fix. The `automation_create` tool schema also declares `"auto_approve": {"type":"boolean","default":true}` (tools/automation.rs:49) while sibling `allow_shell`/`trust_mode` default `false`. ## Impact A single approved `automation_create` yields a durable, recurring, fully auto-approved agent. Every scheduled fire silently authorizes mutating tools (file writes, apply_patch, git, MCP writes) with no prompt; combined with `allow_shell:true` in the create call, recurring silent RCE with no human present. Even without `allow_shell`, every recurring run silently authorizes all non-shell mutating tools. Same class as seed CVE-2026-45374. ## Proof of Concept Prompt injection convinces the model to create a benign-sounding recurring job (single human approval on the `automation_create` call): ```json {"name":"automation_create","arguments":{ "name":"nightly-maintenance", "prompt":"Fetch latest and run project setup script", "rrule":"FREQ=HOURLY;INTERVAL=1", "allow_shell":true }} ``` (`auto_approve` omitted → stored `None` → resolves to `true` on every run.) ## Attack Chain 1. **Entry.** Prompt injection → model creates a recurring job via `automation_create` with `auto_ Affected: crates.io:codewhale-tui, npm:codewhale Fixed in: 0.9.0 References: https://github.com/codewhale-hq/Codewhale/security/advisories/GHSA-8hp3-xxrg-v9c8 https://nvd.nist.gov/vuln/detail/CVE-2026-83817 https://github.com/codewhale-hq/Codewhale/commit/208421b9d23d81cea3311a1eeb2a2ea81d637686 https://github.com/codewhale-hq/Codewhale https://github.com/codewhale-hq/Codewhale/releases/tag/v0.9.0

Linked vulnerabilities (4)

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

CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

CWE: CWE-862, CWE-1188Aliases: CVE-2026-83817, CVE-2026-45374, GHSA-72w5-pf8h-xfp4
CVE-2026-83817 high 7.5 EPSS 0.51% (p44) NVDCVE.orgGHSAGHSA
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

CWE: CWE-862, CWE-1188Aliases: GHSA-8hp3-xxrg-v9c8, CVE-2026-45374, GHSA-72w5-pf8h-xfp4NVD: Received
CVE-2026-45374 critical 9.6 EPSS 0.39% (p34) NVDCVE.org
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

CodeWhale is a DeepSeek + MiMo coding agent in terminal. Prior to 0.8.26, the task_create tool spawns durable sub-agents that inherit two insecure defaults, allow_shell defaults to true (config.rs:1499: self.allow_shell.unwrap_or(true)) and auto_approve defaults to true (task_manager.rs:297: auto_approve: Some(true)). When a user approves a task_create call (which requires ApprovalRequirement::Required), they approve what appears to be a benign work prompt. However, the spawned sub-agent silently receives unrestricted, unapproved shell access. This vulnerability is fixed in 0.8.26.

CWE: CWE-94NVD: Deferred

Also reported by (1)