Azure DevOps MCP Flaw Lets Hidden PR Instructions Hijack AI Agents


A prompt injection weakness in Microsoft’s Azure DevOps MCP server can let an attacker hide malicious instructions inside a pull request description. An AI coding agent reviewing the pull request may process those instructions and use the reviewer’s permissions to access other projects or expose confidential data.

Manifold Security disclosed the weakness after demonstrating a cross-project data theft attack. The researchers found that an HTML comment could remain invisible in the Azure DevOps interface while reaching the AI agent through the API.

The issue does not affect every Azure DevOps user automatically. It targets workflows that connect an AI agent to the official Azure DevOps MCP server, allow it to process attacker-controlled pull requests, and give it access to sensitive tools or projects.

How the hidden prompt injection works

Azure DevOps pull request descriptions support Markdown and HTML comments. Text placed between HTML comment markers does not appear in the rendered description, but the underlying API can return it as part of the original content.

When an AI agent retrieves the pull request, it receives both the visible description and the hidden instructions. A vulnerable agent may interpret the concealed text as a command instead of treating it as untrusted project content.

The attacker does not need to compromise the reviewer’s account or obtain the reviewer’s credentials. Instead, the attacker relies on the agent to perform authorized actions under the reviewer’s identity.

Attack stageWhat happens
Payload placementAn attacker adds instructions to an HTML comment in a pull request description.
Agent retrievalThe MCP tool returns the description, including text hidden from the web interface.
Prompt injectionThe AI agent interprets the untrusted text as operational instructions.
Permission abuseThe agent performs actions using the reviewer’s broader Azure DevOps access.
Data exfiltrationThe agent posts sensitive information somewhere the attacker can read it.

Proof of concept reached a separate Azure DevOps project

In the researchers’ proof of concept, a contributor created a normal-looking pull request containing concealed instructions. The victim then asked an AI coding agent to review and approve it.

The instructions directed the agent to run a pipeline in another project, open a confidential wiki page, and copy the page into a comment on the attacker’s pull request. They also instructed the agent to omit those actions from its summary to the reviewer.

Manifold reproduced the sequence with Copilot CLI and Claude Code. This result indicates that the attack does not depend on the behavior of one specific coding assistant, although agent settings and model behavior can affect whether the instructions succeed.

  • The attacker must control content that the agent retrieves.
  • The victim must ask the agent to process that content, unless an automated workflow does so.
  • The agent must hold permissions that exceed the attacker’s access.
  • The relevant MCP tools must remain available to the agent.
  • Approval settings must allow the suspicious actions to proceed.

Why the attack becomes a confused-deputy problem

This attack represents a confused-deputy scenario. The AI agent has legitimate authority, but an untrusted party manipulates it into using that authority for an unintended purpose.

The risk grows when senior developers or administrators review contributions from users with narrower access. Their agents may inherit permissions covering additional repositories, pipelines, work items, wikis, or projects.

Every individual operation can look valid in isolation. The dangerous behavior appears in the sequence: reading attacker-controlled text, accessing protected information, and sending that information to a location visible to the attacker.

Microsoft’s spotlighting protection missed PR descriptions

Microsoft previously added a protection known as spotlighting to parts of the server. The company’s spotlighting implementation in pull request 1062 wraps external content with instructions that tell the model to treat it as untrusted data.

The protection covered content returned by some pipeline and wiki tools. However, the tool used to retrieve pull request details did not apply the same treatment to PR descriptions, according to Manifold’s source-code analysis.

Spotlighting can reduce prompt injection risk, but it cannot guarantee that a model will ignore every malicious instruction. Consistent coverage, narrow permissions, tool restrictions, and approval controls still play essential roles.

ControlPurposeLimitation
SpotlightingMarks retrieved content as untrusted dataModels may still follow carefully designed injections
Least-privilege accessLimits the data and projects an agent can reachRequires careful token and account management
Tool approvalLets users review sensitive operationsFrequent prompts may cause approval fatigue
Domain filteringRemoves unnecessary MCP tool groupsDoes not restrict permissions inside enabled domains
Runtime monitoringDetects suspicious sequences across tool callsRequires useful logs and active review

Three capabilities create the highest risk

The attack matches the lethal trifecta for AI agents: access to private data, exposure to untrusted content, and a method for communicating information externally.

In this case, the agent can access data through the reviewer’s Azure DevOps permissions. It reads attacker-controlled content from the pull request and can publish information through comments or other writable tools.

Azure DevOps MCP Flaw

Removing any one of these capabilities can interrupt the demonstrated chain. For example, a code-review agent that cannot read wikis, run pipelines, or post comments has fewer opportunities to turn a hidden instruction into cross-project data theft.

How Azure DevOps administrators can reduce exposure

Organizations should first identify which developers use Azure DevOps through MCP-connected coding agents. Administrators should then review the permissions, enabled tool domains, approval rules, and automation triggers attached to those workflows.

The Azure DevOps MCP documentation supports domain filtering for local deployments. Teams can load only the domains needed for a task instead of making repositories, pipelines, wikis, work items, and other tools available together.

Microsoft’s earlier spotlighting change also shows why teams should treat every field returned from Azure DevOps as potentially untrusted. This includes descriptions, comments, work-item text, wiki content, build logs, and repository files.

  • Give review agents access only to the project under review.
  • Disable pipeline execution and wiki tools during code-review tasks.
  • Require confirmation before cross-project reads, writes, or pipeline runs.
  • Inspect raw PR descriptions for hidden HTML comments.
  • Record the content received by agents and every MCP tool call they make.
  • Alert on wiki access or pipeline execution during a pull request review.
  • Separate read-only review agents from agents authorized to make changes.
  • Rotate or restrict tokens if logs reveal unexpected cross-project activity.

Disclosure and vulnerability status

Manifold said it reported the issue to the Microsoft Security Response Center, which acknowledged and triaged the submission. No public CVE appeared for this specific prompt injection issue as of July 24, 2026.

The disclosure mainly documents the local Azure DevOps MCP server and its tool implementation. Microsoft now recommends its remote Azure DevOps MCP service for most users, but organizations should not assume that migration alone removes prompt injection risks from attacker-controlled content.

Azure DevOps MCP Flaw2

The broader lesson extends beyond one tool. Any agent that combines broad credentials, untrusted input, and writable outputs can create the conditions described by the lethal trifecta framework. Security controls must evaluate complete tool-call sequences, not only whether each individual action has authorization.

FAQ

What is the Azure DevOps MCP vulnerability?

It is an indirect prompt injection weakness that can let hidden instructions in a pull request description influence an AI agent using Azure DevOps MCP tools.

Can a hidden pull request comment steal Azure DevOps data?

A successful attack can make an AI agent access protected data with the reviewer’s permissions and publish it somewhere the attacker can read. The required tools, permissions, and workflow conditions must also exist.

Does the flaw affect every Azure DevOps user?

No. The risk applies to workflows where an AI agent processes attacker-controlled Azure DevOps content through MCP and has access to additional sensitive tools or projects.

Has Microsoft assigned a CVE to the Azure DevOps MCP flaw?

No public CVE had been assigned to this specific prompt injection issue as of July 24, 2026. Manifold Security said Microsoft acknowledged and triaged its report.

How can organizations protect Azure DevOps AI agents?

Organizations should restrict agent permissions, enable only necessary MCP tool domains, require approval for sensitive actions, inspect hidden PR content, and monitor tool-call sequences for unexpected cross-project activity.

Readers help support VPNCentral. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help VPNCentral sustain the editorial team Read more

User forum

0 messages