Critical Gemini CLI Vulnerability Lets Hackers Run Malicious Commands Without Login

Blog WriterCybersecurity News - Original News Source is cybersecuritynews.com


A critical vulnerability in Google Gemini CLI’s automated GitHub Actions workflows could let remote attackers execute commands and read sensitive files through crafted GitHub issue text.

Tracked as CVE-2026-85259, the flaw affects legacy workflows in Gemini CLI and the run-gemini-cli GitHub Action from before May 12, 2026. Google published the vulnerability on December 1, with a CVSS v4.0 score of 10.0.

The attack requires no access to the runner or repository privileges, but the attacker must be able to submit text that reaches an affected workflow. “Without login” does not mean bypassing GitHub’s sign-in rules.

The exposed component is the automation surrounding Gemini CLI, rather than the Gemini model or normal local CLI use.

Gemini CLI Vulnerability

The vulnerable workflows used Gemini to sort issues, review contributions, or prepare fixes. Issue titles and descriptions reached the agent through environment variables such as ISSUE_TITLE and ISSUE_BODY.

Command templates included !{echo $ISSUE_TITLE} and !{echo $ISSUE_BODY}, which passed their output into the model prompt. A crafted issue could then reach a vulnerable agent-and-tool execution path with shell access.

That distinction matters. Ordinary shell expansion does not turn command characters stored inside an environment variable into a fresh command. These template lines alone therefore do not prove direct shell injection before the model runs.

The GitHub advisory confirms command execution and file reading, but does not publish the exact payload or execution sequence. Earlier Gemini CLI prompt-injection research covered the broader danger of agents processing outside text while holding privileged tools.

Commands execute with the permissions and access available to the workflow job. The documented issue-fixer workflow explicitly supplied GITHUB_TOKEN to the agent step and passed provider keys as action inputs.

If an accessible token allowed repository writes, an attacker could potentially change repository content. Command execution alone does not establish that such changes occurred.

Credential exposure also depends on process access. APP_PRIVATE_KEY belonged to an earlier token-minting step and was not shown as an agent environment variable.

Maintainers should not assume every repository secret reached the agent. However, persisted checkout credentials can increase the impact. A separate GitHub Actions credential-theft incident illustrates why runner secrets need tight controls.

Maintainers should inspect .github/workflows for run-gemini-cli references and identify jobs processing untrusted issue or pull-request text. Update the CLI, action, and copied templates to hardened revisions from May 12 or later. Updating the package alone does not update workflow files. Pin the action to a verified full commit SHA.

Google’s Gemini CLI patch added persist-credentials: false across 33 workflow files. This prevents checkout from saving its credential, but does not block access to an explicitly supplied GITHUB_TOKEN.

Remove unnecessary run_shell_command access and --yolo settings, narrow token permissions, and require maintainer approval before processing outside input.

Review past runs for unexpected commands, unfamiliar network requests, and unexplained repository changes. Rotate credentials potentially exposed during affected runs.

Ostorlab reported no public proof of concept or known exploitation for this CVE as of December 2. That absence is not evidence that exposed credentials remained safe, and the public record does not establish every possible downstream impact.

Provide SOC With the Latest Threat Context from 16K Sources to Quickly Stop Incidents

The post Critical Gemini CLI Vulnerability Lets Hackers Run Malicious Commands Without Login appeared first on Cyber Security News.