CodeWhale exec_shell Parallel-Readonly Classifier RCE (CVE-2026-83816)
Detects exploitation of CVE-2026-83816, a command-injection and broken-authorization flaw in CodeWhale (codewhale-tui and codewhale, Rust and npm distributions) at or below version 0.8.67. The exec_shell tool's parallel-readonly classifier treats fd, rg (ripgrep) and git grep as always-safe read-only commands and auto-approves them without user confirmation. Each of these tools exposes exec-style flags (fd's --exec, -x and --exec-batch, ripgrep's --pre preprocessor, and git grep's -O / --open-files-in-pager) that spawn arbitrary child processes. An attacker who can influence the agent's command stream (for example via a malicious repo, prompt injection, or crafted project files) can run arbitrary code past the approval gate without a prompt. This detection hunts for CodeWhale child processes invoking fd, rg or git grep with exec-capable flags, and for the unexpected grandchild processes they spawn. Fixed in version 0.9.0 (commit 208421b).
Vulnerability Intelligence
Public PoCAffected Software
- Vendor
- rust, npm
- Product
- codewhale-tui, codewhale
- Versions
- <= 0.8.67
Timeline
- Disclosed
- November 19, 2026
References & Proof of Concept
- https://github.com/codewhale-hq/Codewhale/security/advisories/GHSA-3mgh-93r5-r7jf
- https://nvd.nist.gov/vuln/detail/CVE-2026-83816
- https://github.com/codewhale-hq/Codewhale/commit/208421b9d23d81cea3311a1eeb2a2ea81d637686
- https://github.com/codewhale-hq/Codewhale/releases/tag/v0.9.0
- https://github.com/advisories/GHSA-3mgh-93r5-r7jf
What is CVE-2026-83816 CodeWhale exec_shell Parallel-Readonly Classifier RCE (CVE-2026-83816)?
CodeWhale exec_shell Parallel-Readonly Classifier RCE (CVE-2026-83816) (CVE-2026-83816) maps to the Execution and Privilege Escalation tactics — the adversary is trying to run malicious code or instructions on a system in MITRE ATT&CK.
This page provides production-ready detection logic for CodeWhale exec_shell Parallel-Readonly Classifier RCE (CVE-2026-83816), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, Windows Security Events. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Execution Privilege Escalation
// df00tech DF00-d0b471d785 · https://df00tech.com/detections/CVE-2026-83816 · licence: https://df00tech.com/detections/licence
let codewhaleParents = dynamic(["codewhale","codewhale-tui","codewhale.exe","codewhale-tui.exe","node"]);
let execFlags = dynamic(["--exec","--exec-batch","-x","-X","--pre","--open-files-in-pager","-O"]);
DeviceProcessEvents
| where InitiatingProcessFileName in~ (codewhaleParents) or InitiatingProcessCommandLine has_any ("codewhale")
| where FileName in~ ("fd","fd.exe","fdfind","rg","rg.exe","ripgrep","git","git.exe")
| where (FileName in~ ("git","git.exe") and ProcessCommandLine has "grep") or FileName !in~ ("git","git.exe")
| where ProcessCommandLine has_any (execFlags)
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, ProcessId
| order by Timestamp desc Finds CodeWhale (or its node host) spawning fd/rg/git-grep with exec-capable flags that bypass the parallel-readonly auto-approval gate.
Data Sources
Required Tables
False Positives
- Developers legitimately running fd --exec or rg --pre in build scripts outside CodeWhale
- CI pipelines using ripgrep preprocessors for compressed-archive search
- Git aliases that wrap git grep -O with a pager for interactive review
Query fingerprint DF00-d0b471d785 · licence
Sigma logsource & community rules
The detection logic for CodeWhale exec_shell Parallel-Readonly Classifier RCE (CVE-2026-83816) (CVE-2026-83816) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-83816
References (5)
- https://github.com/codewhale-hq/Codewhale/security/advisories/GHSA-3mgh-93r5-r7jf
- https://nvd.nist.gov/vuln/detail/CVE-2026-83816
- https://github.com/codewhale-hq/Codewhale/commit/208421b9d23d81cea3311a1eeb2a2ea81d637686
- https://github.com/codewhale-hq/Codewhale/releases/tag/v0.9.0
- https://github.com/advisories/GHSA-3mgh-93r5-r7jf
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 fd --exec classifier bypass (Linux)
Expected signal: Process-creation event showing fd (or fdfind) with -x/--exec spawning sh as a child process.
- Test 2 ripgrep --pre preprocessor execution (Linux)
Expected signal: Process-creation event showing rg with --pre spawning the preprocessor shell script.
- Test 3 git grep --open-files-in-pager RCE (macOS)
Expected signal: Process-creation event showing git grep with --open-files-in-pager/-O spawning sh.
Response Playbook
Triage
- Confirm the installed CodeWhale version on the host (codewhale --version / npm ls codewhale / cargo install list); versions <= 0.8.67 are vulnerable, 0.9.0+ are patched.
- Examine the full command line of the flagged fd/rg/git-grep process and identify the exec-capable flag and the payload it was pointed at (e.g. the script passed to --exec, the preprocessor binary passed to --pre, or the pager for -O).
- Review CodeWhale session/agent logs for the preceding prompt or project file that caused the tool call, to determine whether this was attacker-influenced (malicious repo / prompt injection) versus intentional developer use.
- Enumerate child/grandchild processes spawned under the flagged tool to determine what actually executed.
Containment
- Isolate or restrict the affected host if an unexpected grandchild process (shell, interpreter, network client) was spawned by the fd/rg/git-grep invocation.
- Upgrade CodeWhale to v0.9.0 or later immediately; until then, disable or uninstall CodeWhale or run it only against trusted repositories.
- Kill any running CodeWhale agent sessions and revoke any credentials or tokens that were accessible in the session environment.
Evidence Collection
- Capture the full process tree (CodeWhale -> fd/rg/git -> grandchildren) with command lines, timestamps, and hashes.
- Preserve CodeWhale session transcripts, project files, and any .codewhale/config or repo-supplied instruction files that may contain the injection.
- Collect the script/binary referenced by the exec flag (e.g. the --pre preprocessor or --exec target) for malware analysis.
Escalation Criteria
- ! Escalate to IR if a grandchild process is a shell, scripting interpreter, or network/download utility not expected from a read-only search.
- ! Escalate if the triggering command originated from an untrusted or externally-cloned repository, indicating active exploitation rather than developer misuse.
- ! Escalate if credential access, outbound C2, or persistence artifacts are observed following the tool invocation.
Investigation Guide
Forensic Artifacts
- >
Process-creation events showing CodeWhale/node as parent of fd/rg/git-grep with exec flags - >
CodeWhale session transcripts and repo-supplied config/instruction files - >
Scripts or preprocessor binaries referenced by --exec/--pre/-O flags - >
Shell history and newly created files on the host following the invocation
Tuning Guidance
Baseline legitimate developer and CI use of fd --exec, rg --pre, and git grep -O in your environment and allowlist those parent shells or users. Focus alerting on invocations whose grandchild process is a shell or interpreter, and on cases where the CodeWhale parent processed an untrusted/externally-cloned repository. Once all hosts are confirmed on CodeWhale v0.9.0+, this detection can be downgraded to informational.
Hunting Queries
Hunts for grandchild processes spawned by fd/rg/git-grep, which should never spawn children during a legitimate read-only search.
// df00tech DF00-d0b471d785 · https://df00tech.com/detections/CVE-2026-83816 · licence: https://df00tech.com/detections/licence
DeviceProcessEvents | where InitiatingProcessFileName in~ ("fd","fd.exe","rg","rg.exe","git","git.exe") | where InitiatingProcessCommandLine has_any ("--exec","--pre","--open-files-in-pager","-O") | project Timestamp, DeviceName, InitiatingProcessCommandLine, FileName, ProcessCommandLine ``` df00tech DF00-d0b471d785 · https://df00tech.com/detections/CVE-2026-83816 · licence: https://df00tech.com/detections/licence ```
index=endpoint (sourcetype="Sysmon:ProcessCreate" OR sourcetype="linux:process") | search parent_process_name IN ("fd","rg","git") parent_process IN ("*--exec*","*--pre*","*-O*") | table _time host parent_process process Atomic Red Team Tests
Simulates CodeWhale auto-approving fd as read-only while it spawns an arbitrary command via --exec.
Command
cd /tmp && touch cw_poc_marker && fd -x sh -c 'echo CVE-2026-83816-fd-exec > /tmp/cw_fd_exec.out' cw_poc_marker Cleanup
rm -f /tmp/cw_poc_marker /tmp/cw_fd_exec.out Expected Telemetry
Process-creation event showing fd (or fdfind) with -x/--exec spawning sh as a child process.
Expected Detection
KQL/SPL rule matches fd invocation with -x/--exec flag; grandchild sh process flagged by hunting query.
Simulates ripgrep auto-approved as read-only while --pre executes an arbitrary preprocessor binary.
Command
cd /tmp && echo test > cw_rg_target.txt && printf '#!/bin/sh\necho CVE-2026-83816-rg-pre > /tmp/cw_rg_pre.out\ncat "$1"\n' > /tmp/cw_pre.sh && chmod +x /tmp/cw_pre.sh && rg --pre /tmp/cw_pre.sh test cw_rg_target.txt Cleanup
rm -f /tmp/cw_rg_target.txt /tmp/cw_pre.sh /tmp/cw_rg_pre.out Expected Telemetry
Process-creation event showing rg with --pre spawning the preprocessor shell script.
Expected Detection
Detection matches rg invocation with --pre flag; preprocessor child process surfaced by hunting query.
Simulates git grep auto-approved as read-only while -O/--open-files-in-pager runs an arbitrary pager command.
Command
cd /tmp && rm -rf cw_git_poc && mkdir cw_git_poc && cd cw_git_poc && git init -q && echo needle > file.txt && git add file.txt && git -c core.pager=cat grep --open-files-in-pager='sh -c "echo CVE-2026-83816-git-grep > /tmp/cw_git_grep.out"' needle Cleanup
rm -rf /tmp/cw_git_poc /tmp/cw_git_grep.out Expected Telemetry
Process-creation event showing git grep with --open-files-in-pager/-O spawning sh.
Expected Detection
Detection matches git grep invocation with -O/--open-files-in-pager flag; spawned shell flagged.
Related Detections
Tactic Hubs
Related Techniques
Same Tactic: Execution
Blog posts about this detection
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040