The vulnerability, CVE-2026-75914, describes a path traversal issue in the image_analyze tool of CodeWhale. The core problem lies in how the image_path input is resolved. Instead of using a secure path resolution mechanism that canonicalizes paths and checks against workspace boundaries, the ImageAnalyzeTool::execute function directly used context.workspace.join. This allowed an attacker to create a symlink within the workspace (e.g., workspace/screenshot.png -> /etc/passwd) and then provide screenshot.png as the image_path. The context.workspace.join would resolve this to workspace/screenshot.png, which, when read by tokio::fs::read (used within ImageAnalyzeTool::read_image_file), would follow the symlink and read the contents of /etc/passwd. The ImageAnalyzeTool was also auto-approved, meaning no user interaction was required for exploitation.
The patch confirms this analysis by replacing the insecure context.workspace.join(image_path_buf) with a call to a newly introduced secure path resolution function, Self::resolve_image_path, within the execute method. This new function performs the necessary canonicalization and boundary checks. Therefore, ImageAnalyzeTool::execute is the primary vulnerable function as it contained the insecure logic, and ImageAnalyzeTool::read_image_file is the function that performs the sensitive operation (reading the file) with the unsanitized path, making both critical to the exploitation chain.