The “SearchLeak” Attack Chain: Analyzing the Critical Data Exfiltration Vulnerability in Microsoft 365 Copilot

Microsoft 365 Copilot, while revolutionizing enterprise productivity, has been revealed to harbor a sophisticated vulnerability known as “SearchLeak.” This critical attack chain allows for one-click data exfiltration by weaponizing a combination of AI-specific logical flaws and traditional web security weaknesses.

First identified by Varonis Threat Labs, the vulnerability (tracked as CVE-2026-42824) serves as a stark reminder that integrating Large Language Models (LLMs) into existing ecosystems can inadvertently expand an organization’s attack surface.

The vulnerability specifically targets the Microsoft 365 Copilot Enterprise Search functionality. By tricking a legitimate user into clicking a single malicious link, an attacker can bypass traditional perimeters to extract highly sensitive information—including Multi-Factor Authentication (MFA) codes, private email threads, meeting transcripts, and confidential files residing in SharePoint and OneDrive.

Technical Breakdown: The Three-Stage Exploit Chain

SearchLeak is not a single bug but a highly orchestrated three-stage exploit that bridges the gap between prompt injection and server-side exploitation.

1. Parameter-to-Prompt (P2P) Injection

The attack begins with a Parameter-to-Prompt (P2P) injection. The Microsoft 365 Copilot Enterprise Search feature utilizes URL query parameters to process natural language search requests. However, researchers discovered that the AI engine does not strictly treat these parameters as passive data. Instead, the engine interprets the parameter content as executable instructions.

Attack visualization diagram
Attack workflow visualization (Source: Varonis)

By crafting a URL with a malicious payload embedded in the search parameter, an attacker can direct Copilot to perform unauthorized searches. Because Copilot operates using the identity and permissions of the authenticated user, even an employee with minimal access can be used as a proxy to scan and retrieve sensitive organizational data that the user is authorized to see, but the attacker is not.

2. HTML Injection via Rendering Race Condition

Once Copilot retrieves the data, the second stage exploits a timing flaw during the response rendering process. To prevent malicious content from executing, Microsoft employs sanitization measures that attempt to wrap AI-generated responses in safe code blocks. However, Copilot uses a streaming output method.

There exists a microscopic window of time—a race condition—between when the browser begins rendering the streamed response and when the final sanitization logic is applied. During this interval, the browser may render injected HTML tags (such as an <img> tag) before they are neutralized. This allows the attacker to embed hidden payloads within the UI that trigger outbound requests immediately upon display.

Auto-execution of injected prompt
Visualizing the auto-execution of the injected prompt (Source: Varonis)

3. Indirect Exfiltration via SSRF and Trusted Domains

The final hurdle for an attacker is the browser’s Content Security Policy (CSP), which typically blocks unauthorized outbound connections. To circumvent this, the exploit leverages a Server-Side Request Forgery (SSRF) vector through a trusted Microsoft domain.

The attackers discovered that the Microsoft CSP permits requests to Bing services, including its image search capabilities. By embedding the stolen data (e.g., a sensitive email snippet) into the URL of a Bing image request, the attacker forces the victim’s browser to send the data to Bing. Bing’s backend then processes the request, effectively acting as a proxy that delivers the exfiltrated information to the attacker-controlled server. This makes the exfiltration appear as legitimate traffic to trusted Microsoft infrastructure.

Real-World Impact and Threat Landscape

In a practical execution, a target might receive a link through a trusted channel like Microsoft Teams or Slack. Upon clicking, the “one-click” nature of the attack ensures that the prompt executes, the data is scraped, and the exfiltration occurs silently in the background. Because the link points to a legitimate Microsoft domain, traditional URL filters and email security gateways are unlikely to flag it.

The implications for enterprise security are profound. Attackers can potentially harvest:

  • MFA/OTP codes found in recent emails.
  • Strategic documentation from SharePoint.
  • Sensitive meeting agendas and private communications.

While Microsoft has since released patches to mitigate this specific chain, SearchLeak underscores a critical evolution in the threat landscape. It highlights how AI-mediated attack paths can bridge traditional vulnerabilities—like SSRF and race conditions—to create entirely new classes of exploitation. As organizations move toward deep AI integration, security teams must look beyond standard phishing defenses and begin modeling threats that account for the unique, autonomous capabilities of LLM-driven agents.

Related Articles

Back to top button