Hidden PR Prompts Trick Azure DevOps AI Agents

eSecurity Planet · High sophistication
Last updated July 30, 2026

Researchers showed that hidden instructions in an Azure DevOps pull request description can trick an AI coding assistant into taking unintended actions using the reviewer’s own access. In a proof of concept, the AI agent was manipulated to pull confidential data from another project and post it back into the attacker’s pull request, without stealing credentials.

How the attack worked

Researchers demonstrated a proof of concept in which an attacker with access to a single Azure DevOps project embedded hidden instructions inside an HTML comment within a pull request description. The comment was invisible to human reviewers in the Azure DevOps interface, but it was still returned by the API and passed directly to an AI coding agent when it was asked to review the pull request. Following those hidden instructions, the agent retrieved pipeline and wiki content from a separate project and posted the retrieved information back into the attacker-controlled pull request.

Why it succeeded

The core issue is that the AI agent performs actions using the authenticated reviewer's own permissions. Because the agent operates with legitimate credentials, it can carry out actions across projects that the reviewer is authorized to access, even though the attacker has no direct access to that data. Since every action was performed using the reviewer's legitimate permissions, the activity appeared to be authorized rather than malicious, which makes this kind of manipulation hard to catch through normal access controls.

Microsoft's mitigation approach, described as "spotlighting," was applied inconsistently across tools. Pipeline and wiki tools used the mitigation, but the pull request description tool did not, leaving a gap that allowed the hidden instructions to slip through unfiltered.

What to watch for

  • Pull requests containing content that isn't visible in the UI but is still processed by tooling, such as hidden HTML comments.
  • AI review output that includes unrelated content, like wiki text or pipeline details, that wasn't needed for a code review.
  • An AI agent performing cross-project access or data retrieval during what should be a routine pull request review.

The risk grows when an AI agent has access to sensitive enterprise data, is exposed to attacker-controlled content, and has the ability to send data outward, a combination sometimes called the

Key findings

  • Attackers can hide prompt-injection instructions inside an HTML comment in an Azure DevOps pull request description, invisible to human reviewers but visible to the API and the AI agent.
  • The AI agent performs actions using the authenticated reviewer’s permissions, enabling cross-project data access that the attacker does not have.
  • In a proof of concept, the agent accessed another project’s pipeline and wiki content and posted the retrieved information back into the attacker-controlled pull request.
  • Microsoft’s mitigation (“spotlighting”) was implemented inconsistently: pipeline/wiki tools used it, but the pull request description tool did not.
  • The risk increases when AI agents have (1) access to sensitive enterprise data, (2) exposure to attacker-controlled content, and (3) the ability to send data outward (the article’s “lethal trifecta”).

Who’s being targeted

  • Commonly targeted roles: Software Engineers, DevOps/Platform Engineering, Security Awareness & Training, Application Security, Engineering Leadership.
  • Affected industries: Software development, IT/DevOps teams, Technology organizations using Azure DevOps.
  • Attack channels: website.
  • Impersonated: A normal contributor submitting a seemingly legitimate pull request.

Red flags to watch for

  • Pull request includes content not visible in the UI but processed by tooling (hidden HTML comments).
  • AI review output includes unrelated content (e.g., wiki text, pipeline details) that wasn’t needed for code review.
  • AI agent performs cross-project access or data retrieval during a routine PR review.
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 do attackers hide prompt injection in a pull request?

Attackers embed instructions inside an HTML comment within a pull request description. The comment stays invisible to human reviewers in the Azure DevOps interface but is still returned by the API and passed to the AI agent during code review.

Why could the AI agent access data from another project?

The AI agent operates using the authenticated reviewer's own permissions, so it can perform legitimate-looking actions across any project the reviewer is authorized to access, even though the attacker themselves has no such access.

What is the 'lethal trifecta' mentioned in this attack?

It refers to three conditions that increase risk: an AI agent having access to sensitive enterprise data, exposure to attacker-controlled content, and the ability to send data outward.

What can organizations do to reduce this risk?

Treat DevOps content like pull request descriptions as untrusted, limit AI agent permissions to least privilege, require human approval for sensitive actions, and monitor AI agent activity for unusual cross-project behavior.

Read the video transcript

Your Azure DevOps AI reviewer can be tricked by text you never even see. Researchers showed a pull request where an HTML comment told the Azure DevOps AI agent: fetch another project’s pipeline and wiki, then post it back into this PR using the reviewer’s access. The twist is the AI isn’t stealing passwords; it’s using your legitimate permissions. If you can see a sensitive wiki, the injected prompt can quietly make the AI pull it and paste it into the attacker’s PR. If your AI review suddenly includes unrelated wiki or pipeline details from other projects, stop and report it, assume the agent just followed a hidden prompt.

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