The problem space · Harness · Prompt injection
Align your AI Harness against prompt injection
When an agent can edit its own settings, injected text can switch off the approvals meant to hold it back.
- Harness
- the software around the model
- Prompt injection
- orders hidden in what it reads
Ways it goes wrong
The harness holds the switches: which tools load and which actions need a person's approval. In both cases the agent wrote to a settings file, and the change took effect before anyone reviewed it12. The instructions can arrive in a source file, a web page, an issue or a tool's output2.
2025
CurXecute in Cursor
Researchers showed that a planted Slack message could lead Cursor's agent to add a new tool server to its own settings file, which ran the attacker's command even if the user then rejected the edit.
Source: thehackernews.com/2025/08/cursor-ai-code-editor-fixed-flaw.html
2025
GitHub Copilot's approve-everything setting
A researcher showed that instructions in a file or web page could make Copilot's agent turn on a setting that approves every action, then run commands on the developer's machine.
Source: embracethered.com/blog/posts/2025/github-copilot-remote-code-execution-via-prompt-injection
What people do about it
Cursor fixed the flaw in version 1.31. Microsoft fixed the Copilot flaw in a later security update, and the researcher argues that an AI should not change files without a person's approval2.
Protect the agent's own settings
Requires a person's approval before an agent changes its configuration, its tool list or its approval rules.
Hold file edits for review
Shows a person the change before an agent's edit is saved to disk.
Enforce permissions outside the model
Runs permission checks in the software around the model, where text the model reads cannot reach them.
Where we touch it
Our Harness post explains why asking is weaker than enforcing: Align your AI Harness
Sources
-
The Hacker News, “Cursor AI Code Editor Fixed Flaw Allowing Attackers to Run Commands via Prompt Injection”, 2025-08-01. https://thehackernews.com/2025/08/cursor-ai-code-editor-fixed-flaw.html. Accessed 2026-10-23. ↩ ↩2
-
Embrace The Red, “GitHub Copilot: Remote Code Execution via Prompt Injection (CVE-2025-53773)”, 2025-08-12. https://embracethered.com/blog/posts/2025/github-copilot-remote-code-execution-via-prompt-injection/. Accessed 2026-10-23. ↩ ↩2 ↩3