/

CVE-2026-75859

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in CodeWhale Config Files

CVE-2026-75859

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Disclosure and Sensitive Information Exposure

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

CodeWhale versions before 0.8.64 do not adequately validate file paths supplied through project configuration instructions. A malicious repository configuration may cause files outside the intended workspace to be read and inserted into an AI system prompt, potentially exposing sensitive data to an attacker.

Affected context

The vulnerability occurs when CodeWhale processes a cloned repository containing a malicious .codewhale/config.toml file. Risk increases when configuration-controlled instruction paths are resolved without being restricted to the project workspace, allowing references to accessible files elsewhere on the victim's system.

Exploit preconditions

  • Attack surface: Repository configuration processing in the CodeWhale client
  • Required access: The victim must clone or open a repository containing attacker-controlled project configuration
  • Trigger point: Evaluation of file paths specified in the configuration instructions field
  • Why exploitation is possible: Path validation does not sufficiently constrain resolved files to the intended workspace, and their contents are injected into the AI system prompt

Why this happens

The underlying bug is insufficient canonical path validation for configuration-controlled file references. A path supplied by an untrusted repository is treated as eligible for reading without reliably enforcing a workspace boundary, which maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The resulting file contents are then incorporated into an AI prompt, creating an additional data-exposure path.

Potential impact

  • Sensitive local files may be disclosed
  • Credentials, tokens, or private configuration data could be exposed
  • Confidential source code or user documents may be injected into the AI context
  • An attacker could use exposed prompt content for follow-on social engineering or account compromise
  • Organizational data-handling and privacy policies could be violated

General mitigation guidance

Mitigation generally focuses on reducing trust in repository-provided configuration and enforcing a strict file access boundary.

Common defensive patterns include:

  • Resolve and canonicalize paths before access, then require them to remain within an approved workspace
  • Reject absolute paths, traversal segments, symlink escapes, and other boundary-bypassing forms
  • Use an allowlist of permitted files or workspace-relative resources by default
  • Require explicit user consent before accessing files outside the project directory
  • Minimize the data inserted into AI prompts and redact sensitive content where practical
  • Run file-reading components with least-privilege operating-system permissions
  • Treat cloned repository instructions as untrusted input and preserve secure defaults

How teams detect issues like this

Organizations can detect similar issues through:

  • Static analysis for path joins and file reads driven by repository-controlled configuration
  • Code review checks for missing canonicalization, boundary checks, or symlink handling
  • Tests covering absolute paths, parent-directory traversal, symlink escapes, and platform-specific path formats
  • Runtime logging and policy enforcement for file reads outside an approved workspace
  • Automated security review tools that flag untrusted path input reaching filesystem APIs

Sources

SourceLink
github.comgithub.com/Hmbown/CodeWhale/commit/43563356b98c6b993085554da82e77370160a31c
github.comgithub.com/Hmbown/CodeWhale/security/advisories/GHSA-62f5-cp2p-vq95
vulncheck.comvulncheck.com/advisories/codewhale-before-arbitrary-file-read-via-instructions

Frequently asked

questions

It is typically triggered locally when a victim clones or opens a repository containing attacker-controlled CodeWhale configuration. The attacker does not necessarily need direct access to the victim's filesystem.

The attacker needs to influence the contents of a repository configuration file and persuade a victim to process that repository with an affected CodeWhale version.

Treat configuration paths as untrusted, canonicalize them, and permit reads only when the resolved target remains inside an explicitly approved workspace.

Apply workspace boundary checks, reject traversal and symlink escapes, minimize prompt data, use least-privilege execution, and require confirmation for access outside trusted project directories.

Find out what's already
exploitable in your codebase.