What has gone wrong with real agents, and what would have stopped it

Eight incidents from 2025, each read from the CVE record, the vendor or project advisory, or the researcher's own post. Each entry says what the agent could do, what happened, and which controls on this site would have stopped it or limited it, including where a control would not have been enough.

Updated 29 Nov 2026

The incidents are chosen because each one teaches something the others do not: a zero-click leak through an assistant's own output, a leak through fully trusted tools, an agent that rewrote its own permission settings, a trusted tool configuration swapped after approval, a client compromised by the server it connected to, a developer tool with no authentication, an over-scoped CI token, and malware that borrowed the victim's own AI tools. Where a CVE record and a project advisory give different version ranges, the entry says so.

Each control bullet starts with "Stops." or "Limits.". "Stops" means the chain needed what the control removes. "Limits" means the control narrows the damage or covers only part of the chain. The control names link to the how-to pages, each of which has a test that fails with the control off.

EchoLeak: private data disclosed through Microsoft 365 Copilot (CVE-2025-32711, June 2025)

What the agent could do. Microsoft 365 Copilot reads the signed-in user's emails and files, and answers questions about them in a chat window. The researchers' paper describes the victim as an employee whose Copilot can read the emails and files that the employee can access, and the attacker as someone who can only send content, such as email, into the organization.19

What happened. CVE-2025-32711, published 11 Jun 2025 by Microsoft, is recorded as "Ai command injection in M365 Copilot allows an unauthorized attacker to disclose information over a network."1 The record lists the weakness as CWE-74 (improper neutralization of special elements in output used by a downstream component) and a CVSS 3.1 base severity of 9.3 (Critical), with a vector of network access, low complexity, no privileges and no user interaction.1 Microsoft's Security Update Guide entry rates it Critical, impact Information Disclosure, and states: "This vulnerability has already been fully mitigated by Microsoft. There is no action for users of this service to take."2 The researchers who reported it named it EchoLeak; the CVE record lists their write-up as a reference.1

The chain, as the researchers' paper describes it:19

  1. An attacker sends the employee an email phrased as an ordinary request to a person, which got past Microsoft's prompt-injection classifier (XPIA). It also tells Copilot not to mention the email, so the answer does not point to it.
  2. When the employee later asks Copilot about related work, retrieval pulls the email into the context, and Copilot follows its instructions to put sensitive details from the employee's context into a URL.
  3. Copilot's output filter redacted inline Markdown links such as [text](url). It did not redact the reference-style form ([text][ref] with [ref]: https://... below), so a link carrying the data reached the reply. That still needed a click.
  4. For zero-click, the reply held a reference-style Markdown image. The chat interface fetched it as soon as it rendered the answer. The browser's Content Security Policy blocked images from unlisted domains, so the paper says the attacker pointed the image at a Microsoft Teams URL-preview endpoint on the policy's allowlist, which fetched the attacker's URL (with the data in its path) on the victim's behalf.

Primary sources. The CVE record1, Microsoft's Security Update Guide entry2 and the researchers' paper19.

Controls that fit.

GitHub MCP server: a public issue that pulls private repositories into a public pull request (May 2025)

What the agent could do. A user connects an MCP client to the official GitHub MCP server with a token for their account. The agent can list issues, read private repositories and open pull requests.

What happened. Invariant Labs published a demonstration on 26 May 2025. An attacker files an issue on the user's public repository containing an injection. The user asks their agent something benign such as "have a look at the open issues in the public repository". The agent reads the issue, follows it, pulls private repository data into context, and writes it into a pull request on the public repository, where the attacker can read it.3 The researchers state that the issue "is not a flaw in the GitHub MCP server code itself" but an architectural problem at the agent-system level, and that the MCP tools did not need to be compromised, so it differs from tool poisoning.3 They name it a "toxic agent flow". They note that Claude Desktop confirms tool calls by default and that many users choose "Always Allow".3

Primary source. The researchers' own post.3

Controls that fit.

GitHub Copilot agent mode rewrites its own settings and runs shell commands (CVE-2025-53773, August 2025)

What the agent could do. GitHub Copilot's agent mode, as the researcher demonstrated it in VS Code, could create and edit files in the workspace without asking, and run terminal commands once confirmations were off.

What happened. Johann Rehberger (Embrace The Red) found that the agent could write .vscode/settings.json, and that adding "chat.tools.autoApprove": true put Copilot in a mode that "disables all user confirmations". A prompt injection in a source file, web page, GitHub issue or tool response could therefore make the agent switch off its own approvals and then run a command; the post shows code execution on Windows and macOS, and says it works on Linux.4 He reported it on 29 Jun 2025 and Microsoft fixed it in the August 2025 Patch Tuesday release.4 The CVE record, published 12 Aug 2025, is titled "GitHub Copilot and Visual Studio Remote Code Execution Vulnerability" and describes command injection allowing local code execution.5 The record names the product as Microsoft Visual Studio 2022 version 17.14, with 17.14.0 up to but not including 17.14.12 affected; it does not list VS Code, which is the product the researcher's post demonstrates.45 The post also names other self-modifying paths: .vscode/tasks.json and added MCP servers.4

Primary sources. The researcher's post4 and the CVE record5.

Controls that fit.

Cursor: a new MCP configuration file, and a swapped one (CVE-2025-54135, CVE-2025-54136, CVE-2025-59944, August to October 2025)

What the agent could do. Cursor's agent edits files in the workspace. An MCP configuration entry names a command that Cursor starts as a local server.

What happened. Three records from the project's own advisories and CVE entries:

Primary sources. The advisories on the project's GitHub6820 and the CVE records7918.

Controls that fit.

mcp-remote: a server that attacks the client that connects to it (CVE-2025-6514, July 2025)

What the agent could do. mcp-remote is a local proxy that lets MCP clients such as desktop assistants talk to a remote MCP server.

What happened. JFrog's research team found OS command injection in mcp-remote through crafted input in the authorization_endpoint of the server's response. Connecting to an untrusted server could run commands on the client machine: arbitrary shell commands on Windows, arbitrary executables with limited parameters on macOS and Linux. JFrog's affected range is 0.0.5 to 0.1.15, fixed in 0.1.16, CVSS 9.6.10 Two scenarios: connecting to a hijacked or malicious server, and connecting over plain HTTP where someone on the local network can intercept the traffic.10 The CVE record, published 9 Jul 2025, gives the same description.11

Primary sources. The researchers' post10 and the CVE record11.

Controls that fit.

MCP Inspector: a debugging tool with no authentication between its parts (CVE-2025-49596, June 2025)

What the agent could do. MCP Inspector is the project's developer tool for testing servers. Its proxy starts MCP commands over stdio on behalf of the browser client.

What happened. Versions below 0.14.1 had no authentication between the Inspector client and its proxy, so unauthenticated requests could make the proxy launch commands. The project's advisory credits Rémy Marot of Tenable and says to upgrade to 0.14.1 or later; the CVE record was published 13 Jun 2025.1213

Primary sources. The project's GitHub advisory12 and the CVE record13.

What this teaches. The tools around an agent are part of its attack surface. This one never involved a model.

Controls that fit.

Amazon Q Developer extension: a malicious release through an over-scoped CI token (July 2025)

What the agent could do. The Amazon Q Developer extension adds AI coding assistance to VS Code and is built from an open-source repository.

What happened. AWS's bulletin of 23 Jul 2025 (updated 25 Jul) says the extension's CodeBuild configuration held "an inappropriately scoped GitHub token". With it, a threat actor committed malicious code to the open-source repository, and it was included automatically in a release, version 1.84.0. AWS says the code was distributed but did not execute because of a syntax error, so it made no changes to customer environments. AWS revoked and replaced the credentials, removed the code, withdrew 1.84.0, and released 1.85.0, and gives a SHA-256 for the 1.84.0 package. It advises removing 1.84.0 everywhere, including forks, because the code is still present in existing installs.14 The GitHub advisory GHSA-7g7f-ff96-5gcw repeats the bulletin.15 The CVE-2025-8217 record adds that the injected code was designed to call the Q Developer CLI and runs when the extension launches, and that a syntax error stopped its call to the CLI.21

Primary sources. AWS's security bulletin14, the GitHub advisory15 and the CVE record21.

Controls that fit.

Nx "s1ngularity": a poisoned package that asked the victim's own AI tools to find secrets (August 2025)

What the agent could do. Local AI command-line tools run with the developer's own file access and sign-in. Any code that runs on the machine can try to start them.

What happened. On 26 Aug 2025, malicious versions of nx and several @nx/* packages were published to npm using the project's npm publishing token, which was taken through a GitHub Actions workflow injection: a pull-request-title check ran with a pull_request_target trigger, which gave it elevated permissions, and was used to trigger the publish workflow with a malicious change that sent the token to a webhook.16 The advisory lists the affected versions as nx 20.9.0, 20.10.0, 20.11.0, 20.12.0, 21.5.0, 21.6.0, 21.7.0 and 21.8.0; @nx/devkit, @nx/js, @nx/node and @nx/workspace 20.9.0 and 21.5.0; @nx/eslint 21.5.0; and @nx/key and @nx/enterprise-cloud 3.2.0.16 The Nx advisory says a postinstall script scanned the file system for text files, collected paths and credentials, and posted them as an encoded string to a new public GitHub repository under the victim's own account (named with s1ngularity-repository). It also appended sudo shutdown -h 0 to .zshrc and .bashrc. The advisory's appendix reproduces the script's prompt, which tells a "file-search agent" to list text configuration and environment files and write the paths to /tmp/inventory.txt.16 Nx's post-mortem says the script "attempted to use local AI tools (like Claude and Gemini)" and uploaded results through the GitHub CLI; the packages were live for about four hours; and provenance signing was absent on the malicious packages but "provenance doesn't block unsigned packages from being installed".17 Nx Console versions 18.6.30 to 18.65.1 for VS Code installed the latest nx on launch, so some victims were affected without using Nx; Nx Console 18.66.0 removed that check.16

Primary sources. Nx's GitHub advisory GHSA-cxm3-wv7p-598c16 and Nx's post-mortem17.

What this teaches. The agent here belonged to the victim, and the attacker supplied the instruction. A local agent with file-system and credential reach is a capability that other code on the machine can use.

Controls that fit.

Sources

  1. CVE-2025-32711 record (M365 Copilot Information Disclosure Vulnerability), CVE Program record published 11 Jun 2025 by Microsoft, https://cveawg.mitre.org/api/cve/CVE-2025-32711, read 29 Nov 2026
  2. CVE-2025-32711, M365 Copilot Information Disclosure Vulnerability, Microsoft Security Update Guide (read as data from https://api.msrc.microsoft.com/sug/v2.0/en-US/vulnerability/CVE-2025-32711; the page is https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-32711), Microsoft Security Response Center, read 29 Nov 2026
  3. GitHub MCP Exploited: Accessing private repositories via MCP, Invariant Labs, 26 May 2025, https://invariantlabs.ai/blog/mcp-github-vulnerability, read 29 Nov 2026
  4. GitHub Copilot: Remote Code Execution via Prompt Injection (CVE-2025-53773), Embrace The Red, 12 Aug 2025, https://embracethered.com/blog/posts/2025/github-copilot-remote-code-execution-via-prompt-injection/, read 29 Nov 2026
  5. CVE-2025-53773 record (GitHub Copilot and Visual Studio Remote Code Execution Vulnerability), CVE Program record published 12 Aug 2025 by Microsoft, https://cveawg.mitre.org/api/cve/CVE-2025-53773, read 29 Nov 2026
  6. Arbitrary code execution from Cursor Agent through a prompt injection via MCP Special Files (GHSA-4cxx-hrm3-49rm), cursor/cursor security advisory, 2 Aug 2025, https://github.com/cursor/cursor/security/advisories/GHSA-4cxx-hrm3-49rm, read 29 Nov 2026
  7. CVE-2025-54135 record, CVE Program, https://cveawg.mitre.org/api/cve/CVE-2025-54135, read 29 Nov 2026
  8. Modification of MCP Server Definitions Bypasses Manual Re-approval (GHSA-24mc-g4xr-4395, CVE-2025-54136), cursor/cursor security advisory, 1 Aug 2025, https://github.com/cursor/cursor/security/advisories/GHSA-24mc-g4xr-4395, read 29 Nov 2026
  9. CVE-2025-59944 record (Cursor IDE: Sensitive File Overwrite Bypass is Possible), CVE Program, published 3 Oct 2025, https://cveawg.mitre.org/api/cve/CVE-2025-59944, read 29 Nov 2026
  10. Critical RCE Vulnerability in mcp-remote: CVE-2025-6514 Threatens LLM Clients, JFrog Security Research, 9 Jul 2025, https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability, read 29 Nov 2026
  11. CVE-2025-6514 record, CVE Program, published 9 Jul 2025, https://cveawg.mitre.org/api/cve/CVE-2025-6514, read 29 Nov 2026
  12. Inspector proxy server vulnerabilities (GHSA-7f8r-222p-6f5g), modelcontextprotocol/inspector security advisory, https://github.com/modelcontextprotocol/inspector/security/advisories/GHSA-7f8r-222p-6f5g, read 29 Nov 2026
  13. CVE-2025-49596 record, CVE Program, published 13 Jun 2025, https://cveawg.mitre.org/api/cve/CVE-2025-49596, read 29 Nov 2026
  14. Security Update for Amazon Q Developer Extension for Visual Studio Code (Version #1.84), AWS-2025-015, Amazon Web Services, published 23 Jul 2025, https://aws.amazon.com/security/security-bulletins/AWS-2025-015/, read 29 Nov 2026
  15. GHSA-7g7f-ff96-5gcw, aws/aws-toolkit-vscode security advisory, https://github.com/aws/aws-toolkit-vscode/security/advisories/GHSA-7g7f-ff96-5gcw, read 29 Nov 2026
  16. Malicious versions of Nx and some supporting plugins were published (GHSA-cxm3-wv7p-598c), nrwl/nx security advisory, 27 Aug 2025, https://github.com/nrwl/nx/security/advisories/GHSA-cxm3-wv7p-598c, read 29 Nov 2026
  17. S1ngularity - What Happened, How We Responded, What We Learned, Nx Blog, 5 Sep 2025, https://nx.dev/blog/s1ngularity-postmortem, read 29 Nov 2026
  18. CVE-2025-54136 record, CVE Program, published 1 Aug 2025, https://cveawg.mitre.org/api/cve/CVE-2025-54136, read 29 Nov 2026
  19. EchoLeak: The First Real-World Zero-Click Prompt Injection Exploit in a Production LLM System, arXiv:2509.10540, https://arxiv.org/html/2509.10540, read 29 Nov 2026
  20. Cursor IDE - Sensitive File Overwrite Bypass (GHSA-xcwh-rrwj-gxc7), cursor/cursor security advisory, https://github.com/cursor/cursor/security/advisories/GHSA-xcwh-rrwj-gxc7, read 29 Nov 2026
  21. CVE-2025-8217 record (Amazon Q Developer Visual Studio Code extension), CVE Program, published 30 Jul 2025, https://cveawg.mitre.org/api/cve/CVE-2025-8217, read 29 Nov 2026