/

CVE-2026-75914

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in CodeWhale image_analyze Tool

CVE-2026-75914

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Disclosure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in CodeWhale's image_analyze tool can cause files outside the intended workspace to be read through attacker-controlled symlinks. If an attacker can create or influence workspace links, file bytes from external image files may be sent to the vision endpoint without user approval.

Affected context

The issue occurs in CodeWhale deployments that use the image_analyze tool to read workspace images and do not canonicalize symlink targets before opening files. It becomes risky when an untrusted user, plugin, task, or workspace process can create symlinks pointing outside the approved workspace and the destination file is accepted based on its image extension.

Exploit preconditions

  • Attack surface: The image_analyze file-reading workflow
  • Required access: Ability to create or influence files or symlinks in a workspace
  • Trigger point: Image discovery or reading performed by image_analyze
  • Why exploitation is possible: File type or path checks may occur without resolving symlinks, allowing an apparently valid workspace image path to reference an external file
  • Additional condition: The referenced external file must be readable by the CodeWhale process and suitable for transmission to the vision endpoint

Why this happens

The underlying bug is insufficient path canonicalization during file access. When an application validates a workspace path without resolving symbolic links and then opens the resulting path, an attacker may redirect the read operation outside the intended directory. This behavior maps to CWE-22, Improper Limitation of a Pathname to a Restricted Directory, because the effective file boundary is not enforced after filesystem indirection is applied.

Potential impact

  • Sensitive file bytes could be disclosed to the vision endpoint
  • Confidential local or workspace data may be exposed
  • Data residency or privacy controls could be bypassed
  • Downstream systems may process or retain unintended file contents

General mitigation guidance

Mitigation generally focuses on enforcing the intended directory boundary

after resolving all filesystem indirection.

Common defensive patterns include:

  • Canonicalizing and resolving symlinks before authorization and file reads
  • Verifying that the resolved path remains beneath an approved workspace root
  • Rejecting symlinks or using file-descriptor-based access patterns where appropriate
  • Applying strict allowlists for readable directories and file types
  • Reducing process privileges and filesystem visibility
  • Requiring explicit user approval before transmitting workspace content externally
  • Treating filenames and extensions as untrusted metadata rather than proof of safety

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying path joins followed by file reads without canonicalization
  • Code review checks for symlink handling, workspace-boundary enforcement, and extension-only validation
  • Tests that place symlinks inside approved directories and verify that external targets are rejected
  • Runtime policies restricting file access to designated directories
  • Audit logs that record resolved paths and outbound file-processing requests

Automated security review tools may help identify filesystem access paths that lack containment checks.

Sources

SourceLink
github.comgithub.com/Hmbown/CodeWhale/commit/26de44a8bd5051f8f944ea60b2c37ae1d2b7d25e
github.comgithub.com/Hmbown/CodeWhale/security/advisories/GHSA-w7wx-5q49-r59w
vulncheck.comvulncheck.com/advisories/codewhale-before-path-traversal-via-image-analyze-symlink

Frequently asked

questions

Exploitation is generally indirect. An attacker must be able to influence a workspace or another input location that the image_analyze tool processes.

The attacker needs permission or an execution path that allows creation or modification of workspace symlinks. The CodeWhale process must also be able to read the targeted file.

Resolve symlinks and canonicalize the target before authorization, then verify that the final path remains within an explicitly approved directory.

Combine filesystem-boundary tests, strict workspace permissions, least-privilege execution, and explicit approval for sending local files to external services.

Find out what's already
exploitable in your codebase.