Planted Text Tricks AI Agents Into Bad Clicks

The Hacker News · High sophistication
Last updated July 30, 2026

Researchers demonstrated a new “agent data injection” technique where attackers plant content (like a review or GitHub comment) that an AI agent mistakenly treats as trusted system data. In tests, this caused web-browsing agents to click the wrong buttons (e.g., “Buy Now”) and coding agents to run attacker-supplied commands after the user approves what looks like a normal step.

How the attack worked

Researchers demonstrated a technique called agent data injection (ADI), where attacker-controlled content is disguised as trusted data an AI agent relies on, such as a sender name, a button ID, or a record of a tool that already ran. Rather than injecting obvious instructions, the attack corrupts small facts the agent quietly trusts.

Three proof-of-concept scenarios illustrate the range of impact:

  • A planted product review reuses the ID of a real button, causing a web-browsing agent to click "Buy Now" instead of "Read More," placing an unintended order.
  • A forged GitHub comment author line makes it look like a project maintainer posted a fix, leading a coding assistant to run an attacker-supplied command when the developer approves what looks like a routine step.
  • A malicious pull request fakes the record of a check that was never actually run, so the agent sees a clean-looking result and recommends merging code it never verified.

Why it succeeded

The attacks worked because approval prompts often failed to clearly explain what the agent was about to do. In the web agent case, the click prompt only said the agent wanted to click an element, not which one or why. This left users with little way to tell a real approval from a manufactured one.

The agent's own reasoning made things worse rather than better. In the coding assistant case, the agent showed its reasoning, but that reasoning was built on fake facts, so it read like a sensible account of a normal step. The underlying task the user requested never changed; only the facts feeding into it were corrupted.

What to watch for

  • Approval prompts that describe an action vaguely ("click an element") rather than naming the specific target and reason.
  • Identity claims embedded in content, such as an "author line" or "sender name," that have not been independently verified against the underlying system.
  • Agent-reported "passed" checks or completed steps with no corresponding verifiable logs or artifacts.
  • Agent actions that don't match the original user intent, such as a purchase happening during a request to summarize reviews.

How to build resistance

Treat AI-agent approvals with the same scrutiny as financial approvals: verify the exact action before approving, rather than relying on the agent's own summary. Don't trust identity cues embedded in content; confirm the source independently in the underlying system, such as a GitHub account or CI logs. Since agents routinely process content that strangers can edit, including reviews, issues, and PR comments, limit what agents can do automatically in those contexts, and plan for AI-specific manipulation methods that target trusted data fields rather than obvious instruction text.

Key findings

  • The paper describes “agent data injection (ADI),” where attacker-controlled input is made to look like trusted data fields (e.g., sender name, button ID, tool output history).
  • Researchers demonstrated working proof-of-concept attacks against real tools including Claude in Chrome, Google’s Antigravity, Nanobrowser, Claude Code, OpenAI Codex, and Google Gemini CLI.
  • Examples included misclicking a web page button (“Read More” intended, “Buy Now” clicked), impersonating a GitHub maintainer via forged author metadata, and faking a security check record so a malicious PR looks safe.
  • User approval prompts often failed because they didn’t clearly explain what the agent was about to do (which element/why), and the agent’s reasoning could look normal while being based on attacker-planted “facts.”
  • The article states these are proof-of-concept attacks and notes there is “no public report of ADI being used in the wild.”

Who’s being targeted

  • Commonly targeted roles: Developers, DevOps / Platform engineering, Engineering leadership, Security awareness program participants using AI agents, Procurement / Finance approvers for purchases, Code reviewers / maintainers.
  • Affected industries: Software development, Open source software, E-commerce / online retail (agent-assisted purchasing), IT / AI tooling vendors.
  • Attack channels: website, github.
  • Impersonated: Product reviewer / product page content, Project maintainer (forged GitHub comment author line), CI/check tooling results (forged tool history).

Red flags to watch for

  • Approval prompt doesn’t clearly identify the exact button/action (e.g., says it will click “an element” but not which one).
  • Agent action doesn’t match the user’s intent (summarize reviews vs. purchase).
  • Untrusted page text (reviews) influencing “which button” the agent selects.
  • Fix instructions come from an unverified comment even though it appears to be from a maintainer.
  • Command execution is requested based on discussion-thread text rather than a vetted script/change.
  • Agent’s explanation sounds reasonable but is based on “forged” metadata about who said what.
  • “Passed” checks appear in agent history without corresponding CI logs or verifiable run artifacts.
  • Agent recommends merge based on results it didn’t actually run.
  • Mismatch between what the repository’s CI system shows and what the agent reports.
Try Mirage

Mirage safely runs attacks like this one against your own team, so you find out what happens before a real adversary does.

Get a demo

Frequently asked questions

What is agent data injection (ADI)?

ADI is a technique where attacker-controlled input is disguised as trusted data fields, such as a sender name, button ID, or tool output history, causing an AI agent to act on false information.

Which AI tools were affected in the research?

Proof-of-concept attacks were demonstrated against Claude in Chrome, Google's Antigravity, Nanobrowser, Claude Code, OpenAI Codex, and Google Gemini CLI.

Has ADI been seen in real attacks?

No. The research describes proof-of-concept attacks, and the article notes there is no public report of ADI being used in the wild.

Why do approval prompts fail to stop this attack?

Approval prompts often only say the agent wants to click an element or run a step without clearly identifying which element or why, so users approve actions they don't fully understand.

Read the video transcript

Ask an AI agent to summarize product reviews, and one planted review can make it click Buy Now instead. Researchers call this agent data injection. On tools like Claude in Chrome and Google's Antigravity, a planted review reuses a real button ID, so the agent means to click Read More and hits Buy Now, placing an order you never made. Same trick on GitHub: a forged author line makes a comment look like it's from a maintainer. Tell a coding assistant to apply the maintainer's fix, and it will run the attacker's command while its explanation sounds like a normal, safe step. Treat AI-agent approvals like money moves: before you click Approve, read the prompt and verify the exact thing it will click or run, not just the agent’s summary of what it’s doing.

Similar attacks

Prompt-Injection PR Trick Leaks Repo Secrets

Prompt-Injection PR Trick Leaks Repo Secrets

A researcher showed that AI coding agents used in GitHub workflows can be tricked by a malicious pull request description into running “safe-looking” commands…

July 29, 2026