CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent executionGHSA-8hp3-xxrg-v9c8
HIGHFix: codewhale-hq/Codewhale@208421bGHSA-8hp3-xxrg-v9c8 is a high-severity (CVSS 7.5) CWE-862 vulnerability in codewhale-tui. A fix is available for codewhale-tui — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-8hp3-xxrg-v9c8.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
codewhale-tui📦codewhaleReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io, npm packages — download data is not available via public APIs for these ecosystems.
Description
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):
{"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
- Entry. Prompt injection → model creates a recurring job via
automation_createwithauto_approveomitted.- Guard:
automation_createisRequired(tools/automation.rs:61-63) — user sees ONE approval prompt. - Bypass proof: the prompt describes an innocuous automation; the schema hides
"auto_approve": {"default": true}(tools/automation.rs:49). Approving "create a scheduled job" is not informed consent to "every future run bypasses all approval prompts." The resolvedauto_approve=true(omitted field) is not surfaced.
- Guard:
- Persist.
create_automationstoresauto_approve: None(automation_manager.rs:422).- Guard: none.
- Bypass proof:
Noneis later resolved totrue, notfalse.
- Fire. Headless scheduler tick (
scheduler_tick_shared, no human) orautomation_runinvokesenqueue_run_task, which setsauto_approve: Some(true)(automation_manager.rs:766).- Guard: seed-2's hardened
add_taskdefaultunwrap_or(false)(task_manager.rs:868). - Bypass proof: the value is
Some(true), sounwrap_or(false)yieldstrue— the hardened default never applies.
- Guard: seed-2's hardened
- Sink. Background worker builds the turn with
auto_approve=true→ApprovalMode::Bypass(runtime_threads.rs:2253); the approval loop auto-approves (runtime_threads.rs:3383-3416).- Guard: auto_review safety_floor.
- Bypass proof: safety_floor holds only
Publish(any origin) andDestructive/Secret(background/headless) (auto_review.rs:344-357); ordinarywrite_file/apply_patch/edit_file/non-destructiveexec_shellare NOT held → they run unattended. Withallow_shell:true, every scheduled run additionally gets silent shell execution.
- Impact. Durable, recurring, fully auto-approved agent from one create approval; recurring silent RCE with
allow_shell:true.
Bypass Evidence
- Present on latest release tag v0.8.67: automation_manager.rs:27-29 (
ALLOW_SHELL=false,TRUST_MODE=false,AUTO_APPROVE=true), :101-103task_auto_approve()→unwrap_or(true), :766Some(automation.task_auto_approve()), :422 storesNonewhen omitted; task_manager.rs:868unwrap_or(false); runtime_threads.rs:2253if auto_approve → ApprovalMode::Bypass. automation_manager.rs and task_manager.rs byte-identical v0.8.67↔HEAD. - Subsystem wired by default:
automation_create/automation_runregistered viawith_runtime_task_tools()inwith_agent_tools_policy(registry.rs:1005); TUI attachesautomations: Some(...)(tui/ui.rs:986-1011), serve mode via runtime_api.rs:426 — not feature-gated. - Sibling flags
allow_shell/trust_modedefaultfalsein the same struct —auto_approve=trueis the un-hardened anomaly.
Affected Versions
<= 0.8.67 (present on latest release tag v0.8.67 and HEAD 6a3403e).
Suggested Fix
Set DEFAULT_AUTOMATION_AUTO_APPROVE = false (mirror the seed-2 task-path fix) and change the automation_create schema default to false, so durable automations require explicit opt-in to auto-approval just like the task path.
Reported by zx (Jace)
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | codewhale-tui | all versions | 0.9.0cargo update -p codewhale-tui --precise 0.9.0 |
| 📦npm | codewhale | all versions | 0.9.0npm install codewhale@0.9.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for codewhale-tui, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update codewhale-tui to 0.9.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-8hp3-xxrg-v9c8 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is GHSA-8hp3-xxrg-v9c8 in your dependencies?
Find it across crates.io, npm, including transitive dependencies.