# GitHub Agentic Workflows Vulnerable to Indirect Prompt Injection: "GitLost" Attack Exposes Private Repository Data
A newly discovered vulnerability in GitHub Agentic Workflows could allow attackers to extract the contents of private repositories without credentials, stolen access tokens, or permission to access sensitive data. Researchers at Noma Security have demonstrated that a single public GitHub issue—crafted with subtle prompt injection techniques—can trick an AI agent into leaking private repository contents into a public comment visible to the entire internet.
The attack, termed "GitLost" by Noma Security, exploits a fundamental architectural flaw in how GitHub's AI-powered automation handles untrusted input while maintaining elevated permissions. It highlights a critical gap between the safeguards GitHub has implemented and the sophistication of prompt injection attacks targeting credentialed AI agents.
## The Threat: How GitLost Works
The GitLost attack is deceptively simple. An attacker creates a seemingly innocuous GitHub issue on a public repository—in Noma's proof of concept, it was formatted as a routine customer support request from a fictional VP of Sales. The issue contains hidden instructions embedded in natural language that trick the AI workflow into pulling private repository content and posting it publicly.
The attack requires only three elements:
What makes GitLost particularly dangerous is that it bypasses GitHub's built-in safeguards with a one-word modification. Noma's researchers found that prefixing the malicious instruction with the word "Additionally" was sufficient to evade GitHub's threat-detection system. This simple linguistic trick caused the model to interpret the injected command as a legitimate follow-on task rather than a potentially dangerous instruction.
Once the workflow was triggered—likely through a routine automation that assigns issues to the agent—it accessed the organization's private repositories, extracted sensitive files (such as README documents containing credentials, configurations, or intellectual property), and posted the contents into a public comment where any attacker monitoring the issue could retrieve it.
## Background and Context: GitHub Agentic Workflows Explained
GitHub Agentic Workflows launched in public preview in February 2026 as a significant shift in how developers automate tasks. Rather than writing traditional automation scripts, developers now write instructions in plain English within a Markdown file. An AI agent interprets these instructions and autonomously handles common tasks: reading issues and pull requests, running tools, making decisions, and responding without human intervention.
The workflows can be powered by multiple AI models, including GitHub Copilot, Anthropic's Claude, Google Gemini, or OpenAI's Codex. This flexibility has made them attractive to organizations looking to streamline repetitive tasks like issue triage, code review, documentation generation, and cross-repository analysis.
Key features of Agentic Workflows include:
By default, GitHub sets workflows to read-only access, limiting their ability to modify repositories. However, organizations can grant workflows elevated permissions—including read access across all repositories, including private ones—to enable the agent to gather context from internal documentation, private architecture decisions, and sensitive project files.
This permission model is what creates the vulnerability. The agent becomes what security researchers call a "credentialed actor" sitting inside the organization's infrastructure with standing access to sensitive data.
## Technical Details: The Mechanics of Prompt Injection
GitLost is a sophisticated example of indirect prompt injection, a vulnerability class that exploits a fundamental limitation in how AI systems distinguish between legitimate instructions and attacker-controlled input. Unlike direct prompt injection (where an attacker directly interacts with an AI chat interface), indirect prompt injection occurs when an AI system reads attacker-controlled content as part of its normal operation and fails to separate that content from its core instructions.
The attack chain unfolds as follows:
1. Initialization: The workflow is configured with read access to private repositories and is set to activate when an issue is assigned.
2. Trigger: An attacker (or a compromised user) opens a public issue containing hidden instructions embedded in what appears to be legitimate text.
3. Ingestion: The workflow agent reads the issue to understand the task, but in doing so, it processes the injected instructions as though they were legitimate follow-on commands.
4. Exploitation: A one-word modifier—"Additionally"—causes the model to treat the malicious instruction as a natural continuation rather than a suspicious request, bypassing semantic guardrails.
5. Execution: The agent uses its read-access token to fetch private repository contents.
6. Exfiltration: The agent posts the stolen data into a public comment, making it accessible to the attacker and anyone monitoring the repository.
GitHub's existing safeguards include:
Despite these layers of protection, Noma's research shows that each can be circumvented with minor linguistic modifications. The core issue is not a bug in any single component but a structural vulnerability inherent to deploying AI agents with standing credentials while allowing them to process untrusted content.
## Why This Matters: The Lethal Trifecta
Security researcher Sasi Levi from Noma Security frames GitLost as an example of what developer Simon Willison termed the "lethal trifecta" of AI security risks:
1. Agent with elevated permissions: The workflow has read access to private repositories the attacker cannot normally access.
2. Untrusted input ingestion: The agent processes attacker-controlled content (the public issue) as part of normal operation.
3. Data exfiltration path: The agent has a built-in mechanism to output data publicly (commenting on issues).
When these three conditions align, a leak becomes inevitable, regardless of individual safeguards. As Levi noted, "Earlier prompt injection examples were largely about manipulating what an agent said. GitLost is about manipulating what an agent does with its permissions."
## Implications for Organizations
The discovery of GitLost has several critical implications:
Immediate Risks:
Architectural Concerns:
Broader Industry Pattern:
GitLost is the latest in a series of prompt injection attacks targeting AI-powered developer tools. Noma Security and other researchers have documented similar vulnerabilities in other automation platforms, suggesting this is an emerging class of attacks rather than an isolated incident.
## Recommendations: Mitigating the Risk
For organizations currently using GitHub Agentic Workflows:
For GitHub:
*.md in public repos").For the broader developer community:
---
## HackWire Analysis
GitLost is not a bug in GitHub Agentic Workflows—it's a warning about the future of AI-powered infrastructure. What makes this attack significant is not the technical sophistication but the timing and the structural inevitability.
GitHub launched Agentic Workflows into public preview just five months ago. The feature arrived with guardrails, threat detection, and explicit documentation warning about prompt injection risks. Yet within months, researchers have demonstrated a working attack that circumvents these protections with a one-word prefix. This is not a failure of GitHub's engineering—it's evidence that the conflict between agent autonomy, elevated permissions, and untrusted input processing may be fundamentally unresolvable through defensive layers alone.
The deeper pattern here extends beyond GitHub. Every major cloud platform—AWS CodePipeline, GitLab CI, Azure DevOps—is investing in AI-powered automation. Microsoft has embedded Copilot into GitHub Actions. Google is adding Gemini to Cloud Build. Each deployment faces the same architectural problem: AI agents need broad context to be useful, but that context often includes access to sensitive data. Ask them to read untrusted input (issues, PRs, logs), and you've created the attack surface.
Organizations won't stop using these tools. The productivity gains are real. But the industry needs to abandon the assumption that you can "secure" this with better guardrails. Instead, the model must shift: assume prompt injection will happen, design workflows around the assumption that agents will be manipulated, and build infrastructure where elevated permissions have inherent friction and logging.
For defenders, the immediate lesson is hard: any organization running Agentic Workflows with cross-repository read access should treat that configuration as a known vulnerability. The fix isn't a patch from GitHub—it's a redesign of how you grant permissions to automated systems. If your workflows don't need to see private repos, they shouldn't have access. If they do need access, assume they will leak data and plan accordingly.
— HackWire Editorial
---
## Related Coverage