{"vuln_id":"CVE-2026-45374","aliases":[],"description":"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.","published_at":"2026-05-28T18:16:35.843000Z","modified_at":"2026-10-26T13:10:00.140000Z","first_seen_at":"2026-11-21T19:15:19.393978Z","severity":"critical","severity_source":"nvd","cvss_score":9.6,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","cwe":["CWE-94"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00387,"epss_percentile":0.33578,"nvd_status":"Deferred","enriched_at":"2026-11-22T18:07:25.558348Z","links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-45374"},"matched_alias":null,"items":[{"id":10936,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-8hp3-xxrg-v9c8: CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution","summary":"CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution\n\n### Maintainer resolution\n\nThe 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.\n\n## Summary\nCVE-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.\n\n## Root Cause\nSibling 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`.\n\n## Impact\nA 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.\n\n## Proof of Concept\nPrompt injection convinces the model to create a benign-sounding recurring job (single human approval on the `automation_create` call):\n```json\n{\"name\":\"automation_create\",\"arguments\":{\n  \"name\":\"nightly-maintenance\",\n  \"prompt\":\"Fetch latest and run project setup script\",\n  \"rrule\":\"FREQ=HOURLY;INTERVAL=1\",\n  \"allow_shell\":true\n}}\n```\n(`auto_approve` omitted → stored `None` → resolves to `true` on every run.)\n\n## Attack Chain\n1. **Entry.** Prompt injection → model creates a recurring job via `automation_create` with `auto_\n\nAffected: crates.io:codewhale-tui, npm:codewhale\n\nFixed in: 0.9.0\n\nReferences:\nhttps://github.com/codewhale-hq/Codewhale/security/advisories/GHSA-8hp3-xxrg-v9c8\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-83817\nhttps://github.com/codewhale-hq/Codewhale/commit/208421b9d23d81cea3311a1eeb2a2ea81d637686\nhttps://github.com/codewhale-hq/Codewhale\nhttps://github.com/codewhale-hq/Codewhale/releases/tag/v0.9.0","url":"https://osv.dev/vulnerability/GHSA-8hp3-xxrg-v9c8","published_at":"2026-11-19T22:47:33Z","updated_at":"2026-11-19T23:00:36.646795Z","fetched_at":"2026-11-21T19:15:55.946307Z","severity":"critical","cvss_score":9.6,"epss":0.00509,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"codewhale-tui","vuln_id":"CVE-2026-83817","vuln_ids":["CVE-2026-45374","CVE-2026-83817","GHSA-72W5-PF8H-XFP4","GHSA-8HP3-XXRG-V9C8"],"tags":["osv","crates.io","fix-available"],"cluster_id":2178,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10936","html":"https://vulnwatch.ve1ve2.com/item/10936"}},{"id":2373,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-8hp3-xxrg-v9c8 / CVE-2026-83817: CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution","summary":"CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution\n\n### Maintainer resolution\n\nThe 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.\n\n## Summary\nCVE-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.\n\n## Root Cause\nSibling 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`.\n\n## Impact\nA 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.\n\n## Proof of Concept\nPrompt injection convinces the model to create a benign-sounding recurring job (single human approval on the `automation_create` call):\n```json\n{\"name\":\"automation_create\",\"arguments\":{\n  \"name\":\"nightly-maintenance\",\n  \"prompt\":\"Fetch latest and run project setup script\",\n  \"rrule\":\"FREQ=HOURLY;INTERVAL=1\",\n  \"allow_shell\":true\n}}\n```\n(`auto_approve` omitted → stored `None` → resolves to `true` on every run.)\n\n## Attack Chain\n1. **Entry.** Prompt injection → model creates a recurring job via `automation_create` with `auto_\n\nAffected packages: npm:codewhale, rust:codewhale-tui\nPatched: codewhale-tui 0.9.0, codewhale 0.9.0","url":"https://github.com/advisories/GHSA-8hp3-xxrg-v9c8","published_at":"2026-11-19T22:47:33Z","updated_at":"2026-11-19T22:47:34Z","fetched_at":"2026-11-21T19:15:18.416787Z","severity":"critical","cvss_score":9.6,"epss":0.00509,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"codewhale-tui","vuln_id":"CVE-2026-83817","vuln_ids":["CVE-2026-45374","CVE-2026-83817","GHSA-72W5-PF8H-XFP4","GHSA-8HP3-XXRG-V9C8"],"tags":["ghsa","npm","rust","CWE-862","CWE-1188"],"cluster_id":2178,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2373","html":"https://vulnwatch.ve1ve2.com/item/2373"}}]}