Skip to content
AI / LLM Write-up Intermediate

The README that can turn a coding agent against its owner

A coding agent that reads untrusted repository content such as READMEs, issues or pull requests can be tricked by instructions hidden in that text into misusing its tools. Researchers demonstrated that this could expose GitHub tokens and confidential files, and could lead to arbitrary code execution without the user's intended approval.

osintteam.blog

Published on osintteam.blog

The agent reads the README, checks the issue, searches the code, runs a few commands and proposes a patch. That is normal behaviour.

Devansh Patel, on osintteam.blog

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The agent treats untrusted natural-language content from the repository as trusted guidance while having access to tools with real authority, so text can redirect its actions.

What the attacker needed

Agent reads untrusted repository content; agent has tools with real authority; auto-approval may be enabled

The fix

The issues were fixed with the VS Code team, and GitHub's agentic security principles and Agentic Workflows architecture add controls such as visible context, limited network access, keeping secrets away from the agent, human review for irreversible changes and staged write operations.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An AI coding assistant reads text from a project, such as a README or an issue, to understand what to do. If an attacker puts hidden instructions in that text, the assistant may follow them as if they came from its owner. This is called indirect prompt injection: the attacker does not talk to the assistant directly but plants instructions in content the assistant is asked to read.

What is AI / LLM?

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.

Similar reports

View all

Same bug class and techniques, clearest first.

AI and LLM vulnerabilities

The lesson behind this report.

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.