GitHub Advisoryadvisory · Go
GHSA-qmcq-xw74-w667 uniget CLI has an EDITOR Command Injection
MEDIUM
Official page ↗
- Aliases
- CVE-2026-55061
- Ecosystem
- Go
- Packages
- gitlab.com/uniget-org/cli
- Severity
- Moderate
- CVSS vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
- Weaknesses
- CWE-88
- Reviewed
- 2026-08-17
Affected packages
• Go gitlab.com/uniget-org/cli: < 0.27.6 → fixed in 0.27.6
Description
Summary
The uniget CLI has a command injection vulnerability in hooks.go line 199 where strings.Split(editor, " ") naively parses the EDITOR environment variable without respecting shell syntax. An attacker can set EDITOR="/path/to/wrapper && id && echo" which gets split into separate arguments, allowing the wrapper script to execute arbitrary commands like id. This was successfully exploited to execute uid=1000(w4nn4d13), confirming code execution is possible. The vulnerability affects hook editing and breaks configurations with modern editors like VSCode.
Vulnerable Code:
```
editorWithArgs := strings.Split(editor, " ")
```
Location Context:
```
editor := os.Getenv("UNIGET_EDITOR")
if len(editor) == 0 {
editor = os.Getenv("EDITOR")
}
editorWithArgs := strings.Split(editor, " ") // ← VULNERABLE
command := exec.Command(editorWithArgs[0], editorWithArgs[1:]...)
```
Issue: Naive space-splitting allows injection. EDITOR="script && id && echo" splits into ["script", "&&", "id", "&&", "echo"] enabling command execution.
Step to Reproduce
Step 1: Create malicious editor wrapper
```
mkdir -p /tmp/poc-editor
cat > /tmp/poc-editor/editor_wrapper.sh ~/.config/uniget/hooks/pre-install/test.sh
Related
Alias · CVE (1)
- CVE-2026-55061 uniget is a universal installer and updater for (container) tools. vulnerability
Weakness · CWE (1)
- CWE-88 Improper Neutralization of Argument Delimiters in a Command weakness