GitLost: Noma Security Discovers Prompt Injection Vulnerability in GitHub’s AI Agentic Workflows Leading to Private Repository Exposure

A critical prompt injection vulnerability, dubbed "GitLost" by its discoverers at Noma Security, has exposed a significant flaw in GitHub’s nascent Agentic Workflows. This exploit successfully tricks the AI agents into leaking sensitive, private repository data by embedding concealed instructions within publicly accessible GitHub issues. The discovery highlights a fundamental challenge in securing AI-driven systems, where traditional security models based on code-level trust boundaries are being re-evaluated.
The vulnerability specifically targets GitHub Agentic Workflows configured to react to issues.assigned events. Once triggered, these workflows are designed to read the title and body of an issue, post a response comment, and critically, operate with read access to both public and private repositories within an organization. The GitLost exploit leverages this broad access by manipulating the AI agent’s understanding of its instructions, leading it to inadvertently disclose confidential information in public comments.
The Anatomy of the GitLost Exploit
Noma Security’s research details how attackers can exploit this weakness with alarming simplicity. The exploit requires no advanced coding skills, no access credentials, and no prior knowledge of the target organization’s internal systems. The sole prerequisite is the ability to open an issue in a public repository belonging to an organization that has implemented GitHub’s Agentic Workflow setup. Once an issue is opened, the attacker merely needs to wait for the AI agent to process it.
The core of the exploit lies in the AI agent’s susceptibility to carefully crafted prompts. While GitHub has implemented guardrails intended to prevent such scenarios, Noma discovered that a seemingly innocuous keyword, "Additionally," was sufficient to trigger unintended model behavior. This specific keyword appears to have caused the AI agent to misinterpret its instructions, leading it to access and subsequently publish content from an otherwise restricted file into a public comment. This incident underscores the delicate balance required in programming AI agents, where the AI’s ability to follow instructions, a desired trait, can also be its Achilles’ heel.
A Paradigm Shift in Security: Agentic AI and Trust Boundaries
The implications of GitLost extend beyond a single vulnerability. It represents a broader class of security threats emerging with the proliferation of agentic AI systems. As noted by Noma Security, traditional security models have largely relied on enforcing trust boundaries through code. In agentic systems, however, trust boundaries are partially dictated by the AI model’s behavior. Models are inherently designed to follow instructions, making them vulnerable to prompt injection attacks.
This phenomenon has drawn parallels to the early days of web application security, where SQL injection attacks exploited the way applications treated user input. Prompt injection attacks on agentic AI are being described as a similar, category-wide vulnerability class, necessitating the development of analogous systematic strategies and defenses.
Timeline of Discovery and Disclosure
While a precise public timeline of the vulnerability’s initial exploitation and discovery by Noma Security is not detailed, the research was published on Noma’s blog, indicating a recent finding. Following the discovery, Noma Security would have likely engaged in responsible disclosure practices, informing GitHub of the vulnerability before publicly detailing their findings. GitHub, in turn, would have initiated an internal investigation and begun developing and deploying patches or mitigations. The public disclosure by Noma aims to raise awareness within the developer community and provide actionable advice for organizations utilizing AI agents.
Technical Details and Mitigation Strategies
The specific configuration of the vulnerable GitHub Agentic Workflow, triggered by issues.assigned events, allowed the AI agent to read issue content and post comments. The key element enabling the leak was the agent’s read access to other repositories, including private ones, within the organization. This cross-repository access, even for read operations, significantly amplifies the potential impact of a prompt injection attack.
Noma researchers have put forth several critical recommendations to mitigate these risks:
- Treat User-Controlled Content with Extreme Caution: User-provided input, whether in issue descriptions, comments, or other forms, should never be treated as trusted instructions for an AI agent. It must be considered potentially malicious or malformed.
- Principle of Least Privilege for Agent Permissions: Agent permissions should be strictly limited to only what is absolutely necessary for their intended function. Agents with broad cross-repository access are particularly attractive targets for attackers.
- Limit Public Disclosures by Agents: Organizations should impose strict controls on what agents are allowed to publicly share, especially when responding to issue content.
- Input Sanitization and Isolation: User input must be properly sanitized or isolated from the AI agent’s instruction context before being fed to the model. This separation is crucial to prevent user data from being interpreted as executable commands or instructions.
Industry Reactions and Expert Analysis
The implications of GitLost have resonated across the tech industry, prompting discussions on the evolving landscape of software security.
Vijendra Malhotra, a Fractional CTO, commented on LinkedIn, emphasizing the shift in the definition of security boundaries: "The private repo was never a security boundary. It was an organisational one, and it held only as long as every reader of your code was a human you employed. Agents break that assumption. […] If an agent has access to your private repos, treat everything in them as one well-crafted issue away from public." This sentiment highlights the fundamental challenge of extending organizational trust models into the realm of AI agents.
On Reddit, user Significant_Sea_4230 pointed out a related concern: "The dangerous part is not that the agent is ‘smart’. It is that it may be connected to too much context, too many repos, or overly broad tokens." This observation underscores that the vulnerability is not solely about the AI’s intelligence but its extensive access and permissions, which can amplify the impact of a successful prompt injection.
Another Reddit user, cH3332xr, found the bypass mechanism particularly insightful: "The ‘Additionally’ bypass is the most interesting detail here – the payload itself didn’t change, just the framing token that reclassified it from ‘new instruction’ to ‘continuation of current task’ in the guardrail’s eyes. That’s a decision-boundary problem, not a content problem." This perspective suggests that the issue lies in how the AI agent’s security guardrails interpret the structure and framing of instructions, rather than solely the content of the malicious input.
Further analysis from the Hacker News community, via user mcv, drew a direct parallel to SQL injection: "SQL injection was caused by treating user input as part of the instruction instead of as the pure data that it was intended as. Separating those two fixed it. Prompt injection is unavoidable because the user input is intended as instruction." This highlights a core distinction: while SQL injection was resolved by separating data from instructions, prompt injection inherently involves user input that is intended as an instruction, making the problem more complex to solve.
Broader Impact and Future Implications
The GitLost vulnerability serves as a stark reminder of the nascent stage of AI security. As organizations increasingly integrate AI agents into their workflows, the potential for novel attack vectors grows. The exploit demonstrates that even with implemented guardrails, the sophisticated nature of AI models and their instruction-following capabilities can be exploited in unexpected ways.
This discovery is likely to accelerate research and development in AI security, focusing on:
- Robust Prompt Engineering and Validation: Developing techniques to more effectively validate and sanitize prompts to prevent malicious instruction injection.
- Improved AI Model Guardrails: Enhancing the ability of AI models to distinguish between legitimate instructions and malicious ones, even when subtly disguised.
- Contextual Awareness and Sandboxing: Implementing stronger sandboxing mechanisms for AI agents, limiting their access to sensitive data and preventing them from performing unauthorized actions.
- Zero Trust Architectures for AI: Applying zero-trust principles to AI agent interactions, ensuring that every interaction is verified and authenticated, regardless of its origin.
GitHub’s Agentic Workflows represent a powerful new paradigm for automation, promising increased efficiency and innovation. However, as demonstrated by GitLost, the integration of AI into critical development processes necessitates a proactive and evolving approach to security. The lessons learned from this exploit will be crucial in building a more secure future for AI-powered software development.
For a comprehensive understanding of the technical details and a proof-of-concept demonstration, readers are encouraged to consult the full report published by Noma Security.







