Hidden Prompt Injection in GitHub Issues: 143M Posts Studied
A study of 143M GitHub issues, PRs and comments found 43 hidden prompt injection attacks on AI triage bots. Why permissions, not model choice, decide the damage.
Contents
Summary
GitHub issues and pull requests can carry text that never appears on screen, such as HTML comments, yet reaches an AI agent unchanged. On November 21, 2026, researchers from Radware and the Technion reported that they had examined about 143 million issues, PRs and comments plus 2 million READMEs, and found 2,281 hidden texts aimed at AI, including 43 attacks trying to hijack other people’s agents. The attacks targeted major repositories and their secrets, and the small, fast model that is a common choice for issue triage followed the injected instructions 19% of the time. An agent that reads issues should hold no secrets and no write access. Until that design decision is made, switching to a different model will not close the gap.
Text that humans cannot see but agents read is on the rise
Over the past year, letting AI triage issues or review pull requests from GitHub Actions has spread quickly. An agent reads the raw Markdown of an issue rather than its rendered view, so HTML comments wrapped in <!-- --> and elements hidden with CSS reach the model while staying invisible to people. This study counted how such hidden text is actually used on GitHub at scale, and the researchers describe it as the first measurement of its kind on a code hosting platform.
The dataset combined about 95 million issues and PRs created between June and September 2026, collected through the GitHub API, with comments and reviews from GH Archive, for a total of 142.71 million items, plus the READMEs of the 2 million most-starred repositories. About 3.4% of issues, PRs and comments contained HTML comments, most of them harmless, such as template hints. After removing that noise, running a two-stage LLM classification, checking whether text came from templates and reviewing by hand, the researchers narrowed the set to 2,281 hidden texts aimed at AI, across 435 repositories.
The breakdown shows that most of this hidden text is not an attack.
| Purpose | Count | Share | Examples |
|---|---|---|---|
| Coordinating the project’s own agents | 1,519 | 67% | Assignment, handoff and lock markers |
| Steering AI output | 374 | 16% | Language, tone and format for AI reviews |
| Restricting AI | 345 | 15% | “Do not write in human-facing fields”, “identify yourself” |
| Attacking someone else’s agent | 43 | 2% | Stealing secrets, forging verdicts |
The growth is fast as well. Hidden texts per million new issues and PRs rose from 7.0 in June to 15.4 in September. Agent coordination markers grew fivefold, and the number of projects using them went from 11 to 69. Hidden text is settling in as the “wiring” of projects that have built AI into their development process.
One in 3.3 million, yet a single success can poison a release
So how serious are the 43 attacks? By count, they amount to roughly one in 3.3 million posts. To judge what that low number means, it helps to look at what the attacks tried to do alongside the real incidents of 2026.
Of the 43 attacks, 19 (44%) aimed to steal the agent’s secrets, 16 (37%) tried to make the agent do a different job, and 8 (19%) tried to make it report a false verdict. Nineteen targeted repositories belonging to Microsoft, Google, OpenAI, Anthropic, GitHub and Elastic. One issue in gemini-cli, for example, hid instructions telling the duplicate-detection agent to use a shell, convert the workflow’s GITHUB_TOKEN to base64 and write it to an environment variable, a trick to get around log masking. Nine of the 43 named the target agent’s tools and output fields correctly, which suggests the attackers read the public workflow definitions before writing their payloads. When the researchers checked again on November 10, 34 were still in place.
The cases of 2026 show this is not a thought experiment. In Cline, the AI coding tool, instructions planted in an issue title manipulated a triage workflow running Claude Code and stole the npm publishing token. On February 17, eight days after the vulnerability was disclosed, a malicious cline@2.3.0 was published to npm and stayed available for about eight hours. Anthropic’s own GitHub Action had a flaw as well: it trusted any user whose name ended in [bot] without further checks, so instructions planted in an issue could obtain a writable token and tamper with the Action’s repository (CVE-2025-66032).
What the two cases share is that the scale of the damage was decided by the permissions the agent held, not by how clever the instructions were. A job that only needed to read issues for triage sat in the same place as a key that could publish the package. One success spreads harm to everyone who uses that package or Action. A path from development infrastructure to production keys has the same structure as the one in the article on the 1Password breach via GitHub, except that the entry point has widened from “an employee’s account” to “an issue anyone can write.”
The small model chosen for cost has become the line of defense
Even if permissions decide the damage, an attack fails when the model refuses to follow it. To see how far model capability alone can protect a workflow, the researchers fed the 43 attacks to five models in an environment where the tools were replaced with mocks.
Anthropic’s Haiku, Sonnet and Opus, and OpenAI’s gpt-5.6-terra, never followed an attack. The smallest and fastest model, gpt-5.6-luna, followed 8 of them (19%), going as far as sending environment variables to an outside collection service and running commands an outsider had requested. Seven of those eight targeted agents doing issue triage. The researchers point out that triage, which runs on every new issue, is exactly where small models tend to be chosen for cost and speed.
This is the trap for companies. Model selection is usually driven by accuracy, price per call and latency. But when the model reads text written by outsiders, such as issues, emails or contact forms, that same choice ends up deciding how well the system resists attack. The stronger models’ “defense” had a cost too. Sonnet and Opus returned no answer at all on 16 and 22 of the 43 cases, stopping the attack but also stopping the triage they were supposed to do. In some cases the refusal remained even after the hidden text was removed. If you rely on the model’s judgment for defense, you cannot predict its behavior in advance, including when it halts legitimate work by mistake.
Note that each model answered each case only once in this experiment, and the system prompts were approximations of the real ones. The researchers themselves say the results show the attacks are not merely theoretical, not that they predict real-world success rates.
Stripping all hidden text also cuts your own wiring
Then why not remove all hidden text before it reaches the agent? In the replay experiment, removing HTML comments made the attacks fail on all five models. It looks like a simple, highly effective fix.
As the table above shows, however, 67% of hidden texts are used by projects to coordinate their own agents. Removing all of them also removes legitimate markers for handoffs and locks. Conversely, those markers are ordinary text in a public thread, so anyone who can comment can imitate them. The study found 10 projects that record states such as “approved” or “ready to merge” in hidden text, with 47 such markers. If someone writes a forged marker, a change could be treated as if it had passed review.
The researchers propose separating by author rather than by format. Strip hidden text written by outside contributors, and keep what members and bots wrote. States that carry authority should live in a visible mechanism, such as labels only maintainers can apply, not in hidden comments.
Invisible characters show a gap between demos and reality as well. Embedding instructions with zero-width characters and other invisible Unicode is a popular demonstration, but only 1,777 READMEs (0.09%) contained invisible Unicode, and just 1 of 107 hidden AI-directed texts used it. What attackers actually use is the far more mundane HTML comment. Still, if you want to check text you have for stray invisible characters, the Invisible Character Checker can find and remove them. GitHub has also shown a warning on files containing invisible Unicode since May 2025.
Never let one job read outside text, hold keys and write externally
So neither model capability nor stripping hidden text can carry the defense alone. What remains is to build the setup so that a successful attack causes no damage. In a June blog post on the Claude Code Action case, Microsoft recommends the “Agents Rule of Two”: an AI workflow should never have all three of “processing untrusted outside input,” “access to secrets or sensitive systems” and “the ability to change state or communicate externally” at the same time.
Applied to issue triage, it looks like the diagram below. The top row gives all three to a single job, close to what happened with Cline and the Claude Code Action. The bottom row strips hidden text from outside contributors first, has an agent with no secrets and no shell read the issue, restricts its output to labels of a fixed form, and leaves a separate deterministic step to apply them.
Turned into concrete settings, the checklist is short.
- Do not pass npm, cloud or signing secrets to any workflow an outsider can trigger (anything that runs on issue creation or comments). Make release jobs run only on a maintainer’s action.
- Set
GITHUB_TOKENpermissions explicitly withpermissions; for triage,issues: writealone. Do not pass tokens that can read other repositories either. “GitLost” (Noma Security, July 2026), which made GitHub Agentic Workflows write out the contents of a private repository from a public issue, showed that read access alone is enough for a leak. - Do not give the agent a shell, web fetch or any other tool that can reach the network. Restrict the model’s output to fixed values such as label names, and validate them against an allowlist before applying.
- Never let the model’s verdict alone approve, merge or pass a security check.
On October 28, GitHub also released, in public preview, code scanning that detects paths in each PR where outside content reaches a model with tools, but it requires a GitHub Advanced Security license. Auditing the permissions of your own workflows is something you can start on sooner.
This design has costs. Without a shell, the agent cannot automatically try reproduction steps, and splitting jobs adds maintenance work. Even so, neither is a reason to put your release keys at risk for the sake of triage.
Support email and job applications will face the same three questions
What follows is not confirmed fact but my own projection from the material above.
This problem is not limited to GitHub. Companies have plenty of work where AI reads text written by outsiders: support emails, tickets, job applications, documents from business partners. This study showed, with numbers, that instructions placed in public are actually read, and that some models follow them. As more work is handed to agents, I expect it to become a standard security review item to list, for each task, “does it read outside text,” “which keys does it hold” and “where can it write,” and to stop any setup where all three line up at the design stage.
Models will get more resistant, but attackers will keep reading public workflow definitions and tailoring their payloads, and there will always be places where a small model is used for cost reasons. I think how permissions are divided will remain what finally decides the size of the damage.
My take
What stayed with me from this study was less the scarcity of attacks than the sudden growth of legitimate hidden text. Projects have started writing handoffs between agents in places humans never see. State that carries authority sits where people do not read, and anyone can write to it in the same format. That is a risky design even before attackers show up in numbers.
If your organization uses AI for triage or review, before asking which model you run, list for each job whether outsiders can trigger it, which secrets it can see and where it can write. If even one job has all three, what happened to Cline can happen to you. Relying on a model’s intelligence is fine as a second line of defense, once the permissions are already divided.
References
- Gabi Nakibly, Zvika Babo, “Who Is Prompt-Injecting Coding Agents? An Empirical Study of Hidden AI-Directed Text on GitHub,” arXiv:2611.28763, November 21, 2026
- Digital Today, “GitHub security alert over hidden text visible only to AI”
- Cloud Security Alliance, “AI Agent Prompt Injection: The New CI/CD Supply Chain Threat” (Clinejection, CVE-2025-66032)
- Microsoft Security Blog, “Securing CI/CD in an agentic world: the Claude Code GitHub Action case,” June 5, 2026
- The Hacker News, “Public GitHub issue could trick GitHub’s agentic workflows,” July 7, 2026
- GitHub Changelog, “Code scanning for AI applications in public preview,” October 28, 2026
- GitHub Changelog, “GitHub now provides a warning about hidden Unicode text,” May 1, 2025