Description
A vulnerability in the Gemini CLI and associated GitHub Action allowed an unprivileged attacker to achieve an arbitrary code execution in Gemini CLI via untrusted local .env files overriding GEMINI_CLI_HOME.
Published: 2026-09-10
Score: 9.2 Critical
EPSS: n/a
KEV: No
Impact: Arbitrary code execution
Action: Immediate Patch
AI Analysis

Impact

A vulnerability in the Gemini CLI and its associated GitHub Action allowed an unprivileged attacker to invoke arbitrary code execution by providing untrusted local .env files that overwrite the GEMINI_CLI_HOME environment variable. The flaw arises from insufficient validation of environment variable content, enabling malicious code to be executed under the permissions of the CI job. The attacker gains the same privileges as the workflow, potentially compromising the build environment or downstream deploys.

Affected Systems

The affected products are Google Cloud Gemini CLI and the Google Cloud Run Gemini CLI GitHub Action. Versions prior to the latest release (v0.1.22) are impacted, as the advisory does not list a specific vulnerability fix date but recommends upgrading to the latest version. Users should verify that their installed Gemini CLI or action matches or exceeds the released version on GitHub.

Risk and Exploitability

The CVSS score of 9.2 indicates a high severity of potential impact. EPSS is not available, and the vulnerability is not currently listed in CISA KEV. The likely attack vector involves an attacker with write access to a repository or the ability to supply local .env files in the CI environment, then executing arbitrary commands as the job's runner. Based on the description, the vulnerability appears exploitable via the CI workflow and requires untrusted local data; prevention is through updating to a patched version and configuring GEMINI_TRUST_WORKSPACE as directed by the vendor.

Generated by OpenCVE AI on September 10, 2026 at 09:20 UTC.

Remediation

Vendor Solution

* Upgrade: Ensure you are using the latest version of gemini cli and follow the best practices guide https://github.com/google-github-actions/run-gemini-cli/blob/main/docs/trust-guidance.md * Configure Trust: Determine if your CI workflow operates on trusted or untrusted data. If the data is fully trusted, set GEMINI_TRUST_WORKSPACE: 'true' in your workflow.


OpenCVE Recommended Actions

  • Upgrade Gemini CLI and the run-gemini-cli GitHub Action to the latest released version (v0.1.22 or newer).
  • If your CI workflow processes data that is not fully trusted, set the environment variable GEMINI_TRUST_WORKSPACE to 'true' in your workflow to prevent overriding of GEMINI_CLI_HOME by local environments.
  • Review repository access controls to ensure only trusted contributors can modify .env files or CI workflow files, and remove any untrusted .env files from the repository.

Generated by OpenCVE AI on September 10, 2026 at 09:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 10 Sep 2026 08:45:00 +0000

Type Values Removed Values Added
Description A vulnerability in the Gemini CLI and associated GitHub Action allowed an unprivileged attacker to achieve an arbitrary code execution in Gemini CLI via untrusted local .env files overriding GEMINI_CLI_HOME.
Title Arbitrary Code Execution in Gemini CLI via Symlinked Environment Variables
Weaknesses CWE-20
CWE-78
References
Metrics cvssV4_0

{'score': 9.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L/U:Amber'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GoogleCloud

Published:

Updated: 2026-09-10T08:33:09.309Z

Reserved: 2026-06-29T15:39:28.269Z

Link: CVE-2026-13745

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-10T09:17:00.703

Modified: 2026-09-10T09:17:00.703

Link: CVE-2026-13745

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-10T09:30:10Z

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')