Vulnerabilities in pkg:npm/codewhale
PACKAGECVE-2026-83816 is a HIGH (CVSS 8.1) remote code execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting CodeWhale libraries in the crates.io ecosystem. The issue involves exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent rce. Remediation is available by upgrading affected packages to version 0.9.0.
pkg:npm/codewhale
Vulnerability advisories affecting package pkg:npm/codewhale. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3mgh-93r5-r7jf | CVE-2026-83816 | HIGH | CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE |
| GHSA-8hp3-xxrg-v9c8 | CVE-2026-83817 | HIGH | CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution |
| GHSA-gx45-xrj5-g6c4 | CVE-2026-75911 | HIGH | CodeWhale: Project config `allow_shell` override enables arbitrary shell command execution via cloned repository |
| GHSA-wrj3-vj8c-784f | CVE-2026-75858 | HIGH | CodeWhale: rlm_eval auto-approves arbitrary Python execution, bypassing the user's approval policy (RCE) |
| GHSA-c6mw-8xh8-gpq6 | CVE-2026-75912 | HIGH | CodeWhale: Argument Injection in `git_blame` Tool Allows Arbitrary File Read Without Approval |
| GHSA-6v2g-fpxh-pmmh | CVE-2026-75856 | CRITICAL | CodeWhale: SSRF bypass - TOCTOU on DNS failure for DNS pinning |
| GHSA-h539-c7r8-3xq4 | CVE-2026-75915 | HIGH | CodeWhale: js_execution leaks parent environment to model context via missing env scrub |
| GHSA-7j5w-7r7x-9v27 | CVE-2026-75913 | HIGH | CodeWhale: Argument Injection in `git_show` Tool Allows Arbitrary File Write Without Approval |
| GHSA-g29h-pfmp-qp9r | CVE-2026-75857 | HIGH | CodeWhale: exec_shell_interact sends LLM-controlled input to a running shell without an approval prompt (privilege escalation) |
| GHSA-62f5-cp2p-vq95 | CVE-2026-75859 | HIGH | CodeWhale: Project config `instructions` override enables arbitrary file read into AI system prompt via cloned repository |
| GHSA-w7wx-5q49-r59w | CVE-2026-75914 | HIGH | CodeWhale: image_analyze follows workspace symlinks, leaking external file bytes |
CVE-2026-83816 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-83816
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 codewhale-tui to 0.9.0
npm install codewhale@0.9.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for codewhale-tui
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-83816, inspect your project dependencies for CodeWhale:
inspect dependencies for codewhale-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.9.0), 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. 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-83816 Affected CodeWhale Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
codewhale-tui
|
crates.io |
< 0.9.0
|
0.9.0
|
|
codewhale
|
npm |
< 0.9.0
|
0.9.0
|
References
Frequently Asked Questions
What is CVE-2026-83816?
Which CodeWhale versions are affected?
What version fixes CVE-2026-83816?
Is codewhale-tui affected?
Is codewhale affected?
What is the CVSS score of CVE-2026-83816?
What CWE is associated with CVE-2026-83816?
How can I check crates.io dependencies for CVE-2026-83816?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3mgh-93r5-r7jf",
"modified" : "2026-11-19T22:48:14Z",
"published" : "2026-11-19T22:48:14Z",
"aliases" : [ "CVE-2026-83816" ],
"summary" : "CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE",
"details" : "### 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\nThe interactive Agent profile of DeepSeek-TUI (CodeWhale) is explicitly documented to gate **every** shell command behind an approval prompt (config.rs:3725-3736). However, `ExecShellTool::approval_requirement_for(&tool_input)` downgrades the requirement from `Required` to `Auto` for any command the classifier deems \"parallel read-only\" (shell.rs:2314-2320). `registered_tool_approval_required` returns `false` for `Auto` **before** the `auto_approve` check runs (turn_loop.rs:37-38), so no prompt is shown even for a user who never enabled YOLO. The classifier `is_parallel_readonly_command` (command_safety.rs:389) rejects only shell metacharacters and then matches the flag-stripped base command name against an allowlist that includes `fd`, `rg`, and `git grep`. Those tools execute arbitrary external programs through documented flags (`fd -x/--exec`, `rg --pre`, `git grep --open-files-in-pager`) that need **no** shell metacharacters — yielding silent arbitrary-program execution in the default profile. Same silent-RCE class as CVE-2026-45311 (run_tests) but via a different, unpatched tool and code path.\n\n## Root Cause\n`approval_requirement_for` downgrades `exec_shell` to `Auto` when `exec_shell_input_is_parallel_readonly` returns true (shell.rs:2314-2320). The classifier strips all flags and matches the base command name against `PARALLEL_READONLY_PREFIXES` (command_safety.rs:363-385, 419-433). `fd`/`rg` are absent from `COMMAND_ARITY`, so `fd -x cp {} /tmp/exfil` canonicalizes to `\"fd\"` ∈ allowlist. The only remaining gate at the execute sink is `analyze_command`, which rates `fd`/`rg` as `Safe` (SAFE_COMMANDS command_safety.rs:527,530), so the `SafetyLevel::Dangerous`-only block (shell.rs:2408) never fires. Default execpolicy is empty (engine.rs:494) → Skip. Interactive-origin auto_review safety_floor holds only `Publish` (auto_review.rs:344-357), not interactive shell.\n\n## Impact\nArbitrary external program execution (any binary, any argv, including a repo-committed script) on the developer host, with no approval prompt, in the default interactive Agent profile — bypassing the boundary config.rs:3725-3736 explicitly promises. Identical outcome to seed CVE-2026-45311 via a different, unpatched tool.\n\n## Proof of Concept\nModel coerced (via indirect prompt injection from repo file / issue / fetched page — the seed threat model, in scope per SECURITY.md:48) to emit:\n```json\n{\"name\":\"exec_shell\",\"arguments\":{\"command\":\"fd -u -tf -x ./pwn.sh\"}}\n```\nAlternatives (all metachar-free, all auto-approved): `fd -tf -x cp {} /tmp/exfil`; `rg --pre /tmp/evil.sh --pre-glob '*' needle .`; `git grep --open-files-in-pager=/tmp/evil.sh needle`.\n\n## Attack Chain\n1. **Entry.** Agent ingests attacker-controlled content; injected instruction coerces the model to emit `exec_shell {\"command\":\"fd -u -tf -x ./pwn.sh\"}`.\n - **Guard:** none — reading content and model tool-calls are by design (seed threat model: indirect prompt injection).\n - **Bypass proof:** n/a (in-scope by design per SECURITY.md:48).\n2. **Gate — approval requirement.** turn_loop.rs:1738 → `spec.approval_requirement_for(&input)` → shell.rs:2314-2320 `exec_shell_input_is_parallel_readonly`.\n - **Guard:** metachar filter (command_safety.rs:394-400) + base-name allowlist.\n - **Bypass proof:** the string contains none of `; & | > < \\` $(` or newlines; `-x <program> <args>` is `fd`'s own exec mechanism (no shell). `classify_command` strips `-u -tf -x`, positionals `[fd, ./pwn.sh]`; `fd` ∉ `COMMAND_ARITY` → canonical `\"fd\"` ∈ `PARALLEL_READONLY_PREFIXES` → returns true. Maintainer test `parallel_readonly_command_classifier_is_strict` (command_safety.rs:1162+) confirms bare `fd`/`rg` classify parallel-readonly.\n3. **Gate — prompt decision.** `registered_tool_approval_required(name, Auto, auto_approve)`.\n - **Guard:** the approval prompt itself.\n - **Bypass proof:** `requirement == Auto` returns `false` at turn_loop.rs:37-38 unconditionally, before `!auto_approve`. No prompt regardless of user settings. Empty execpolicy → Skip; interactive safety_floor returns NoChange for fd.\n4. **Sink.** `ExecShellTool::execute` (shell.rs:2334) → `analyze_command`.\n - **Guard:** `SafetyLevel::Dangerous` block (shell.rs:2408).\n - **Bypass proof:** `fd` ∈ `SAFE_COMMANDS` (command_safety.rs:530) → `analyze_command` returns `Safe`; not `Dangerous` → not blocked. Child runs the attacker's program.\n5. **Impact.** Silent arbitrary-program execution on the developer host, no approval prompt, default interactive Agent profile.\n\n## Bypass Evidence\n- Present on latest release tag v0.8.67: turn_loop.rs:37-38 `Auto`→`return false`; shell.rs:2314-2320 override; command_safety.rs allowlist includes `\"rg\"`,`\"fd\"`,`\"git grep\"`; SAFE_COMMANDS includes `\"rg\"`,`\"fd\"`; `fd`/`rg` absent from `COMMAND_ARITY`. command_safety.rs / turn_loop.rs finding-critical functions byte-identical v0.8.67↔HEAD.\n- Maintainer's own test `parallel_readonly_command_classifier_is_strict` confirms bare `rg`/`fd` classify parallel-readonly and only metachar forms are rejected.\n\n## Affected Versions\n`<= 0.8.67` (present on latest release tag v0.8.67 and HEAD 6a3403e).\n\n## Suggested Fix\nRemove exec-capable tools (`fd`, `rg`, `git grep`) from `PARALLEL_READONLY_PREFIXES`, or make the classifier reject their exec flags (`-x`/`--exec`, `--pre`, `--open-files-in-pager`), so a code-executing invocation cannot be auto-approved as read-only.\n\nReported by **zx (Jace)**",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "codewhale-tui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.9.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.8.67"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "codewhale"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.9.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.8.67"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/codewhale-hq/Codewhale/security/advisories/GHSA-3mgh-93r5-r7jf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-83816"
}, {
"type" : "WEB",
"url" : "https://github.com/codewhale-hq/Codewhale/commit/208421b9d23d81cea3311a1eeb2a2ea81d637686"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/codewhale-hq/Codewhale"
}, {
"type" : "WEB",
"url" : "https://github.com/codewhale-hq/Codewhale/releases/tag/v0.9.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78", "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-19T22:48:14Z",
"nvd_published_at" : "2026-11-16T19:17:53Z"
}
}