Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft malicious JS payload
-
DeliveryInject via prompt injection into AI workflow
-
ExploitCodeWhale invokes js_execution tool
-
InstallNode.js spawns with full inherited parent env
-
C2Malicious code reads process.env
-
ExecuteCredentials returned in model context
-
ImpactAttacker retrieves secrets from response
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK
2 techniques across 2 tactics: Collection, Discovery The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires Node.js to be installed and accessible on the host running CodeWhale, since the js_execution tool must successfully spawn a Node.js child process. An attacker must also be able to control or influence the JavaScript code submitted to the tool - in practice this means either direct access to the CodeWhale interactive session or the ability to inject malicious instructions into an AI-driven workflow that uses CodeWhale (prompt injection). Exploitation is limited by: absence of Node.js on the host (blocks the tool entirely and makes the vulnerability unexploitable), environments where no secrets are present as process environment variables (eliminates impact regardless of code execution), and the indirect exfiltration path through model output context rather than a direct network channel to the attacker. The CVSS 4.0 PR:N metric reflects that no authentication to an external service is required once JavaScript code execution via the tool is achieved. |
| Impact | The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N) reflects a fully unauthenticated remote confidentiality-only impact, which is plausible in AI agentic pipeline scenarios where prompt injection can influence which JavaScript gets executed. The confidentiality impact is genuinely high: developers and CI/CD systems frequently expose AWS credentials, OPENAI_API_KEY, GitHub tokens, and similar secrets as process environment variables - exactly the credentials present in a CodeWhale operator's environment. No EPSS data was provided, and no KEV listing or public proof-of-concept has been identified, which moderates the immediacy of mass-exploitation risk. The practical risk is substantially limited by two factors: Node.js must be installed on the host for the tool to function, and an attacker must control or influence the JavaScript submitted to js_execution, most realistically via prompt injection. Organizations not using CodeWhale in AI-driven pipelines exposed to untrusted input have significantly reduced exposure despite the high CVSS. No conflicting signals between CVSS vector and description were found. |
| Exploit ScenarioDerived | An attacker performing prompt injection against a CodeWhale-powered AI development pipeline crafts a malicious instruction that causes the model to invoke the js_execution tool with the payload process.stdout.write(JSON.stringify(process.env)). When CodeWhale spawns Node.js to run this code, the complete parent environment - including any AWS_SECRET_ACCESS_KEY, OPENAI_API_KEY, or GitHub tokens present - is written to standard output and captured in the model's response context, where the attacker retrieves it. No public proof-of-concept has been identified, but exploitation requires only standard Node.js knowledge and the ability to influence the AI model's tool calls. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 18, 2026
Environment variable inheritance in CodeWhale's js_execution tool prior to version 0.8.64 allows crafted JavaScript payloads to read the full parent process environment via process.env, exposing API keys, cloud credentials, and authentication tokens to the model context. The affected codebase is a Rust TUI AI coding assistant whose Node.js child process spawning failed to sanitize the environment before execution. No public exploit code or CISA KEV listing has been identified at time of analysis; a vendor patch is available via GitHub advisory GHSA-h539-c7r8-3xq4.
RemediationAI
Upgrade CodeWhale to version 0.8.64 or later, which applies the environment sanitization fix in commit 26de44a8bd5051f8f944ea60b2c37ae1d2b7d25e (https://github.com/Hmbown/CodeWhale/commit/26de44a8bd5051f8f944ea60b2c37ae1d2b7d25e). The patch replaces the unsafe inheritance path with an explicit child_env::apply_to_tokio_command() call that clears the environment before applying only the necessary proxy overrides. If immediate upgrade is not feasible, a compensating control is to avoid running CodeWhale in environments where sensitive credentials exist as process environment variables: use IAM instance roles, Vault agent sidecars, or other runtime secret injection mechanisms that do not expose secrets to the parent process environment. The trade-off is operational complexity and potential disruption to credential-dependent workflows. Additionally, restricting which users or pipelines can trigger AI-driven JavaScript execution in CodeWhale reduces the prompt injection attack surface. Refer to the vendor advisory at https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-h539-c7r8-3xq4 for authoritative guidance.
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 a TUI-based AI coding assistant implemented in Rust under the crates/tui crate. Its js_execution tool spawns Node.js child processes to evaluate JavaScript on behalf of the AI model. The vulnerable function apply_node_proxy_env used tokio::process::Command::env() to add proxy-specific overrides but never called env_clear() first, so the spawned Node.js process inherited the complete environment of the parent CodeWhale process by default. Any JavaScript executed by the tool could trivially call process.env to enumerate and exfiltrate all inherited variables. This is a CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) root cause. The commit diff confirms the fix introduces crate::child_env::apply_to_tokio_command(), which explicitly clears the environment before applying only the minimal required overrides, and a regression test (execute_js_does_not_inherit_parent_secret_env) verifies that a secret set on the parent does not appear in child output.
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:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Network vector applies via prompt injection path; PR:N consistent with no authentication required to reach the tool; confidentiality-only impact with no integrity or availability consequence.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
CodeWhale versions before 0.8.64 contain an environment variable exposure vulnerability in the js_execution tool that fails to scrub parent process environment variables before spawning Node.js. Attackers can craft malicious JavaScript code executed by the tool to read process.env and leak API keys, cloud credentials, and authentication tokens back to the model context.
Articles & Coverage 1
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
CodeWhale's js_execution tool (versions prior to 0.8.64) exposes API keys, cloud credentials, and authentication tokens to model context through improper environment variable sanitization in Node.js child processes. Organizations using this Rust TUI AI coding assistant risk unauthorized access to backend systems and sensitive data exposure through the AI model's reasoning process.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Server-side request forgery in CodeWhale before 0.8.64 lets remote attackers reach internal-only IP addresses through th
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
Argument injection in CodeWhale's git_show tool (versions 0.8.41-0.8.63) allows an attacker to cause arbitrary file writ
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-60973
GHSA-h539-c7r8-3xq4
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB