Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker crafts malicious git repository
-
DeliveryEmbeds prompt injection in repository content (README, commit message, git notes)
-
ExploitVictim opens repository in vulnerable CodeWhale TUI
-
InstallInjected instruction coerces model to call git_show with rev='--output=~/.ssh/authorized_keys'
-
C2Auto-approved tool executes git show --output= without user prompt
-
ExecuteAttacker SSH public key written to authorized_keys
-
ImpactAttacker achieves persistent SSH access
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Exploitation requires two concurrent conditions: (1) the victim must be running a vulnerable CodeWhale version (0.8.41 to 0.8.63) and must open or interact with a repository containing attacker-controlled content capable of triggering prompt injection - this is a non-default user action (opening an untrusted repo) but requires no special configuration; (2) the prompt injection payload must successfully cause the language model to invoke the git_show or git_blame tool with a rev value beginning with --, which depends on the model's instruction-following behavior and the sophistication of the injected content. What limits exploitation: the attacker cannot remotely call the tool directly - they can only influence it indirectly via prompt injection, making reliable exploitation model-dependent. The write target is bounded by the invoking user's filesystem permissions; root-owned files are not reachable unless CodeWhale is run as root (non-default). No network listener or open port is required on the victim machine - the attack is delivered through the repository content itself. |
| Impact | The CVSS 4.0 score of 8.5 (AV:N/AC:L/AT:N/PR:N/UI:P) reflects a credible but multi-stage attack: the victim must open a malicious repository, and prompt injection must succeed in coercing the model into calling git_show with a crafted rev value. The AC:L rating in the provided vector is arguably optimistic given the prompt injection prerequisite; in practice, reliable exploitation requires careful repository crafting and a model that follows embedded instructions without challenge. The integrity impact is high (VI:H/SI:H) because the write target is only constrained by the operating system's file permissions for the invoking user - SSH authorized_keys, shell rc files, and git configuration are all reachable. No EPSS score was provided and the vulnerability is not in CISA KEV, so there is no confirmed evidence of active exploitation. The auto-approval bypass is the most consequential amplifier: a tool the user has implicitly trusted as safe becomes the write primitive. Real-world risk is meaningful for developers who use CodeWhale with untrusted repositories or whose workflows expose them to prompt injection via repository content (e.g., malicious README, .git/hooks, or COMMIT_EDITMSG content). |
| Exploit ScenarioDerived | An attacker publishes a malicious git repository containing prompt injection content embedded in repository metadata (e.g., a crafted COMMIT_EDITMSG, README, or git note) that instructs the CodeWhale model to call git_show with rev set to --output=/home/victim/.ssh/authorized_keys. When the victim opens or pulls the repository in an affected CodeWhale version, the model processes the injected instruction and invokes git_show with the crafted argument; because the tool is auto-approved, no confirmation dialog appears. Git interprets --output= as a file-write flag and silently overwrites the victim's SSH authorized_keys file with the git show output, enabling the attacker to inject their own public key and gain persistent SSH access to the victim's machine. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 18, 2026
Argument injection in CodeWhale's git_show tool (versions 0.8.41-0.8.63) allows an attacker to cause arbitrary file writes at the invoking user's privilege level via a malicious repository combined with prompt injection. The model-supplied rev parameter is passed directly to git show argv without an --end-of-options sentinel, meaning a value beginning with --output= is interpreted by git as a file-write flag rather than a revision. Because the git_show tool is registered as auto-approved and advertised as read-only, exploitation bypasses the user confirmation prompt entirely, enabling silent overwrite of sensitive files such as ~/.ssh/authorized_keys or ~/.bashrc. No public exploit has been identified at time of analysis, and a vendor-released patch is available in version 0.8.64.
RemediationAI
Upgrade to CodeWhale version 0.8.64 or later, which introduces the validate_git_rev() function rejecting any revision string that is empty, begins with a hyphen (-), or contains null bytes or ASCII control characters. The patch is confirmed at commit 9a34b5034d29f05d1f28fa61b04719ca6a741020 and documented in the vendor advisory at GHSA-7j5w-7r7x-9v27. If an immediate upgrade is not possible, the most effective compensating control is to revoke the auto-approval designation for the git_show and git_blame tools in CodeWhale's tool configuration, forcing user confirmation before each invocation - this eliminates the silent-write risk at the cost of requiring manual approval for every git history lookup. Additionally, restricting CodeWhale use to trusted repositories (avoid cloning or opening repositories from untrusted sources) significantly reduces the prompt injection attack surface. Do not rely on operating-system file permissions alone as a compensating control, as the write target is constrained only by the invoking user's permissions.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in cargo, npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CodeWhale (CPE: cpe:2.3:a:hmbown:codewhale) is an AI-assisted terminal UI coding tool that exposes git operations - including git show and git blame - as model-callable tools. These tools pass user-controllable (or in this case, model-controllable) parameters directly into subprocess argv arrays. The vulnerability (CWE-73: External Control of File Name or Path) arises because the rev parameter supplied by the language model is not validated before being appended to the git show argument vector. Git interprets any argument beginning with -- as a flag; specifically, --output=<path> causes git to write its output to an arbitrary filesystem path rather than stdout. The absence of an --end-of-options (--) sentinel before the rev argument means git cannot distinguish between an option and a legitimate revision. Critically, the tool is declared as auto-approved and read-only in the tool registry, so the MCP/tool-use layer does not prompt the user for confirmation, turning a seemingly benign read operation into a silent write primitive.
Know when Codewhale gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:H/SA:H
AC:H reflects mandatory prompt injection prerequisite; S:C because git writes escape application scope to user's SSH and shell config files; A:L for potential file corruption.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
CodeWhale (codewhale / codewhale-tui) versions >= 0.8.41 and < 0.8.64 contain an argument injection vulnerability in the git_show tool. The model-supplied rev parameter is passed unvalidated into the git show argv without an --end-of-options sentinel, so a value beginning with --output= is interpreted as a git flag. Because the tool is registered as auto-approved and advertised as read-only, an attacker (via a malicious repository combined with prompt injection) can cause an unprompted arbitrary file write at the privilege of the invoking user, targeting sensitive files such as ~/.ssh/authorized_keys, ~/.bashrc, or ~/.gitconfig. Fixed in 0.8.64 by adding rev validation.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
CodeWhale's git_show tool (versions 0.8.41-0.8.63) contains an argument injection vulnerability that enables silent, unauthorized overwriting of critical user files including SSH keys and shell configurations. While no public exploit has been identified at time of analysis, the attack surface is wide: exploitation requires only malicious repository content and prompt manipulation, yet completely bypasses user confirmation dialogs. Organizations using affected versions face significant risk of credential compromise and lateral movement through victim user accounts.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Server-side request forgery in CodeWhale before 0.8.64 lets remote attackers reach internal-only IP addresses through th
Environment variable inheritance in CodeWhale's js_execution tool prior to version 0.8.64 allows crafted JavaScript payl
Unauthenticated file disclosure in CodeWhale before 0.8.64 allows arbitrary local file reads via the image_analyze tool'
Arbitrary file read in CodeWhale before version 0.8.64 allows an attacker to exfiltrate files from a developer's worksta
Remote code execution in CodeWhale (packages codewhale and codewhale-tui) versions 0.8.41 through 0.8.63 allows an attac
Shell command injection in CodeWhale before version 0.8.64 enables arbitrary code execution on a victim developer's mach
Argument injection in CodeWhale versions before 0.8.64 exposes arbitrary files on the host system by accepting unsanitiz
Prompt-injection-driven privilege escalation in CodeWhale 0.8.41-0.8.63 allows an attacker who can place malicious instr
Arbitrary external program execution on the developer host is achievable through CodeWhale (DeepSeek/MiMo terminal codin
CodeWhale's automation subsystem resolves an omitted auto_approve setting to true, so a single approved automation_creat
EUVD-2026-60971
GHSA-7j5w-7r7x-9v27
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB