Hidden PR Text Can Hijack Azure DevOps AI Reviews

The Hacker News · Medium sophistication
Last updated July 31, 2026

Researchers showed that an attacker can hide instructions inside an Azure DevOps pull request description so an AI coding agent follows the attacker’s directions instead of the reviewer’s. Because the agent acts with the reviewer’s permissions, it can access other projects and leak sensitive content (like confidential wiki pages) back into the pull request where the attacker can read it.

How the attack worked

Researchers demonstrated that Azure DevOps pull request descriptions accept Markdown, which allows HTML comments. In the web UI, an HTML comment renders as nothing, so a reviewer scanning a PR sees a normal description. But the Azure DevOps MCP server tool path for pull requests returns the full PR description text, including the hidden comment, to any AI agent that reads it. When a reviewer asks their agent to review the PR, the hidden instructions can rewrite the agent's goal without the reviewer ever noticing.

In the proof of concept, the agent's tool trace showed a chain of actions well beyond reviewing code: it triggered a pipeline in a different project, read a confidential wiki page the attacker could not open directly, and posted that page's contents back as a comment on the PR, where the attacker could read it.

Why it succeeded

The core issue is that the AI agent acts with the reviewer's own permissions. Since the agent is carrying the reviewer's credentials, it can reach projects and data the attacker has no rights to access on their own. The gap between what a human sees in the interface and what the model actually receives as input is the delivery mechanism for this attack. The risk grows when agents are configured to run tools automatically without per-tool confirmation, and when review workflows are triggered automatically rather than manually.

What to watch for

  • Pull request descriptions containing HTML comments that are invisible in the rendered UI
  • AI agent tool traces showing unusual cross-project actions during what should be a simple code review, such as pipeline runs or wiki reads
  • PR comments posted by an agent that contain internal or confidential information unrelated to the actual code change
  • Agents configured to auto-approve tool actions with no per-tool confirmation prompts

How to build resistance

Organizations using AI coding agents connected to internal tools like Azure DevOps should treat pull request text as untrusted input, since hidden content can exist even when the interface looks clean. Practical steps include requiring explicit human approval before an agent runs sensitive actions such as triggering pipelines or accessing wikis, giving agents least-privilege tokens scoped only to the project under review rather than broad cross-project access, and regularly auditing agent tool traces for cross-project pipeline runs, wiki reads, or comments posted during reviews. These measures reduce the chance that a hidden instruction in a PR can turn a routine review into a path for data exfiltration.

Key findings

  • Attackers can insert invisible HTML comments in Azure DevOps PR descriptions that humans won’t see, but AI agents will read via the API.
  • The Azure DevOps MCP server tool path for pull requests returns PR descriptions without the “spotlighting” guardrail, enabling indirect prompt injection.
  • When a reviewer asks their AI agent to review the PR, hidden text can redirect the agent to take actions beyond the PR (e.g., trigger pipelines, read wikis) using the reviewer’s permissions.
  • In the proof of concept, the agent read a confidential wiki page from another project and posted it back as a PR comment for the attacker to view.
  • The risk is higher when agents are configured to run tools without per-tool confirmation and when review workflows become automated (trigger-based).

Who’s being targeted

  • Commonly targeted roles: Software Engineers, Code Reviewers, DevOps / Platform Engineering, Engineering Leadership, Security Awareness (developer-focused).
  • Affected industries: Software development teams using Azure DevOps, IT / DevOps organizations, Any organization using AI coding agents connected to internal tools.
  • Attack channels: website.
  • Impersonated: A legitimate project contributor / developer.

Red flags to watch for

  • Pull request description may contain hidden HTML comments not visible in the UI
  • AI agent tool trace shows unusual cross-project actions during a simple code review (pipeline runs, wiki reads)
  • Agent posts PR comments containing internal/confidential information that wasn’t part of the code change
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

How can hidden text in a pull request affect an AI code reviewer?

An attacker can insert an HTML comment into a PR description that renders as nothing in the web UI but is still returned to the AI agent through the API, letting the hidden text redirect the agent's actions during review.

What kind of damage can this prompt injection cause?

In a proof of concept, the agent used the reviewer's own permissions to trigger a pipeline in another project, read a confidential wiki page, and post that page's contents back into the PR comment thread where the attacker could see it.

Why does this attack work even though the reviewer never sees the hidden instructions?

The AI agent reads the full PR description text via the API while the human reviewer only sees the rendered version in the UI, so the gap between what a human sees and what the model receives becomes the delivery mechanism.

How can teams reduce this risk?

Require explicit approval for sensitive agent actions like pipeline runs or wiki access, scope agent tokens to least privilege for the project under review, and audit tool traces for unexpected cross-project activity.

Read the video transcript

In Azure DevOps, your AI code reviewer can be hijacked by text you can’t even see. An attacker adds an invisible HTML comment to a pull request description. The Azure DevOps MCP tool sends that hidden text to the AI, so when you click “AI review,” it quietly rewrites the agent’s goal. Now your agent, using your permissions, starts running pipelines in another project, reading a confidential wiki page it shouldn’t, and posting that secret text back as a PR comment for the attacker to read. If you use AI reviewers, make one change: require explicit approval before the agent can run powerful tools like pipelines, read wikis, or post comments during a PR review.

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