Skip to content

Read tool leaks directory listings outside worktree via 'did you mean' suggestions #33274

Description

@Harisimo

The read tool's 'did you mean' feature suggests similarly named folders outside the project worktree, leaking directory information that should be gated by the external_directory permission.

Steps to reproduce:

  1. Create a folder on the desktop (outside worktree)
  2. Use the read tool with a slightly misspelled path pointing to that folder
  3. The tool returns 'File not found' but suggests the actual folder name as a 'did you mean' alternative

Expected: The read tool should not access or list contents of directories outside the worktree.

Actual: Directory entries from outside the worktree are exposed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions