/

CVE-2026-39866

Severity:

HIGH RISK

(8.8)

Command Injection in Lawnchair GitHub Actions

CVE-2026-39866

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-77

Impact:

Arbitrary Code Execution in CI/CD Environment

Severity:

HIGH RISK

(8.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 Lawnchair's GitHub Actions workflow release_update.yml allows untrusted workflow dispatch inputs to be concatenated into shell commands.

When a maintainer or automation triggers this workflow with crafted input, it can lead to arbitrary code execution within the CI environment.

Affected context

This vulnerability occurs in the Lawnchair project's GitHub Actions automation, specifically in the release_update.yml workflow prior to commit fcba413f55dd47f8a3921445252849126c6266b2.

It is relevant in repository setups where:

  • Workflow dispatch inputs are accepted from users with workflow-trigger permissions, and
  • Those inputs are interpolated into shell commands or scripts without proper quoting or sanitization.

The issue is constrained to the CI/CD environment associated with the repository and does not directly affect end-user Android devices.

Exploit preconditions

  • Attack surface: GitHub Actions workflow dispatch interface for release_update.yml.
  • Required access: Ability to trigger the workflow with controlled input (e.g., write access or specific workflow-dispatch permissions on the repository).
  • Trigger point: Supplying crafted values in workflow dispatch input fields that are later inserted into shell commands.
  • Why exploitation is possible: The workflow constructs shell commands by directly embedding user-controlled input without robust quoting or validation, allowing the input to break out of the intended command structure and inject additional commands.

Why this happens

The core issue maps to CWE-77: Command Injection, where user-controlled data is incorporated into a command string executed by a shell.

In the affected release_update.yml workflow, parameters from the workflow dispatch event are used directly in run: steps or shell invocations, likely through string interpolation.

Because these parameters are not strictly validated, escaped, or restricted to a safe set of values, an attacker controlling them can introduce shell metacharacters or additional commands.

This pattern reflects a broader CI/CD anti-pattern: treating workflow inputs as trusted and embedding them into shell commands without defense-in-depth controls such as strict argument passing or input normalization.

Potential impact

  • Execution of arbitrary commands within the GitHub Actions runner environment.
  • Exfiltration of repository contents, build artifacts, or secrets accessible to the workflow.
  • Tampering with build outputs, tags, or release metadata produced by the workflow.
  • Lateral movement within the CI environment, subject to runner isolation and available credentials.
  • Disruption of CI/CD pipelines, including denial of service for automated release processes.

General mitigation guidance

Mitigation focuses on treating all workflow inputs as untrusted and minimizing their interaction with the shell.

Common defensive patterns include:

  • Avoiding direct string concatenation of user-controlled input into shell commands; instead, pass inputs as positional arguments to scripts where possible.
  • Applying strict validation and allowlists to workflow dispatch inputs (e.g., enumerated choices, regex constraints, or constrained boolean/number types).
  • Using robust quoting when interpolation into shell is unavoidable, and limiting the use of shell metacharacters.
  • Moving complex logic out of inline run: steps into scripts that can perform controlled parsing and validation of arguments.
  • Reducing the privileges and secrets available to workflows that accept user-supplied inputs, following least-privilege and separation-of-duties principles.

How teams detect issues like this

Effective detection involves examining CI configuration for unsafe command construction and monitoring workflow behavior:

  • Static analysis of workflows: Search for run: steps where ${{ github.event.inputs.* }} or other untrusted fields are concatenated directly into shell commands.
  • Policy-as-code checks: Enforce rules that prohibit unvalidated interpolation of inputs into bash, sh, or other shell invocations in CI configuration files.
  • Code review cues: Flag any use of workflow inputs in run: blocks without surrounding validation or quoting, and review PRs modifying CI scripts with security in mind.
  • Automated scanners: Use configuration linters or CI security tools that understand GitHub Actions syntax and can detect injection-prone patterns.
  • Runtime monitoring: Audit CI job logs for unexpected command structures or anomalous activity, especially around workflows that accept manual inputs.

Sources

SourceLink
github.comgithub.com/LawnchairLauncher/lawnchair/commit/fcba413f55dd47f8a3921445252849126c6266b2
github.comgithub.com/LawnchairLauncher/lawnchair/security/advisories/GHSA-9prc-pp2c-3427

Frequently asked

questions

It is exploitable through the GitHub Actions workflow interface by anyone who has permissions to invoke the affected workflow with custom input, which is typically limited to trusted collaborators. It is not directly exploitable by arbitrary unauthenticated internet users.

An attacker needs the ability to trigger the release_update.yml workflow and control its dispatch inputs. In most setups, that means having write or specific actions-related permissions on the repository.

The most robust fix is to avoid passing untrusted input to the shell at all. Where inputs must be used, constrain them via validation or enumerated options, pass them as arguments to scripts rather than embedding them in command strings, and ensure any interpolation is properly quoted.

Establish secure coding guidelines for CI configuration, require code review for workflow changes, and employ automated checks that flag direct interpolation of untrusted data into shell commands. Designing workflows with minimal privileges and clearly defined, validated inputs also significantly reduces risk.

Find out what's already
exploitable in your codebase.