The wrong kind of access. [Research Saturday]
· Summarized
Key takeaways
- Gemini CLI was connected to GitHub Actions so an agent could read newly opened GitHub issues and label them, but that exposed an AI agent to untrusted user-controlled text inside a CI environment.
- Google’s intended Gemini CLI tool restrictions were ineffective because the repository used `core tools` instead of the required `core.tools` configuration field.
- Once unrestricted command execution was available, a prompt injection could make Gemini send the CI runner’s GCP credential to an attacker-controlled server.
- The credential was especially dangerous because it could impersonate any service account in the Gemini CLI’s GCP project, giving the agent far more authority than the task required.
- Google addressed the attack chain by correcting tool scoping, preventing Gemini from reading the credential file, and reducing service-account impersonation permissions.
- Lesichkin argues that system prompts, blocklists, and allowlists are not security boundaries or true sandboxes for coding agents.
- Every tool an agent receives is an attack surface, and agent identities should be limited to the least privilege needed for the specific task.
- The central research challenge was not merely finding a prompt injection, but finding the unintended bridges that let the injection reach credentials and produce real cloud impact.
Summary
A GitHub issue becomes the entry point to a cloud compromise
Host Dave Bittner introduces Dan Lesichkin, an AI security researcher at Pillar Security, to discuss the research “A WIF Of Fresh Access: How a GitHub Issue on Gemini CLI Led to GCP Project Compromise.” Lesichkin had already found a prompt-injection vulnerability in Google’s Gemini CLI repository, but while reviewing the project again he suspected that a second, more serious weakness might exist. He noticed what he called a “weird configuration” in the way Gemini GitHub Actions connected to Google Cloud Platform: a broad configuration that appeared capable of creating credentials with which an attacker could take over the Gemini CLI’s GCP project. Lesichkin explains that Gemini CLI is Google’s harness for working with Gemini, comparable in purpose to tools such as Cloud Code or Codex. It gives a language model operating-system tools so it can write code and perform tasks on a computer. Google had connected it to GitHub Actions so that, whenever a user opened an issue on the Gemini CLI repository, an agent would read the issue and assign a label such as feature, duplicate, bug, or security issue. That made the workflow useful for a busy repository, but it also meant that text supplied by an untrusted external user was being ingested by an agent running inside a CI environment.
The first credential-exfiltration plan failed because the secret was too large
The original vulnerability involved an external user opening a GitHub issue containing a prompt injection. Gemini CLI processed the issue in GitHub Actions, and although Google had supposedly limited the agent to tools such as `echo` and reading files, it was running in “YOLO mode,” where the tool restrictions were not actually effective. Lesichkin had previously used that weakness to obtain a GitHub token by getting the agent to execute code inside the Actions runner. After Google appeared to fix that issue, Lesichkin looked for a way to reach the more valuable GCP credential. His first hypothesis was that Gemini could read the credential file present in the CI runner and print it into the workflow logs. That approach failed in practice. The credential was a roughly 3,000-character JSON-style authentication file, and asking the model to reproduce it verbatim was unreliable. GitHub also automatically redacted secrets detected in logs. Lesichkin tried splitting the token into pairs of characters—roughly 1,500 separate pieces—so that the secret would not be recognized as one continuous value. Gemini still could not reliably output it, although Lesichkin saw fragments of the credential appear, which itself represented an unwanted leak.
A second researcher discovers that the supposed tool allowlist was never applied
To investigate further, Lesichkin gave the task to his team’s custom cloud-code harness. He forked the Gemini CLI project and instructed the harness to keep working until it could make Gemini read the credential. About ten minutes later, the harness reported that Gemini CLI had executed code in the machine. Lesichkin initially assumed the result was a hallucination—he says he was in his living room, “banging on the table,” insisting that the system was lying—so he made the harness confirm exactly how code execution was possible when only `echo` and file-reading tools were supposed to be available. The problem was a configuration-field mismatch. Google had changed Gemini CLI’s tool-scoping scheme: the relevant field had become `core.tools`, with a dot. In the official repository, however, the configuration still used `core tools`, without the dot. As a result, Gemini CLI did not recognize the setting and did not scope the tools at all. The earlier vulnerability had therefore been fixed in the product’s expected configuration, but not in the repository’s actual configuration. Because the agent retained unrestricted tool access, Lesichkin no longer needed to force a 3,000-character credential through the model’s output. He could instead use the agent to run code directly in the CI runner.
The prompt injection was simple once the missing security boundaries were found
Lesichkin reused the prompt injection from his earlier exploit. He instructed Gemini to act as though it were running a firewall test and to execute a command that sent the credential to his own server. Gemini complied, then reported that it had sent the token and that the sandbox had been breached. Lesichkin characterizes the prompt injection as the easy part; the difficult work was finding the chain of unintended interactions that made the injection consequential. The chain depended on several bridges: the agent had access to untrusted GitHub issue text, the intended tool restrictions were not active, a credential file was present in the CI runner, and the credential had excessive authority in GCP. Lesichkin says that code execution alone would not necessarily have produced a serious impact if the credential were inaccessible or worthless. Conversely, merely reading small portions of a credential would have had limited value. The significant result came from combining unrestricted execution with a Workload Identity Federation credential that allowed access to the GCP project and could be used to impersonate service accounts. He describes these combinations as “weird machines,” where individually familiar components create an unexpected capability when composed together.
Google fixed the chain in three places
Bittner asks how Google ultimately broke the attack chain. Lesichkin identifies three fixes. First, Google added the credential file to the Gemini ignore list so that the Gemini CLI process running in the GitHub Actions runner could no longer read it. Second, Google corrected the tool-configuration field so that the intended restrictions were actually applied. Third, Google fixed the credential’s excessive permissions by reducing the scope of the service account access it provided. The most important identity issue was that the agent held a credential capable of impersonating any service account in the relevant GCP project. Lesichkin notes that the project was not necessarily a highly critical project from Google’s perspective, but the agent was effectively given a human-level identity that could do anything within it. The episode uses that detail to show why an AI agent’s apparent instructions are not enough protection. A system prompt saying “do not do this,” or an allowlist that is misconfigured or incomplete, cannot substitute for enforced operating-system, application, and cloud-identity boundaries.
Lesichkin’s four rules for securing agents
Lesichkin says system prompts and prompt injections should not be treated as security boundaries. Agents are nondeterministic: unlike ordinary programs, whose control flow can generally be modeled for a given input, an agent can produce different behavior from similar inputs. If an agent can ingest untrusted text and has powerful tools, defenders cannot safely assume it will use those tools only as intended. His preferred model is to give the agent the tools it genuinely needs, ensure those tools are themselves secure, and enforce the boundaries outside the model’s reasoning. He summarizes the advice in four rules. An allowlist or blocklist is not a sandbox: forbidding `curl` does not prevent an agent from trying raw sockets or another route to the Internet. Every tool is its own attack surface because application bugs may let an agent or attacker use it for unintended actions. An agent needs an identity, but that identity must have least privilege and only the permissions required for the task. Finally, an agent with no authority cannot cause the same kind of compromise as an agent with unrestricted authority; tool permissions must be modeled and scoped to the specific job. The episode closes by identifying this research as a warning about connecting AI agents to untrusted input and sensitive infrastructure.
Sponsors
- Aspen Cyber Summit · The November 18 Aspen Cyber Summit in Washington, D.C. brings together leaders from government, industry, and civil society to address pressing cybersecurity and technology-policy issues and pursue cross-sector solutions.
- Progressive Commercial · Progressive says it has more than 360 heavy-truck employees helping truckers stay on time and on track. Its advertising also mentions Cargo Plus coverage and invites truckers to quote insurance in as little as eight minutes. Coverage is subject to policy terms, limits, and conditions and was noted as unavailable in California, New York, and Virginia.
- Ivanti · Ivanti promotes “endpoint autonomy” designed not to go rogue because it is grounded in verified data, with the goal of reducing disruption and improving security while organizations scale.
- Travelers Cyber Threat Report · Travelers’ quarterly Cyber Threat Report uses data from leaked sites and Travelers’ claims to examine the ransomware ecosystem and account-takeover trends. It is presented as a practical resource for security and insurance professionals studying emerging cyber risks.
- Anthropic Claude · Anthropic describes Claude as an AI built for businesses that works alongside people, gives ideas room to develop, and helps turn them into shippable results.
- Doppel · Doppel describes itself as an AI-native social-engineering defense platform. It uses AI to combat impersonation and manipulation, dismantle cross-channel attacks, build team resilience, and provide agentic email protection against increasingly sophisticated AI-enabled attacks.
Show notes
Dan Lisichkin, AI Security Researcher from Pillar Security, discussing their work on "A WIF Of Fresh Access, How a GitHub Issue on Gemini-CLI Led to GCP Project Compromise." Researchers at Pillar Security uncovered a vulnerability in Google’s Gemini CLI workflows that could allow an attacker to turn a malicious GitHub issue into remote code execution and gain elevated access to a Google Cloud Platform (GCP) project.
The exploit chain combined a misconfigured tool allowlist that allowed unrestricted command execution with exposed Workload Identity Federation credentials and overly broad service account permissions, potentially enabling attackers to impersonate privileged accounts. Google promptly addressed the issues by tightening tool restrictions, blocking the agent’s access to credential files, and limiting service account impersonation permissions, highlighting the risks of connecting AI agents to untrusted input and sensitive infrastructure.
The research and executive brief can be found here:
A WIF Of Fresh Access: How a GitHub Issue on Gemini-CLI Led to GCP Project Compromise
Learn more about your ad choices. Visit megaphone.fm/adchoices
Follow this show on AudioBrevity and new episodes get summarized for you. Create a free account