Skip to content
SSRF Write-up Advanced

SSRFing the Web with the help of Copilot Studio

A server-side request forgery (SSRF) vulnerability in Microsoft Copilot Studio allowed an attacker to make the service send HTTP requests to internal resources, including the Azure Instance Metadata Service (IMDS) and an internal Cosmos DB instance. By bypassing SSRF protections, the attacker could retrieve managed identity access tokens and Cosmos DB master keys, potentially gaining read/write access to shared infrastructure.

Evan Grant Follow

Published on tenable.com

Subscribe

Evan Grant (@stargravy), on tenable.com

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

Likely the application allowed user-controlled HTTP requests without adequately restricting redirects and header manipulation, enabling bypass of SSRF protections.

Impact

The vulnerability could allow an attacker to access sensitive internal information, including managed identity tokens and Cosmos DB master keys, and potentially gain read/write access to shared infrastructure, though no cross-tenant information was immediately accessible.

What the attacker needed

Access to Copilot Studio; Ability to create a Copilot; Attacker-controlled server for redirect

How it was found

  1. Create a Copilot in Copilot Studio and add an HttpRequestAction to a topic.
  2. Configure the HttpRequestAction to send a request to an attacker-controlled server that responds with a 301 redirect to the target internal address.
  3. Add a Metadata header with value 'true' followed by newlines to push the automatically added X-Forwarded-For header into the request body.
  4. Send the request via the Copilot chat to retrieve instance metadata from the IMDS.
  5. Use the obtained managed identity access token to query Azure Resource Manager for subscriptions and resources.
  6. Use the Cosmos DB master keys and endpoint to make authorized requests to the internal Cosmos DB instance via the Copilot.

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.

This report describes a server-side request forgery (SSRF) bug. In SSRF, an attacker tricks a server into making requests to places it shouldn't, like internal services that are not meant to be exposed. Here, the Copilot Studio feature that lets users make HTTP requests could be abused to reach Microsoft's internal metadata service and a database, potentially exposing sensitive data.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More by Evan Grant

View all

1 more disclosed report, best first.

More from GitHub (Copilot)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.