Skip to content
CyberSafety.lol

News Β· 26 May 2025

A public comment could trick an AI assistant into leaking private code

ElevatedAI incidentWorldwideReported

Hand-written summaryWorldwide

What happened

Researchers showed that a malicious comment on a public GitHub project could steer a connected AI assistant into copying data from a person's private projects into a public place. They say it is a design problem, not a bug in GitHub's server.

Rated elevated: some people may need to check their accounts or update software. Why: private data could be leaked through an AI assistant; this was a researcher demonstration.

This incident may still be developing. Details can change.

Does this affect me?

Only if you connect an AI assistant to GitHub and it can read both public and private projects.

Who may be affected: People who connect an AI assistant to GitHub with access to both public and private projects.

You may be affected if

  • You use GitHub
  • An AI tool can read your email, files or code, or change things for you

You are probably not affected if

  • You do not use the tool named in the report
  • No AI tool has access to your accounts or data

If you are unsure: Check what your AI tools are allowed to read or change, and remove anything they do not need.

What to do now

  • Check which AI tools are connected to your GitHub account and what they can access.
  • Give each tool access only to the projects it needs.
  • Turn on human approval in your AI tool for anything that writes or publishes.

What to do next (24 to 48 hours)

  • Check its history for actions you did not ask for.
  • Give it only the access it needs, and require approval for risky actions.

How to avoid this in future

  • Limit what AI tools can read or change.
  • Keep keys and passwords out of prompts.
  • Review the permissions you have given AI tools regularly.

What we know, and what we do not

Stated by the source

  • Invariant Labs reported that an attacker could hijack a user's AI agent through a malicious GitHub issue and coerce it into leaking data from private repositories.
  • Invariant said this is not a flaw in the GitHub MCP server code itself but a fundamental architectural issue, and recommended limiting agent access to only the repositories it needs.

Still unclear

  • This was a demonstration by researchers, not a confirmed attack on real users.

Researcher report.

Why it is on the radar

Worth learning from: 49/100

Moderate relevance because it involves AI tools and it matters to small teams and builders.

This is our own score for how useful an item is to everyday people and small teams. It is not an objective measure of how dangerous something is.

Sources

Learn more on CyberSafety.lol

Finished this one?

Add it to What I learned and earn 15 Trust. You can open your list from the badge at the bottom of the page.

This news feed monitors public reporting and official advisories. It does not capture every cyberattack worldwide.

Back to the security news feed