Skip to main content

GitLost: When the Agent's Token Scope Decides What a Public Issue Can Steal

· 11 min read
Ankush K
Co-founder and CTO, Dwaar
GitLost: When the Agent's Token Scope Decides What a Public Issue Can Steal

If your agent reads public issues, anyone who can open an issue gets to write part of its prompt. GitLost, published by researchers on 2026-07-06, shows what that costs when the same agent holds a token that can read your private repositories: a stranger files an issue, and a private README lands in a public comment. Upgrading gh-aw helps, since GitHub's project shipped a mitigation on July 8, but the token scope you granted is still yours to fix.

ItemDetail
IdentifierGitLost, the researchers' name. No CVE in the coverage so far
AffectedGitHub Agentic Workflows (public preview) where a workflow reads attacker-reachable content, holds read access across the organization's repositories and can post publicly. No advisory states an affected version range. gh-aw v0.82.4 is the first release carrying the mitigation
Fixed inNo advisory or CVE names a fixed version. GitHub's gh-aw project merged a mitigation on 2026-07-08: sink-visibility in the MCP gateway, shipped in gh-aw v0.82.4. v0.82.6 was the latest release that day. GitHub flags all of these as pre-releases; the latest stable release was v0.81.6, from June 27. I know of no independent test of the mitigation
SeverityNo CVSS score published. "Critical" is the researchers' own label, repeated by the coverage
Exploited as of 2026-07-08No in-the-wild exploitation reported. Proof of concept only
DisclosedPublic on 2026-07-06. The researchers say they told GitHub first; no dates are public

A note on sourcing: I link press coverage of the researchers' write-up rather than the write-up itself, and GitHub's own repositories for the mitigation. Where outlets differ, I say so.

The chain​

Agentic Workflows are written in Markdown and compile to GitHub Actions. GitHub built in real defenses: read-only permissions by default, pre-approved safe outputs for writes and sandboxed execution, and a threat detection job. Its prompt-based guardrails rejected earlier attempts, according to the researchers.

The proof of concept worked like this:

  1. The workflow ran on issues.assigned, read the issue title and body, could post a comment, and had read access to public and private repositories in the organization.
  2. The attacker opened an issue in a public repository. No credentials, access or coding skills were needed. The issue posed as a routine request from a VP of Sales and asked for README files from named repositories.
  3. A routine automation assigned the issue, which started the workflow.
  4. The agent treated the issue text as instructions. It cannot reliably separate its owner's instructions from content it reads.
  5. It used its cross-repo access to pull READMEs from a private and a public repository.
  6. It posted them as a public comment. That comment is the exfiltration channel.

CSO Online notes that no stolen credentials, malware or software vulnerabilities were involved. An independent researcher quoted there makes the sharper point: the agent has no concept of a repository being private, only of it being accessible.

This is not every Agentic Workflows user. The dangerous scope is a grant the organization makes for cross-repo context. The Hacker News says it was a personal access token; the other coverage says only read access. The exact token scopes in the proof of concept are not public. The researchers published their workflow reproductions; the compiled workflow in their published proof-of-concept repository (linked from The Register's article) was generated by gh-aw v0.60.0 and names Claude Code as its engine. That tells you what they tested, not which versions are affected.

One word past the filter​

The headline detail is that prefixing the injected instruction with "Additionally" got it through. The Hacker News says the threat-detection step scanning proposed output let it pass, SiliconANGLE says the model reframed its output instead of refusing, and CSO speaks of prompt-based guardrails.

Do not fixate on the word. My position: a filter that uses a model to judge attacker-influenced text shares the weakness of the agent it checks. Block this word and you have blocked this word. Treat threat detection as a backstop, not a security boundary.

The researchers say they disclosed to GitHub and published with its knowledge. The Register reported on 2026-07-07 that GitHub had not responded and had shipped no fix or documentation, and CSO reported on 2026-07-08 that GitHub did not immediately respond. The researchers call the problem structural: agents holding standing credentials while reading attacker-reachable text. I agree.

GitHub's gh-aw maintainers moved anyway, with no advisory. On July 8 they merged sink-visibility into the MCP gateway, naming GitLost in the pull request. When the sink is marked public, the guard blocks writes from any agent that has picked up a secrecy tag by reading private data. gh-aw v0.82.4 made the compiler emit the setting and moved to gateway v0.4.0, v0.82.5 moved the visibility lookup to runtime, and v0.82.6 made a failed lookup default to "public".

A second defense forces repos="public" when the workflow runs in a public repository, so the agent never reads private data. It landed in gateway v0.4.1 later that day, but gh-aw v0.82.6 still defaults to v0.4.0. The maintainers' spec issue says either defense alone would prevent the attack. That is their claim, and I know of no independent test of it. My position: upgrade, but a patch to the gateway does not remove the over-broad token, so narrow it anyway.

Scope decides the blast radius​

The Hacker News applies the "lethal trifecta" here: private data, untrusted input and an outbound channel. You need to break one leg, so look at what each costs.

Untrusted input is the job of a triage bot. Removing it removes the bot. The outbound channel is worth restricting, but a triage bot that cannot comment is also a weaker bot. Token scope costs you the least, and the researchers' lead told The Hacker News it is what matters most.

Run the same attack against a token scoped to the one public repository being triaged. Same issue, same word, same model. The agent can still be fooled, but it can only paste what is already public. A better model would not change my advice: I do not expect any model to reliably resist instructions in text it was asked to read.

I have argued that your CI pipeline is production. GitLost adds a production credential with a prompt attached. With no CVE or advisory to match on, I would not expect a dependency or image scan to surface it.

What to check today​

Start with the version, then the token. No source gives a GitLost-specific command, so I am not printing one.

  1. Move to gh-aw v0.82.6 or later, the latest release on July 8, and weigh its pre-release flag against your own policy. Since the compiler emits the setting, I would recompile each workflow and confirm its lock file carries sink-visibility: in v0.82.6 the compiler leaves it out when a GitHub App is configured without an explicit guard policy. The July 8 spec also defines an opt-out, private-to-public-flows: allow, that switches these defenses off. The v0.82.6 workflow schema does not list it yet, so keep it off any workflow reading public input once it does.
  2. List your agentic workflows and flag any that read content outsiders can write, such as issues in public repositories.
  3. Read the token each one holds. If it can read beyond its own repository, scope it to the single repository the workflow triages. Where cross-repo context is truly needed, use an explicit repository allowlist, and I would keep that job apart from the one reading public input.
  4. Restrict the way out. Limit outputs to declared safe outputs, gate public posts behind human review and restrict which authors' content the agent acts on.
  5. Isolate the input. Treat user-controlled content as untrusted and sanitize or isolate it before it reaches the model. Keep an emergency kill switch for the agent.
  6. Look back. Search for public comments from the workflow's bot identity containing private repository content, and for issues from users with no association to your organization that mimic staff and ask for files from other repositories. My own inference, not from a source: review Actions run logs for issue-triggered workflows reading repositories other than their own.

Do this by hand today: take your most exposed agentic workflow, read its token's repository list, and ask what a stranger's issue could make it paste into a comment. If the answer includes a private repository, narrow the token before you close the tab.

References​