CVE-2026-75914: CodeWhale: symlink traversal leaks files via vision API

GHSA-w7wx-5q49-r59w HIGH
Published September 4, 2026
CISO Take

The image_analyze tool in CodeWhale/deepseek-tui (an AI coding-agent CLI) checks image paths for traversal syntax like "../" but never resolves symlinks, so a workspace symlink pointing outside the project — something ordinary in cloned repos with shared CI artifacts or design assets — gets read transparently and its bytes are base64-encoded straight into the vision API request. Because the tool carries ReadOnly capability, it is auto-approved by default, meaning a prompt injection hidden in a README, fetched webpage, or MCP tool output can trigger the read-and-exfiltrate on the same turn with zero visible user prompt. Current exploitation signals are modest — EPSS sits at 0.42% (top 65th percentile), it's not in CISA KEV, and there's no public exploit or Nuclei template — but the package has 0 tracked downstream dependents and 10 other CVEs in its history, suggesting a young, still-hardening codebase rather than low severity. Every peer file-reading tool in the same codebase (image_ocr, read_file, apply_patch, rlm_open) already uses the canonicalizing resolve_path check, so this is an isolated gap, not a design tradeoff. Upgrade to CodeWhale/deepseek-tui 0.8.64+ immediately, and until then treat any workspace containing symlinks with image extensions as untrusted and disable auto-approval for image_analyze.

Sources: NVD GitHub Advisory EPSS ATLAS vulncheck.com

What is the risk?

Severity is high (CVSS 7.5, confidentiality-only impact) but real-world exploitation likelihood is currently low: EPSS is 0.42% (top 65th percentile, not top-tier), the flaw is not in CISA KEV, and no public exploit code or Nuclei template exists yet. The risk is amplified by two structural factors independent of exploit availability: the tool is auto-approved (no user-in-the-loop check for a ReadOnly-classified capability that in practice performs an unbounded file read plus network exfiltration), and the attack surface — a symlink with an image extension inside a workspace — is a completely ordinary artifact of git clones, CI bundles, and shared media directories, not an unusual attacker setup. Combined with prompt injection as a documented delivery vector, this converts a passive workspace hazard into an active, silent exfiltration primitive for any agent operator who ingests untrusted content (web pages, READMEs, MCP tool output) into the same session.

How does the attack unfold?

Setup / Delivery
Attacker delivers an indirect prompt injection via a poisoned README, web page, or MCP output, or plants a symlink with an image extension inside a cloned workspace pointing to a sensitive file outside it.
AML.T0051.001
Tool Invocation
Injected instructions cause the agent to call image_analyze on the symlinked path; because the tool is ReadOnly-classified, it is auto-approved with no user prompt.
AML.T0053
Boundary Bypass / Read
The lexical path check passes since the symlink name contains no traversal components, and tokio::fs::read follows the symlink to read bytes from outside the workspace.
AML.T0037
Exfiltration
The file's bytes are base64-encoded into the chat-completion payload and POSTed to the configured vision endpoint along with the user's bearer token, exposing the data to the provider and any intercepting proxy.
AML.T0086

What systems are affected?

Package Ecosystem Vulnerable Range Patched
DeepSeek TUI npm >= 0.8.41, < 0.8.64 0.8.64
DeepSeek TUI cargo >= 0.8.41, < 0.8.64 0.8.64
DeepSeek TUI npm >= 0.8.32, < 0.8.41 0.8.41
DeepSeek TUI cargo >= 0.8.32, <= 0.8.41 No patch

How severe is it?

CVSS 3.1
7.5 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 35% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Moderate

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C High
I None
A None

What should I do?

1 step
  1. 1) Upgrade CodeWhale to >=0.8.64 (npm/cargo) or deepseek-tui to >=0.8.41 (npm) — the fix routes image_analyze through the existing resolve_path canonicalization used by every other file tool. 2) Until patched, audit workspaces (especially freshly cloned repos or CI artifact checkouts) for symlinks with image extensions (find . -type l -name '*.png' -o -name '*.jpg' ...) and remove/quarantine any pointing outside the workspace root. 3) Disable or force manual approval for image_analyze/vision tools in agent configs that process untrusted external content (web fetch, MCP servers, unreviewed repos). 4) Monitor egress to configured vision base_url endpoints for unexpectedly large or frequent base64 image payloads, which would indicate bulk file reads rather than legitimate screenshots. 5) Rotate any credentials or secrets that lived in files reachable via symlink from agent workspaces prior to patching, since exposure cannot be ruled out retroactively.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
NIST AI RMF
MEASURE 2.7 - AI system security and resilience evaluation
OWASP LLM Top 10
LLM02:2025 - Sensitive Information Disclosure LLM06:2025 - Excessive Agency

Frequently Asked Questions

What is CVE-2026-75914?

The image_analyze tool in CodeWhale/deepseek-tui (an AI coding-agent CLI) checks image paths for traversal syntax like "../" but never resolves symlinks, so a workspace symlink pointing outside the project — something ordinary in cloned repos with shared CI artifacts or design assets — gets read transparently and its bytes are base64-encoded straight into the vision API request. Because the tool carries ReadOnly capability, it is auto-approved by default, meaning a prompt injection hidden in a README, fetched webpage, or MCP tool output can trigger the read-and-exfiltrate on the same turn with zero visible user prompt. Current exploitation signals are modest — EPSS sits at 0.42% (top 65th percentile), it's not in CISA KEV, and there's no public exploit or Nuclei template — but the package has 0 tracked downstream dependents and 10 other CVEs in its history, suggesting a young, still-hardening codebase rather than low severity. Every peer file-reading tool in the same codebase (image_ocr, read_file, apply_patch, rlm_open) already uses the canonicalizing resolve_path check, so this is an isolated gap, not a design tradeoff. Upgrade to CodeWhale/deepseek-tui 0.8.64+ immediately, and until then treat any workspace containing symlinks with image extensions as untrusted and disable auto-approval for image_analyze.

Is CVE-2026-75914 actively exploited?

No confirmed active exploitation of CVE-2026-75914 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-75914?

1) Upgrade CodeWhale to >=0.8.64 (npm/cargo) or deepseek-tui to >=0.8.41 (npm) — the fix routes image_analyze through the existing resolve_path canonicalization used by every other file tool. 2) Until patched, audit workspaces (especially freshly cloned repos or CI artifact checkouts) for symlinks with image extensions (`find . -type l -name '*.png' -o -name '*.jpg' ...`) and remove/quarantine any pointing outside the workspace root. 3) Disable or force manual approval for image_analyze/vision tools in agent configs that process untrusted external content (web fetch, MCP servers, unreviewed repos). 4) Monitor egress to configured vision `base_url` endpoints for unexpectedly large or frequent base64 image payloads, which would indicate bulk file reads rather than legitimate screenshots. 5) Rotate any credentials or secrets that lived in files reachable via symlink from agent workspaces prior to patching, since exposure cannot be ruled out retroactively.

What systems are affected by CVE-2026-75914?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, AI coding assistant CLI tools, multimodal tool-use pipelines.

What is the CVSS score for CVE-2026-75914?

CVE-2026-75914 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.42%.

What is the AI security impact?

Affected AI Architectures

agent frameworksAI coding assistant CLI toolsmultimodal tool-use pipelines

MITRE ATLAS Techniques

AML.T0037 Data from Local System
AML.T0051.001 Indirect
AML.T0053 AI Agent Tool Invocation
AML.T0086 Exfiltration via AI Agent Tool Invocation

Compliance Controls Affected

EU AI Act: Article 15
NIST AI RMF: MEASURE 2.7
OWASP LLM Top 10: LLM02:2025, LLM06:2025

What are the technical details?

Original Advisory

### 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 26de44a8bd5051f8f944ea60b2c37ae1d2b7d25e. Users should upgrade to 0.8.64 or later. The original reporter analysis is preserved below. ### Summary image_analyze follows workspace symlinks and leaks outside-workspace file bytes to the vision endpoint The image_analyze tool resolves its image_path with a bare context.workspace.join instead of routing through ToolContext::resolve_path. The pre-join lexical check rejects absolute paths, Windows prefixes, and parent-dir components but never canonicalizes, so a symlink inside the workspace whose name ends in an image extension and whose target sits outside the workspace is read transparently. The tool has ReadOnly capability and the trait default makes it auto-approved, so the bypass executes with no user prompt. ### Details In `crates/tui/src/vision/tools.rs` (v0.8.37, lines 104-123): ```rust async fn execute(&self, input: Value, context: &ToolContext) -> Result<ToolResult, ToolError> { let image_path = required_str(&input, "image_path")?; let prompt = input .get("prompt") .and_then(|v| v.as_str()) .unwrap_or("Describe this image in detail."); let image_path_buf = Path::new(image_path); if image_path_buf.components().any(|c| { matches!( c, Component::Prefix(_) | Component::RootDir | Component::ParentDir ) }) { return Err(ToolError::execution_failed( "image_path must be a relative path within the workspace and cannot escape it.", )); } let resolved_path = context.workspace.join(image_path_buf); let (image_data, mime_type) = Self::read_image_file(&resolved_path).await?; ``` `read_image_file` (lines 31-39) is a `tokio::fs::read(path)` call which follows symlinks. The bytes are then base64-encoded and embedded as `data:<mime>;base64,<bytes>` in the chat-completion payload that is POSTed to `${base_url}/chat/completions` with the user's Authorization header. The lexical guard rejects `../etc/passwd`, `/etc/passwd`, and `C:\Windows\...`, but a symlink such as `workspace/screenshot.png -> /etc/passwd` produces components `[Normal("screenshot.png")]`. None of `Prefix`, `RootDir`, or `ParentDir` match, so the check passes and the symlink is followed at read time. The peer file-reading tools all use the central resolver instead. For example, `crates/tui/src/tools/image_ocr.rs:60-65`: ```rust let path_str = required_str(&input, "path")?; let image_path = context.resolve_path(path_str)?; ``` `resolve_path` in `crates/tui/src/tools/spec.rs:342-449` canonicalizes the candidate and rejects results whose canonical form does not start with the canonical workspace path: ```rust if candidate.exists() { let canonical = candidate.canonicalize().map_err(...)?; if !canonical.starts_with(&workspace_canonical) && !self.is_trusted_external_path(&canonical) { return Err(ToolError::PathEscape { path: canonical }); } ... } ``` In the same symlink scenario, `image_ocr`, `pandoc_convert`, `read_file`, `apply_patch`, `rlm_open`, and `fim` all return `ToolError::PathEscape` because the canonical target falls outside the workspace. `image_analyze` is the lone caller that skips this check. The tool declares `ToolCapability::ReadOnly` and does not override `approval_requirement()`. The trait default (`crates/tui/src/tools/spec.rs:612-620`) resolves ReadOnly to `ApprovalRequirement::Auto`. The engine then sets `approval_required = spec.approval_requirement() != ApprovalRequirement::Auto`, which is `false` for this tool (`crates/tui/src/core/engine/turn_loop.rs:1159-1184`). The model can invoke `image_analyze` on any turn without a user prompt. The recent commit `2326220 fix(vision): reject rooted image paths on windows` (2026-05-12) tightened the lexical guard to catch Windows drive prefixes, but the original review missed that the underlying problem is that this site never used `resolve_path` in the first place. ### PoC A standalone Cargo test reproduces the read-through. Save as `crates/tui/tests/image_analyze_symlink_escape.rs`: ```rust use deepseek_tui::config::VisionModelConfig; use deepseek_tui::tools::spec::{ToolContext, ToolSpec}; use deepseek_tui::vision::tools::ImageAnalyzeTool; use serde_json::json; use std::fs; use tempfile::tempdir; #[tokio::test] #[cfg(unix)] async fn image_analyze_follows_workspace_symlink_outside_workspace() { let outer = tempdir().unwrap(); let workspace = outer.path().join("workspace"); let outside = outer.path().join("outside"); fs::create_dir_all(&workspace).unwrap(); fs::create_dir_all(&outside).unwrap(); // A file that the workspace boundary should keep the tool from reading. let secret = outside.join("secret.txt"); fs::write(&secret, b"OUTSIDE-WORKSPACE-SECRET-MARKER").unwrap(); // Pre-existing symlink in the workspace with an image extension. std::os::unix::fs::symlink(&secret, workspace.join("screenshot.png")).unwrap(); let ctx = ToolContext::new(workspace); let tool = ImageAnalyzeTool::new(VisionModelConfig { model: "test".into(), api_key: Some("test".into()), base_url: Some("http://127.0.0.1:1/v1".into()), }); // The execute call will fail at the HTTP layer because the mock endpoint // is unreachable, but read_image_file has already been called. Reach the // file-read step by asserting that the failure is the HTTP error, not a // PathEscape error from the resolver. let err = tool .execute(json!({"image_path": "screenshot.png"}), &ctx) .await .expect_err("expected HTTP failure after symlink read"); let msg = format!("{err:?}"); assert!( !msg.contains("PathEscape"), "symlink should have been refused before read; got {msg}" ); // To prove the bytes actually left the process, point base_url at a // capturing wiremock instance and assert that the OUTSIDE-WORKSPACE-SECRET-MARKER // substring appears in the captured base64-decoded request body. } ``` For comparison, the same workspace exercised via `read_file` returns `ToolError::PathEscape`: ```rust #[tokio::test] #[cfg(unix)] async fn read_file_refuses_workspace_symlink_outside_workspace() { use deepseek_tui::tools::file::ReadFileTool; let outer = tempdir().unwrap(); let workspace = outer.path().join("workspace"); let outside = outer.path().join("outside"); fs::create_dir_all(&workspace).unwrap(); fs::create_dir_all(&outside).unwrap(); fs::write(outside.join("secret.txt"), b"X").unwrap(); std::os::unix::fs::symlink(outside.join("secret.txt"), workspace.join("link.txt")).unwrap(); let ctx = ToolContext::new(workspace); let err = ReadFileTool .execute(json!({"path": "link.txt"}), &ctx) .await .expect_err("expected PathEscape"); assert!(format!("{err:?}").contains("PathEscape")); } ``` The fix is one line on `crates/tui/src/vision/tools.rs:122`: ```rust - let resolved_path = context.workspace.join(image_path_buf); + let resolved_path = context.resolve_path(image_path)?; ``` `resolve_path` already handles the pre-join lexical checks (so the existing `Path::new(image_path).components().any(...)` block can also be removed), canonicalizes through symlinks, and re-checks workspace containment. The behavior the lexical guard already promises (path stays inside the workspace) is then actually delivered. ### Impact A workspace symlink whose name ends in `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, or `.bmp` and whose target sits outside the workspace becomes a read primitive that the model can invoke without an approval prompt. The file bytes are base64-encoded into the `image_url.url` field of the chat-completion payload and POSTed to the configured vision endpoint along with the user's bearer token. Three exposure channels follow from a single invocation: the vision provider receives every byte of the target file in plaintext (most providers retain request bodies for abuse review or model training), any TLS-terminating corporate proxy on the egress path captures the same bytes, and any transparent middlebox with MITM visibility logs the payload. The preconditions are everyday workspace shapes: cloned repositories that ship symlinks to shared media (CI artifact bundles, photo libraries, design assets), a developer who staged an external file via `ln -s`, or a `git clone` with `core.symlinks=true` against a repository that includes such a link. Because the tool is auto-approved, a prompt-injection delivered through a poisoned README, fetched web page, or MCP server output can issue `{"image_path": "screenshot.png"}` and the bytes leave the machine on the same turn without any visible UI cue. The fix is identical to the pattern used by every other file-reading tool in this codebase, so the gap is a missed `resolve_path` call rather than a design tradeoff.

Exploitation Scenario

An attacker plants a poisoned README, a web page the agent is asked to summarize, or malicious MCP tool output containing an indirect prompt injection. The injected instructions direct the agent to invoke `image_analyze` with `image_path: "screenshot.png"`, where `screenshot.png` is a pre-existing (or attacker-created via an earlier write action) symlink inside the workspace pointing to `~/.ssh/id_rsa`, `.env`, or a cloud credentials file renamed/aliased with an image-like symlink name. Because the tool is ReadOnly and auto-approved, no confirmation dialog appears; `tokio::fs::read` follows the symlink, the file's raw bytes are base64-encoded and embedded in a `data:<mime>;base64,...` chat-completion request, and that request — including the user's Authorization bearer token — is POSTed to the configured vision provider. The secret material is now retained by the vision provider's backend and visible to any TLS-terminating corporate proxy on the egress path, with no trace in the UI beyond a routine-looking image-analysis tool call.

Weaknesses (CWE)

CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

  • [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
  • [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Timeline

Published
September 4, 2026
Last Modified
September 4, 2026
First Seen
September 4, 2026

Related Vulnerabilities