matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: Path traversal in folder cache sanitization

Open andrinoff opened this issue 7 months ago • 2 comments

Describe the bug Folder name sanitization at config/folder_cache.go:67 doesn't prevent ../ sequences. Folder named containing ../ could escape cache directory.

To reproduce

  1. Create folder with name like "a/../sensitive"
  2. sanitizeFolderName() only replaces / but not ..
  3. Cache files written outside intended directory

Expected behavior Use filepath.Clean() or reject names with ..

Matcha version master

OS All

Additional context File: config/folder_cache.go line 67 Security: path traversal vulnerability

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