matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: Symlink attack in filepicker path navigation

Open andrinoff opened this issue 7 months ago • 2 comments

Describe the bug Filepicker at tui/filepicker.go:94 uses os.Stat() without checking symlinks. Attacker could create symlinks to read arbitrary directories.

To reproduce

  1. Create symlink: ln -s /etc/passwd ~/.config/matcha/link
  2. Navigate to symlink path via filepicker
  3. Contents of /etc exposed

Expected behavior Use os.Lstat() to detect symlinks, or explicitly follow only safe links

Matcha version master

OS Unix-like

Additional context File: tui/filepicker.go line 94 Security: symlink directory traversal

andrinoff avatar Apr 21 '26 14:04 andrinoff

This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.

floatpanebot avatar May 22 '26 06:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar Jun 04 '26 19:06 floatpanebot