uniget is Vulnerable to Command Injection in tool.Check Leading to Arbitrary Code Execution
Date: 2026-05
Affected: go/gitlab.com/uniget-org/cli
Attack vector: deserialization
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2026-45152
CWE: CWE-78
CVSS: 7.8 (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)

I discovered a command injection vulnerability in uniget that allows arbitrary command execution through the metadata loading and version check mechanism. ### Summary A command injection vulnerability exists in uniget due to unsafe execution of the `check` field from metadata files using `/bin/bash -c`. Because the `check` field is loaded directly from untrusted JSON metadata without validation or sanitization, an attacker can craft malicious metadata that executes arbitrary shell commands on the victim’s system when common uniget operations such as `describe`, `install`, `update`, or `inspect` are performed. This vulnerability can lead to arbitrary code execution with the privileges of the user running uniget. ### Details The vulnerable code is located in: `tool.go:250` Vulnerable function: ```go id="f2g0ic" func (tool *Tool) RunVersionCheck() (string, error) { cmd := exec.Command("/bin/bash", "-c", tool.Check+" | tr -d '\n'") version, err := cmd.Output() return string(version), nil } ``` The issue occurs because the `tool.Check` field is populated directly from metadata JSON files without validation. Related structure: ```go id="7f4yzm" type Tool struct { Check string } ``` Metadata loading uses `json.Unmarshal()` to populate the `Tool` struct directly from JSON metadata, allowing attacker-controlled input to reach the shell execution sink. Because `/bin/bash -c` is used, shell metacharacters such as `;`, `&&`, `|`, `$()`, and backticks are inte


Mitigations:

Architectural layers (MAESTRO):