clawdcursor: when copying a PDF runs a command
The tool
clawdcursor is an open-source MCP server. Once connected to Claude Desktop, Cursor or another assistant, it hands over the mouse, keyboard and screen: the agent can open a window, read what is shown, click and type.
It is not naive. It has a safety layer that asks the user before actions it considers risky, such as opening a file or writing to the clipboard. Typing text is not on that list, which makes sense: it is the most ordinary action there is.
The demo
The task is deliberately boring. A supplier sent a PDF with a list of points to confirm; the agent has to open it and copy the list into Notepad.
The agent reads the PDF and calls the typing tool with the text. Instead of showing up in Notepad, part of the text runs as a command. Here it opens Calculator, which is harmless but visible. An attacker could have run something else, with the user's rights, and no confirmation prompt would have appeared.
What happens, with an analogy
Picture a clerk who takes dictation and writes it onto an order form. The rule is simple: anything inside quotation marks is text to copy as is, and anything outside them is an instruction the clerk carries out. To avoid accidents, when the dictated sentence itself contains a quotation mark, it is doubled, meaning "this mark is part of the text".
The catch is that the clerk recognises several kinds of quotation marks, while the person preparing the dictation only doubles one kind. If the sentence contains the other kind, the clerk thinks the text has ended and reads what follows as an instruction.
That is exactly what happened. To type long text, clawdcursor copied it to the clipboard with a small PowerShell script. The text was wrapped in straight single quotes (') and straight quotes inside it were doubled. But PowerShell also accepts typographic quotes, ’ and ‘, the ones most word processors produce. Those were not doubled. A document with them in the right place could close the string and add its own instructions to the script.
I am not publishing the exact text that triggers it. The principle is enough to understand it and to check your own tools.
The fix
One could simply double the typographic quotes too. But that only resets the game: one more forgotten character and the problem is back. The maintainer chose the robust option: the text is never written into the script any more. Since 1.5.26 it is handed to PowerShell separately, over standard input and base64-encoded. In the analogy, you no longer dictate the sentence; you hand the clerk a separate sheet to copy, never to be read as an instruction.
Why it matters beyond this tool
In this story the AI model made no mistake. It was asked to copy text and it copied text. It was not "manipulated" in the usual sense, and none of its answers looked suspicious.
The flaw was in the code that turns its requests into actions. That is often where to look when assessing an agent: follow every piece of outside data (an email, a PDF, a web page) to the place where it ends up executed, and check whether it can change nature there. The most mundane actions deserve the same attention as the others, precisely because nobody watches them.
Timeline
| Date | Step |
|---|---|
| Nov 4, 2026 | Private report to the maintainer via GitHub |
| Nov 5, 2026 | Version 1.5.26 and advisory GHSA-9ppf-38v8-h97v published |
| Nov 17, 2026 | This write-up, after the delay agreed to give users time to update |
Thanks to the maintainer for the welcome and for a fix that addresses the cause rather than the symptom. If you use clawdcursor on Windows, move to 1.5.26 or later.
Does your product ship an AI agent? CleanIssue tests what a stranger can make it do with the Agent Red Team Express (5 days, €1,900), or a custom red team for several agents and MCP servers. First step: a free 30-minute discovery call.
Related articles
Three adjacent analyses to keep exploring the same attack surface.
Computer-Use AI Agents: Risks and How to Test
An agent that drives the whole computer widens the attack surface: pop-ups, local files, downloads. Published figures, safeguards and a test procedure.
Browser AI Agents: Prompt Injection From a Web Page
Does a browser agent obey a booby-trapped page? Documented incidents, vendor precautions and nine concrete tests to measure the risk.
Function Calling: The AI Agent Attack Surface
Function calling and AI agents: five families of tool attacks, safer tool design and a testing protocol to limit unauthorized actions.
Sources
Related services
If this topic maps to a real risk in your stack, these are the most relevant CleanIssue audits.