/

CVE-2026-34387

Severity:

CRITICAL RISK

(9.8)

Command Injection in Fleet Software Installer Pipeline

CVE-2026-34387

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Arbitrary Code Execution with Elevated Privileges

Severity:

CRITICAL RISK

(9.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 flaw in Fleet's software installer pipeline allows attacker-controlled input to be executed as system commands during the uninstall process of crafted software packages on managed hosts.

When exploited, this issue can grant arbitrary code execution with root privileges on macOS/Linux or SYSTEM privileges on Windows whenever an uninstall is triggered for a malicious or manipulated package.

Affected context

This vulnerability appears in environments where Fleet manages software installation and uninstallation on endpoint devices.

It becomes relevant when:

  • Fleet is configured to deploy and uninstall software packages on macOS, Linux, or Windows hosts.
  • The uninstall pipeline processes metadata, parameters, or scripts that can be influenced by an attacker.
  • Uninstall operations are performed automatically or by an administrator on software packages that may not be fully trusted or have been tampered with.

Exploit preconditions

  • Attack surface: Fleet-managed hosts during the software uninstall process.
  • Required access: Ability to introduce or modify a software package or its uninstall configuration so that Fleet processes attacker-controlled data (e.g., via a malicious package definition or compromised package source).
  • Trigger point: Execution of the uninstall action for the crafted software package through Fleet's software installer pipeline.
  • Why exploitation is possible: The uninstall logic incorporates unvalidated, attacker-influenced values directly into shell or system commands, allowing injection of additional commands or arguments that the underlying OS executes with elevated privileges.

Why this happens

The core issue is improper construction of system-level commands using data that is not treated as untrusted input.

In the uninstall pipeline, parameters such as paths, script fragments, or command arguments are likely concatenated into shell commands or passed to process execution APIs without strict validation, escaping, or use of non-shell-based invocation.

This aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where special characters and control operators in attacker-controlled input alter the intended command structure and enable arbitrary command execution.

Potential impact

  • Execution of arbitrary commands as root on macOS and Linux managed hosts.
  • Execution of arbitrary commands as SYSTEM on Windows managed hosts.
  • Complete compromise of affected endpoints, including credential theft and data exfiltration.
  • Installation of persistent malware or backdoors across a managed fleet.
  • Lateral movement within the organization's network from compromised endpoints.
  • Tampering with logs, security agents, and monitoring tools to evade detection.

General mitigation guidance

Effective mitigation focuses on removing direct string-based command construction and strictly limiting what uninstall operations can do:

  • Prefer APIs that avoid shell interpretation (e.g., direct process execution with argument vectors, platform-native uninstall mechanisms) instead of building shell command strings.
  • Enforce strict validation and canonicalization of all fields used in uninstall logic (paths, flags, script snippets), rejecting or sanitizing unexpected characters and structures.
  • Use allowlists for commands, arguments, and locations that can be involved in uninstall routines, rather than passing arbitrary values through.
  • Separate data from control: treat configuration values as data only, never as executable code or command fragments.
  • Run uninstall operations with the least privileges necessary and avoid unnecessary elevation to root or SYSTEM where possible.
  • Harden package onboarding workflows so only vetted sources and signed packages are distributed and managed.

How teams detect issues like this

Detection generally relies on a combination of code-level analysis and runtime monitoring:

  • Static analysis: Search for string concatenation or interpolation used to build shell commands from configuration or package metadata, especially where those strings are executed via system()-style APIs, shell invocation, or platform equivalents.
  • Code review signals: Pay attention to uninstall scripts or pipeline components that accept external input, environment variables, or package fields and pass them directly to command execution without canonicalization or strict validation.
  • Policy enforcement: Apply secure coding policies that disallow shell-based command construction in deployment and installer pipelines, and require use of safer execution primitives.
  • Runtime monitoring: On endpoints, monitor for unusual command patterns or uninstall processes launching unexpected binaries or shells when software is removed via Fleet.
  • Automated SAST or CI-integrated code review tools can be configured to flag OS command injection patterns and unsafe command construction in installer-related code.

Sources

SourceLink
github.comgithub.com/fleetdm/fleet/security/advisories/GHSA-7rhw-5mpv-gp4h

Frequently asked

questions

It can be, if an attacker can cause Fleet to deploy and later uninstall a crafted software package to multiple endpoints. The actual blast radius depends on how packages are sourced, who can configure them, and whether the attacker can influence those workflows.

The attacker needs the ability to introduce or modify software packages or their uninstall metadata processed by Fleet—this could be through compromised admin credentials, a poisoned package repository, or another weakness in the software distribution pipeline.

Redesign the uninstall pipeline so that commands are not constructed from raw, attacker-influenced strings. Use parameterized, non-shell execution APIs, apply strict allowlists for permissible commands and arguments, and perform rigorous validation on any data that affects uninstall behavior.

Adopt secure coding patterns for all installer and management workflows: never treat configuration as code, minimize reliance on shell execution, enforce strong input validation, and integrate static analysis and security reviews into the development and release lifecycle for management pipelines.

Find out what's already
exploitable in your codebase.