Skip to content
Threat Feed
high advisory

Argument Injection Vulnerability in yggdrasil-worker-package-manager

An argument injection vulnerability in the APT backend of yggdrasil-worker-package-manager allows local attackers to manipulate apt-get command-line arguments to achieve root-level code execution.

CVE-2026-18157 identifies a critical argument injection vulnerability within the yggdrasil-worker-package-manager's APT backend. The vulnerability stems from improper validation of package names passed to the underlying apt-get utility. A local attacker who has already gained low-privileged access to the system can provide a maliciously crafted package name - specifically one beginning with a hyphen - which the application fails to distinguish from legitimate command-line flags.

When processed, these injected strings are interpreted by apt-get as command-line options rather than arguments. By leveraging specific apt-get options that permit the execution of arbitrary scripts or custom configurations (such as pre- or post-installation hooks), an attacker can achieve code execution with root privileges. This vulnerability is significant as it provides a direct path from low-privileged system access to a full root-level compromise of the host's integrity, confidentiality, and availability.

Attack Chain

  1. Attacker gains initial low-privileged access to the target host environment.
  2. Attacker identifies that the system utilizes yggdrasil-worker-package-manager for automated package operations.
  3. Attacker crafts a package name starting with a hyphen (e.g., "-oDir::Etc::SourceList=/tmp/malicious_list").
  4. Attacker triggers a package installation or update request via the vulnerable worker interface.
  5. yggdrasil-worker-package-manager constructs an apt-get command string incorporating the malicious input without proper sanitization.
  6. apt-get executes the command, interpreting the injected hyphenated string as a valid operational option.
  7. apt-get hooks or configuration directives are manipulated to execute arbitrary commands.
  8. Attacker achieves remote code execution or privilege escalation to the root user.

Impact

Successful exploitation of this vulnerability results in full system compromise. As the affected worker process interacts with the system's package manager, the resulting code execution occurs with root-level privileges. This enables an attacker to install persistent backdoors, exfiltrate sensitive data, manipulate system binaries, or disable security auditing mechanisms. The impact is categorized as high, with a CVSS v3.1 base score of 7.8, reflecting the potential for total system takeover by an authenticated local actor.

Recommendation

Prioritized actions for detection and mitigation:

  • Patch or update yggdrasil-worker-package-manager to the version that includes sanitization for input passed to apt-get.
  • Audit logs for execution of apt-get processes with anomalous command-line flags that suggest option injection (e.g., usage of "-o" or "--option" flags that reference temp or user-controlled directories).
  • Enforce strict least-privilege policies for accounts authorized to trigger package manager operations via the yggdrasil worker.
  • Monitor for unexpected parent-child process relationships where the worker service spawns apt-get with non-standard command-line arguments.