Описание
uniget CLI has Path Traversal in Hook Files - Directory Escape Vulnerability
Summary
Path Traversal vulnerability in hook filename handling allows attackers to access and manipulate arbitrary files outside the hooks directory via directory escape sequences like passwd.
Details
File: hooks.go Lines 135-160
Hook filenames are concatenated directly without sanitizing ../ sequences, allowing directory traversal.
PoC
Step 1: Set cat as editor
Step 2: Read /etc/passwd via path traversal
Step 3: Output shows file contents
Пакеты
gitlab.com/uniget-org/cli
< 0.27.6
0.27.6
Связанные уязвимости
uniget is a universal installer and updater for (container) tools. Prior to 0.27.6, the hooks edit command in cmd/uniget/hooks.go concatenates an unvalidated hook filename with the selected hooks directory, allowing parent-directory components to escape that directory. The resulting path is passed to the configured editor, which can access or modify files outside the hooks directory with the privileges of the uniget process account. This issue is fixed in version 0.27.6.