/

CVE-2026-45152

Severity:

HIGH RISK

(7.8)

Command Injection in uniget Metadata Processing

CVE-2026-45152

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection vulnerability in uniget allows arbitrary shell commands to be executed when metadata is processed with /bin/bash -c using unvalidated input from the check field.

If an attacker can supply or influence JSON metadata consumed by uniget, they can trigger arbitrary code execution during routine operations like describe, install, update, or inspect, running with the privileges of the invoking user.

Affected context

This vulnerability affects environments where uniget is used to install or manage (container) tools and relies on external or potentially untrusted JSON metadata files.

The issue arises when the check field in these metadata files is treated as a shell snippet and executed directly via /bin/bash -c on the client system.

Systems are most exposed when metadata is fetched from remote sources, mirrors, or registries that are not strongly authenticated or integrity-protected, or when local metadata can be modified by other users or processes.

Exploit preconditions

  • Attack surface: Local uniget client processing JSON metadata for tools.
  • Required access: Ability to supply, alter, or intercept uniget metadata (e.g., hosting a malicious metadata source, modifying local cache, or influencing registry content).
  • Trigger point: Execution of uniget commands that read and evaluate the check field, such as describe, install, update, or inspect.
  • Why exploitation is possible: The check field content from JSON is passed directly to /bin/bash -c without validation, sanitization, or restriction, allowing arbitrary command chains to be executed in the user's shell context.

Why this happens

The underlying bug falls under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

The design assumes the check field in JSON metadata is trusted shell code and passes it unmodified to /bin/bash -c. This blends data and executable commands, allowing attackers to inject shell metacharacters, additional commands, or entirely different payloads.

Because no strict command construction, argument escaping, or whitelisting is applied, the shell interprets attacker-controlled content as part of the command line, enabling arbitrary OS command execution whenever uniget evaluates the metadata.

Potential impact

  • Execution of arbitrary commands on the victim system with the privileges of the user running uniget.
  • Installation of backdoors, malware, or unauthorized tools.
  • Unauthorized modification or exfiltration of local files accessible to the user.
  • Lateral movement within the user's environment (e.g., accessing local Docker, Kubernetes, or cloud CLIs configured on the system).
  • Compromise of CI/CD pipelines or build environments that rely on uniget for tooling.

General mitigation guidance

Effective mitigation focuses on separating untrusted data from command execution and minimizing shell usage:

  • Treat metadata as data only; avoid executing fields like check directly in a shell.
  • Prefer invoking specific binaries with parameterized arguments using safe APIs (e.g., exec-style functions or language-native process execution) that do not perform shell interpretation.
  • If shell usage is unavoidable, strictly constrain allowed commands using fixed templates, whitelists, and argument validation, refusing or ignoring unexpected content.
  • Introduce schema validation for metadata, ensuring the check field follows a narrow, well-defined format and rejecting entries that deviate.
  • Run uniget under the principle of least privilege (e.g., non-root accounts, constrained sudo rules, and restricted access to sensitive directories) to limit blast radius if misuse occurs.
  • Encourage deployment policies that use authenticated and integrity-checked metadata sources to reduce the chance of tampering.

How teams detect issues like this

Detecting this class of vulnerability typically involves:

  • Static analysis: Scanning source code for patterns like passing user or metadata fields directly into /bin/bash -c, system, or other shell-executing APIs, especially where interpolation or concatenation is present.
  • Code review cues: Flagging any feature where configuration, metadata fields, or user input is used as part of a shell command, and verifying that such input is either eliminated or strictly constrained.
  • Policy enforcement: Establishing guidelines that discourage generic shell execution in tooling, supplemented by automated checks in CI pipelines to block new instances of shell-based command construction from untrusted data.
  • Runtime monitoring: Using audit logs, EDR, or command-logging facilities to alert on unexpected shell executions originating from uniget processes, especially if they invoke unrelated system utilities or network tools.

Sources

SourceLink
github.comgithub.com/uniget-org/cli/security/advisories/GHSA-qqq4-5773-pmw5

Frequently asked

questions

Exploitability depends on whether an attacker can influence the JSON metadata uniget consumes. In environments where metadata is fetched from untrusted or poorly controlled sources, exploitation can be straightforward; in tightly controlled setups, the risk is reduced but still present if integrity controls are weak.

No elevated privileges are required beyond what is needed to deliver malicious metadata. The injected commands run with the same permissions as the user executing uniget, which can still be highly impactful, especially for users with administrative or CI/CD roles.

The safest pattern is to eliminate direct shell execution of untrusted input entirely. Replace shell-based command construction with structured process invocation, and, where dynamic behavior is needed, use well-defined parameters and allowlists instead of free-form command strings.

Design tools so that configuration and metadata are never treated as executable code, enforce strict input validation and schemas, and adopt coding standards that ban or tightly control shell calls. Incorporating security reviews, static analysis, and CI policies that flag shell execution from untrusted sources helps catch these issues early in development.

Find out what's already
exploitable in your codebase.