matcha
matcha copied to clipboard
BUG: Path traversal in folder cache sanitization
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
- Create folder with name like "a/../sensitive"
- sanitizeFolderName() only replaces / but not ..
- 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
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.
Closing due to inactivity. Reopen if still relevant.