Skip to content
CVE-2026-83816 Sumo Logic CSE · Sumo

Detect CodeWhale exec_shell Parallel-Readonly Classifier RCE (CVE-2026-83816) in Sumo Logic CSE

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).

MITRE ATT&CK

Tactic
Execution Privilege Escalation

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
// df00tech DF00-d0b471d785 · https://df00tech.com/detections/CVE-2026-83816 · licence: https://df00tech.com/detections/licence
_sourceCategory=*endpoint* ("codewhale" OR "fd" OR "ripgrep" OR "git grep")
| json field=_raw "process_name", "parent_process_name", "command_line", "user", "host" nodrop
| where (tolowercase(parent_process_name) matches "*codewhale*" or tolowercase(parent_process_name) = "node")
| where (tolowercase(process_name) in ("fd","fd.exe","fdfind","rg","rg.exe","ripgrep") or (tolowercase(process_name) matches "git*" and tolowercase(command_line) matches "*grep*"))
| where tolowercase(command_line) matches "*--exec*" or tolowercase(command_line) matches "* -x *" or tolowercase(command_line) matches "*--pre *" or tolowercase(command_line) matches "*--open-files-in-pager*" or tolowercase(command_line) matches "* -o *"
| fields _messagetime, host, user, parent_process_name, process_name, command_line
high severity medium confidence

Sumo Logic query identifying CodeWhale-spawned read-tool processes carrying exec-capable flags.

Data Sources

Endpoint process telemetrySysmon

Required Tables

endpoint process events

False Positives & Tuning

  • Developer fd --exec batch operations
  • Ripgrep compressed-archive preprocessor use
  • git grep pager invocation during code review

Other platforms for CVE-2026-83816


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.

  1. 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.

  2. Test 2 ripgrep --pre preprocessor execution (Linux)

    Expected signal: Process-creation event showing rg with --pre spawning the preprocessor shell script.

  3. 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

  1. 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.
  2. 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).
  3. 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.
  4. Enumerate child/grandchild processes spawned under the flagged tool to determine what actually executed.

Containment

  1. Isolate or restrict the affected host if an unexpected grandchild process (shell, interpreter, network client) was spawned by the fd/rg/git-grep invocation.
  2. Upgrade CodeWhale to v0.9.0 or later immediately; until then, disable or uninstall CodeWhale or run it only against trusted repositories.
  3. Kill any running CodeWhale agent sessions and revoke any credentials or tokens that were accessible in the session environment.

Evidence Collection

  1. Capture the full process tree (CodeWhale -> fd/rg/git -> grandchildren) with command lines, timestamps, and hashes.
  2. Preserve CodeWhale session transcripts, project files, and any .codewhale/config or repo-supplied instruction files that may contain the injection.
  3. 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.

Hunting — KQL
kql
// 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
Hunting — SPL
spl
``` 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

Test 1 fd --exec classifier bypass (Linux)
linux

Simulates CodeWhale auto-approving fd as read-only while it spawns an arbitrary command via --exec.

Command

bash
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

bash
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.

Test 2 ripgrep --pre preprocessor execution (Linux)
linux

Simulates ripgrep auto-approved as read-only while --pre executes an arbitrary preprocessor binary.

Command

bash
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

bash
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.

Test 3 git grep --open-files-in-pager RCE (macOS)
macos

Simulates git grep auto-approved as read-only while -O/--open-files-in-pager runs an arbitrary pager command.

Command

bash
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

bash
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