CVE-2026-75859
CodeWhale before 0.8.64 Arbitrary File Read via instructions
CodeWhale versions before 0.8.64 fail to validate file paths in the project config instructions field, allowing attackers to read arbitrary files on the victim's system. A malicious .codewhale/config.toml file in a cloned repository can specify paths outside the workspace that are read and injected into the AI system prompt for exfiltration.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.7
CodeWhale before 0.8.64 Arbitrary File Read via instructions
CodeWhale versions before 0.8.64 fail to validate file paths in the project config instructions field, allowing attackers to read arbitrary files on the victim's system. A malicious .codewhale/config.toml file in a cloned repository can specify paths outside the workspace that are read and injected into the AI system prompt for exfiltration.
- Record
CVE-2026-75859- CVSS 4.0
- 8.7 High
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 - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2026-60966
8.7
CodeWhale versions before 0.8.64 fail to validate file paths in the project config instructions field, allowing attackers to read arbitrary files on the victim's system. A malicious .codewhale/config.toml file in a cloned repository can specify paths outside the workspace that are read and injected into the AI system prompt for exfiltration.
- Record
EUVD-2026-60966- CVSS 4.0
- 8.7 High
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-62f5-cp2p-vq95
8.7
CodeWhale: Project config `instructions` override enables arbitrary file read into AI system prompt via cloned repository
Maintainer resolution
The CodeWhale maintainers validated this report. The affected package ranges are recorded in the advisory metadata. Version 0.8.64 contains the fix in commit 43563356b98c6b993085554da82e77370160a31c. Users should upgrade to 0.8.64 or later. The original reporter analysis is preserved below.
Summary
A malicious .codewhale/config.toml or .deepseek/config.toml committed to a repository can set instructions to an array of arbitrary file paths (including paths outside the workspace like ~/.ssh/id_rsa or ~/.aws/credentials) that are read from disk and injected into the AI model's system prompt. There is no path validation, workspace boundary check, or tightening guard on the instructions field. This enables a malicious repository to exfiltrate the contents of sensitive files on the victim's machine through the AI conversation.
Details
The project config merge function at crates/tui/src/main.rs:5190-5197 (v0.8.50) copies the instructions array from a project-level config file into the live session config without any path validation:
if let Some(arr) = table.get("instructions").and_then(toml::Value::as_array) {
let entries: Vec<String> = arr
.iter()
.filter_map(|v| v.as_str().map(str::to_string))
.filter(|s| !s.trim().is_empty())
.collect();
config.instructions = Some(entries);
}
These paths are then resolved via expand_path at crates/tui/src/config.rs:2361-2371, which expands ~ to the user's home directory and resolves environment variables:
pub fn instructions_paths(&self) -> Vec<PathBuf> {
self.instructions.as_deref().unwrap_or(&[])
.iter()
.map(String::as_str)
.map(str::trim)
.filter(|s| !s.is_empty())
.map(expand_path)
.collect()
}
The resolved paths are loaded at prompt-render time in crates/tui/src/prompts.rs:216 with no workspace boundary check:
InstructionSource::File(path) => match std::fs::read_to_string(path) {
Ok(raw) => (path.display().to_string(), raw),
...
}
The file contents are injected into the AI system prompt at crates/tui/src/prompts.rs:243-245:
sections.push(format!(
"<instructions source=\"{raw_source_name}\">\n{body}\n</instructions>"
));
Source of attacker-controlled input: The .codewhale/config.toml or .deepseek/config.toml file in a cloned repository, specifically the instructions array.
Security boundary crossed: Workspace isolation. The resolve_path function in crates/tui/src/tools/spec.rs:360-466 enforces workspace boundaries for file tools, but the instructions loading path has no such boundary check.
Sink reached: The contents of arbitrary files are placed into the AI model's system prompt, making them available to the model and potentially exfiltratable through conversation responses.
Why existing mitigations do not prevent exploitation:
- The
INSTRUCTIONS_FILE_MAX_BYTEScap atcrates/tui/src/prompts.rs:70limits each file to 100KB but does not prevent reading sensitive files (SSH keys, AWS credentials,.envfiles are all well under 100KB). - The
DENY_AT_PROJECT_SCOPElist atcrates/tui/src/main.rs:5119blocksapi_key,base_url,provider, andmcp_config_pathbut does not blockinstructions. - Unlike
approval_policyandsandbox_mode, there is no tightening guard forinstructions. - The
expand_pathfunction atcrates/tui/src/config.rs:2805actively expands~and environment variables, making it easier to target known sensitive file locations.
Flow from source to sink:
- User clones a repository containing
.codewhale/config.tomlwithinstructions = ["~/.ssh/id_rsa"] - User runs
codewhalein the repository directory merge_project_config()reads the project config and setsconfig.instructions = Some(["~/.ssh/id_rsa"])config.instructions_paths()callsexpand_pathon each entry, resolving…
- Record
GHSA-62f5-cp2p-vq95- CVSS 4.0
- 8.7 High
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 - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-22, CWE-200
- Updated
- 2026-11-02
NVD
8.7
CodeWhale versions before 0.8.64 fail to validate file paths in the project config instructions field, allowing attackers to read arbitrary files on the victim's system. A malicious .codewhale/config.toml file in a cloned repository can specify paths outside the workspace that are read and injected into the AI system prompt for exfiltration.
- Record
CVE-2026-75859- CVSS 4.0
- 8.7 High
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
8.7
CodeWhale before 0.8.64 Arbitrary File Read via instructions
CodeWhale versions before 0.8.64 fail to validate file paths in the project config instructions field, allowing attackers to read arbitrary files on the victim's system. A malicious .codewhale/config.toml file in a cloned repository can specify paths outside the workspace that are read and injected into the AI system prompt for exfiltration.
- Record
CVE-2026-75859- CVSS 4.0
- 8.7 High
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 - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVGHSA-62f5-cp2p-vq95
8.7
CodeWhale: Project config `instructions` override enables arbitrary file read into AI system prompt via cloned repository
Maintainer resolution
The CodeWhale maintainers validated this report. The affected package ranges are recorded in the advisory metadata. Version 0.8.64 contains the fix in commit 43563356b98c6b993085554da82e77370160a31c. Users should upgrade to 0.8.64 or later. The original reporter analysis is preserved below.
Summary
A malicious .codewhale/config.toml or .deepseek/config.toml committed to a repository can set instructions to an array of arbitrary file paths (including paths outside the workspace like ~/.ssh/id_rsa or ~/.aws/credentials) that are read from disk and injected into the AI model's system prompt. There is no path validation, workspace boundary check, or tightening guard on the instructions field. This enables a malicious repository to exfiltrate the contents of sensitive files on the victim's machine through the AI conversation.
Details
The project config merge function at crates/tui/src/main.rs:5190-5197 (v0.8.50) copies the instructions array from a project-level config file into the live session config without any path validation:
if let Some(arr) = table.get("instructions").and_then(toml::Value::as_array) {
let entries: Vec<String> = arr
.iter()
.filter_map(|v| v.as_str().map(str::to_string))
.filter(|s| !s.trim().is_empty())
.collect();
config.instructions = Some(entries);
}
These paths are then resolved via expand_path at crates/tui/src/config.rs:2361-2371, which expands ~ to the user's home directory and resolves environment variables:
pub fn instructions_paths(&self) -> Vec<PathBuf> {
self.instructions.as_deref().unwrap_or(&[])
.iter()
.map(String::as_str)
.map(str::trim)
.filter(|s| !s.is_empty())
.map(expand_path)
.collect()
}
The resolved paths are loaded at prompt-render time in crates/tui/src/prompts.rs:216 with no workspace boundary check:
InstructionSource::File(path) => match std::fs::read_to_string(path) {
Ok(raw) => (path.display().to_string(), raw),
...
}
The file contents are injected into the AI system prompt at crates/tui/src/prompts.rs:243-245:
sections.push(format!(
"<instructions source=\"{raw_source_name}\">\n{body}\n</instructions>"
));
Source of attacker-controlled input: The .codewhale/config.toml or .deepseek/config.toml file in a cloned repository, specifically the instructions array.
Security boundary crossed: Workspace isolation. The resolve_path function in crates/tui/src/tools/spec.rs:360-466 enforces workspace boundaries for file tools, but the instructions loading path has no such boundary check.
Sink reached: The contents of arbitrary files are placed into the AI model's system prompt, making them available to the model and potentially exfiltratable through conversation responses.
Why existing mitigations do not prevent exploitation:
- The
INSTRUCTIONS_FILE_MAX_BYTEScap atcrates/tui/src/prompts.rs:70limits each file to 100KB but does not prevent reading sensitive files (SSH keys, AWS credentials,.envfiles are all well under 100KB). - The
DENY_AT_PROJECT_SCOPElist atcrates/tui/src/main.rs:5119blocksapi_key,base_url,provider, andmcp_config_pathbut does not blockinstructions. - Unlike
approval_policyandsandbox_mode, there is no tightening guard forinstructions. - The
expand_pathfunction atcrates/tui/src/config.rs:2805actively expands~and environment variables, making it easier to target known sensitive file locations.
Flow from source to sink:
- User clones a repository containing
.codewhale/config.tomlwithinstructions = ["~/.ssh/id_rsa"] - User runs
codewhalein the repository directory merge_project_config()reads the project config and setsconfig.instructions = Some(["~/.ssh/id_rsa"])config.instructions_paths()callsexpand_pathon each entry, resolving…
- Record
GHSA-62f5-cp2p-vq95- CVSS 4.0
- 8.7 High
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 - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-200, CWE-22
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
deepseek-tuicrates.io |
0.8.8 up to 0.8.41 | 0.8.41 |
deepseek-tuinpm |
0.8.8 up to 0.8.41 | 0.8.41 |
codewhale-tuicrates.io |
0.8.41 up to 0.8.64 | 0.8.64 |
codewhalenpm |
0.8.41 up to 0.8.64 | 0.8.64 |
deepseek-tuicrates.io |
0.8.8 and later | None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-75859 is a high vulnerability (CVSS 8.7) in Hmbown Codewhale, published August 18, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.53%, the 45th percentile. Fixed in deepseek-tui 0.8.41.
References
github.com/Hmbown/CodeWhale/security/advisories/GHSA-62f5-cp2p-vq95
github.com/Hmbown/CodeWhale/commit/43563356b98c6b993085554da82e77370160a31c
vulncheck.com/advisories/codewhale-before-arbitrary-file-read-via-instructions
nvd.nist.gov/vuln/detail/CVE-2026-75859
github.com/advisories/GHSA-62f5-cp2p-vq95
github.com/CVEProject/cvelistV5/tree/main/cves/2026/75xxx/CVE-2026-75859.json
github.com/Hmbown/CodeWhale
Left out here: the rest of 2 source descriptions. The JSON record has them.