/

CVE-2026-27806

Severity:

HIGH RISK

(7.8)

Command Injection in Fleet Orbit FileVault Key Rotation

CVE-2026-27806

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Local Privilege Escalation to Root

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

Fleet's Orbit agent prior to 4.81.1 contains a command injection vulnerability in the FileVault disk encryption key rotation flow, where a local user's password is interpolated directly into a Tcl/expect script.

By supplying a specially crafted password containing Tcl control characters, a local unprivileged user may inject arbitrary Tcl commands into an expect process running as root, leading to local privilege escalation.

Affected context

The vulnerability appears in the macOS FileVault disk encryption key rotation flow implemented by the Orbit agent.

It affects environments where:

  • Orbit is installed and running with root privileges
  • The FileVault key rotation feature is used
  • A GUI dialog collects the logged-in user's password to pass to a Tcl/expect script

The issue is specific to how the password is incorporated into the Tcl script that is executed via exec.Command("expect", "-c", script) and does not rely on remote network access.

Exploit preconditions

  • Attack surface: Local interactive user on a system managed by Orbit
  • Required access: Ability to trigger the FileVault disk encryption key rotation flow and enter a password in the Orbit GUI password dialog
  • Trigger point: Submission of a specially crafted password containing Tcl metacharacters (such as }) during the GUI prompt, which is then interpolated into a Tcl send {%s} call within an expect script
  • Why exploitation is possible: The password is inserted directly into a brace-quoted Tcl string without escaping or validation. A } in the password prematurely closes the literal, allowing the attacker-controlled remainder to be interpreted as Tcl commands executed by an expect process that inherits root privileges from the Orbit agent.

Why this happens

The core issue is unvalidated and unsanitized user input being embedded in a script that is executed by a high-privilege process.

Orbit constructs a Tcl/expect script as a string and interpolates the user-supplied password into a brace-quoted send {%s} segment. In Tcl, brace-quoted strings ({...}) are syntactic constructs, not raw literals; a closing brace in the data terminates the block, allowing any subsequent characters to form new commands.

This pattern maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), extended to script injection in a command interpreter. By treating authentication data as trusted code context, the system allows the password field to break out of the intended data literal and inject attacker-controlled Tcl instructions that are executed as root.

Potential impact

  • Local unprivileged users can escalate to root privileges on affected systems
  • Execution of arbitrary commands or scripts with full system control
  • Installation of persistent malware or backdoors at the OS level
  • Access to or exfiltration of sensitive data protected by system-level permissions
  • Tampering with security settings, including disk encryption configurations

General mitigation guidance

Mitigation typically centers on treating all user-derived values as untrusted data and avoiding direct interpolation into interpreter or shell scripts.

Recommended defensive patterns include:

  • Separating code and data: Avoid generating scripts by string concatenation; pass sensitive values (such as passwords) via secure channels like environment variables, standard input, or interpreter-native argument passing mechanisms that do not require quoting.
  • Robust escaping and validation: If interpolation is unavoidable, apply strict escaping routines appropriate for the target interpreter (here, Tcl) to neutralize special characters, and validate password input for control characters when compatible with policy.
  • Minimizing interpreter usage in privileged code: Prefer direct system APIs or language-native libraries for operations like key rotation instead of invoking secondary scripting engines.
  • Least privilege design: Where possible, limit the privileges of the component handling user input and isolate privileged operations in narrowly scoped helper processes with well-defined, parameterized interfaces.
  • Secure GUI-to-privilege boundary handling: Ensure GUI-collected secrets are never treated as part of executable code paths when crossing from user context into privileged workflows.

How teams detect issues like this

Effective detection approaches focus on identifying script and command construction patterns that embed user input:

  • Static analysis checks: Configure rules to flag instances where user-controllable variables are interpolated into command strings, scripts, or interpreter invocations (e.g., calls to exec.Command with dynamically built script bodies, especially for tools like expect, sh, bash, or other interpreters).
  • Code review patterns: Review any code that:
  • Builds scripts as strings
  • Uses format functions (sprintf, fmt.Sprintf, string templates) to inject variables into script bodies
  • Invokes interpreters from privileged services

Look specifically for password or credential variables being concatenated into script text.

  • Security linting and CI policies: Integrate automated linters or SAST tools that enforce policies such as "no dynamic script generation in privileged components" or "no direct user input in command arguments without escaping."
  • Runtime monitoring (optional): On high-value systems, monitor for unexpected expect or similar interpreter invocations from privileged agents, and correlate with user interactions that include unusual characters in input fields.

Sources

SourceLink
github.comgithub.com/fleetdm/fleet/security/advisories/GHSA-rphv-h674-5hp2

Frequently asked

questions

It is primarily a local vulnerability. An attacker must be able to interact with the affected system and supply a crafted password to the Orbit GUI dialog that triggers the FileVault key rotation flow. There is no direct remote network vector described.

The attacker needs local, unprivileged user access on a system where Orbit is installed and the FileVault key rotation feature is available. They must be able to initiate the rotation flow and enter a password in the dialog.

The safest approach is to eliminate dynamic script construction with embedded user input. Instead, pass user-derived data to interpreters or system utilities through parameterized interfaces (arguments, stdin, environment variables) that treat it strictly as data, or replace the interpreter usage with direct API calls that do not require quoting or escaping.

Adopt a development practice that forbids treating user input as part of executable code, enforce code review and static analysis rules targeting injection patterns, reduce reliance on general-purpose interpreters in privileged code, and design privilege boundaries so that sensitive operations are performed through narrow, parameterized interfaces with strong input validation and escaping tailored to the target environment.

Find out what's already
exploitable in your codebase.