CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-75914

CVE-2026-75914: Improper Link Resolution and Path Traversal in CodeWhale image_analyze Tool

Alon Barad
Alon Barad
Software Engineer

Sep 4, 2026·5 min read·39 visits

Executive Summary (TL;DR)

CodeWhale versions prior to 0.8.64 are vulnerable to a path traversal attack. By introducing a symbolic link inside the agent workspace that points to a sensitive host file but naming it with an image extension, attackers can force the image_analyze tool to read the target file, encode its contents, and leak them directly to a vision LLM endpoint without user consent.

An improper link resolution vulnerability (CWE-59) in the image_analyze tool of CodeWhale allows remote attackers to traverse directories (CWE-22) and leak sensitive local files via symlink manipulation.

Vulnerability Overview & Attack Surface

CodeWhale is an open-source, terminal-based autonomous coding assistant implemented in Rust. To assist developers with visual assets, CodeWhale integrates a vision subsystem featuring the image_analyze tool. This tool exposes an attack surface by accepting directory path parameters from the agent's current workspace, reading the specified target files, and transmitting them to a configured vision model endpoint for text extraction or description.

To prevent the autonomous agent from accessing host resources outside its intended scope, the application establishes a logical workspace boundary. All tool execution is intended to be confined within this root workspace directory. However, in versions prior to 0.8.64, the path validation implementation relied exclusively on abstract string parsing rather than physical filesystem-backed validation, which completely bypassed this confinement boundary.

This vulnerability is highly relevant in autonomous agent workflows where the agent operates on untrusted codebases or repositories cloned from the internet. An attacker can structure a malicious repository to include nested symbolic links. When CodeWhale executes tools over this directory, the security boundaries fail, allowing the agent to read arbitrary host files, including configuration files, credentials, and local system parameters.

Root Cause & Symlink Mechanics

The underlying vulnerability is an instance of CWE-59 (Improper Link Resolution) leading to CWE-22 (Path Traversal). The core defect resides in the path validation logic of the image_analyze tool located in crates/tui/src/vision/tools.rs. Before opening a file, the application validates the candidate path parameter (image_path) using the standard library's logical path parsing API.

Specifically, the validator scans the path's components to check if any of them match Component::Prefix, Component::RootDir, or Component::ParentDir (such as ..). If these components are absent, the application assumes the path is a safe relative path and joins it to the workspace root directory. This model is fundamentally flawed because it operates entirely on the lexical structure of the path string and does not inspect the underlying physical filesystem objects.

Under standard operating systems, a symbolic link (symlink) is a filesystem object that references another file or directory path. A symlink's directory entry contains only a standard, benign name (for example, leak.png). Because the name contains no relative traversal tokens, it passes the lexical verification check. When the application subsequently invokes filesystem operations such as std::fs::read on the resolved workspace path, the operating system kernel transparently follows the symlink to its physical destination outside the workspace, resulting in an unauthorized out-of-bounds file read.

Code Analysis: Vulnerable vs. Patched Implementations

In the vulnerable implementation, the application checks path safety lexically and immediately appends the input to the workspace path without resolving the physical destination. This can be seen in the following code block:

// Vulnerable Implementation (Before 0.8.64)
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?;

The patch introduced in version 0.8.64 resolves this defect by establishing a safe path resolver function, resolve_image_path. This function canonicalizes both the workspace root and the candidate path before performing a safety check. Canonicalization resolves all symbolic links, relative segments, and redundant separators, converting the path into its unique absolute physical representation on the filesystem.

// Patched Implementation in 0.8.64
fn resolve_image_path(workspace: &Path, image_path: &str) -> Result<PathBuf, ToolError> {
    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.",
        ));
    }
 
    // Establish a verified canonicalized baseline for the workspace root
    let workspace = workspace.canonicalize().map_err(|e| {
        ToolError::execution_failed(format!("Failed to resolve workspace path: {e}"))
    })?;
    
    // Construct the absolute candidate path and canonicalize it to resolve symlinks
    let candidate = workspace.join(image_path_buf);
    let resolved = candidate.canonicalize().map_err(|e| {
        ToolError::execution_failed(format!("Failed to resolve image file: {e}"))
    })?;
    
    // Verify the physical target path resides strictly inside the canonical workspace prefix
    if !resolved.starts_with(&workspace) {
        return Err(ToolError::execution_failed(
            "image_path must resolve within the workspace and cannot escape it.",
        ));
    }
    Ok(resolved)
}

By comparing the canonicalized representation of the target path with the canonicalized workspace root using resolved.starts_with(&workspace), the application ensures that any attempt to follow a symlink that points to an external resource is detected and blocked before any read operations occur.

Exploitation Methodology & Proof-of-Concept

To exploit this vulnerability, an attacker must have the ability to supply or modify files within the directory where the CodeWhale agent is executing. This is typically achieved when the user clones an untrusted public repository or opens a project workspace containing malicious structures configured by an external threat actor.

The attacker first creates a symbolic link inside the project directory, giving it a filename that resembles a standard image file but targeting a sensitive resource on the host operating system. The following shell commands demonstrate this step on a Unix-like system:

# Establish a symbolic link pointing to the host's primary user account database
ln -s /etc/passwd ./leak.png

Once the symlink is placed, the attacker triggers the agent to run the image_analyze tool on the crafted path. The tool validates `

Official Patches

HmbownGit patch containing symbolic link prefix matching resolution tests.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.7/ 10
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
EPSS Probability
0.42%
Top 65% most exploited
150
via Shodan

Affected Systems

CodeWhale Terminal Coding Agent

Affected Versions Detail

Product
Affected Versions
Fixed Version
CodeWhale
Hmbown
>= 0.8.32, < 0.8.640.8.64
AttributeDetail
Primary CWE IDCWE-22
Secondary CWE IDCWE-59
Attack VectorNetwork
CVSS v4.0 Base Score8.7 (High)
Exploit Statuspoc
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The application fails to properly limit a pathname to a restricted directory by following symbolic links to external paths without canonicalization verification.

Known Exploits & Detection

GitHub Security AdvisoryOfficial security advisory describing the path traversal and unsafe symbolic link resolution mechanics.

Vulnerability Timeline

Vulnerability patched by maintainer in private repository
2026-06-21
Advisory published on GitHub and CVE-2026-75914 assigned
2026-08-18
NVD updates vulnerability parameters and CVSS classifications
2026-08-20

References & Sources

  • [1]GitHub Security Advisory GHSA-w7wx-5q49-r59w
  • [2]VulnCheck Advisory for CodeWhale
  • [3]NVD CVE-2026-75914 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 minutes ago•CVE-2026-109619
9.2

CVE-2026-109619: Remote Code Execution in PHP Core via Stale Global State Memory Corruption (PHP2Shell)

CVE-2026-109619 (PHP2Shell) is a critical Use-After-Free vulnerability in the core PHP engine caused by improper global state cleanup during out-of-memory exception handling across persistent worker requests.

Alon Barad
Alon Barad
1 views•6 min read
•5 minutes ago•CVE-2026-113721
4.5

CVE-2026-113721: Unsafe Link Resolution in virtualenv File Generation

In Python virtualenv prior to version 21.14.9, activation script generators and configuration writers use Path.exists() before writing files. Because Path.exists() resolves symbolic links, it returns False for dangling symlinks. Consequently, virtualenv skips unlinking pre-planted symbolic links or hard links, writing data directly to target locations outside the intended virtual environment directory.

Amit Schendel
Amit Schendel
1 views•5 min read
•9 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
31 views•5 min read
•9 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
19 views•6 min read
•10 days ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
18 views•5 min read
•10 days ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
24 views•6 min read