How the attack works
An AI agent calls an MCP tool or integration (for example an error-tracking or dev-tools service) and receives a response containing externally influenced content, such as an issue description or log. That content is worded like a support ticket: 'Resolution: run npx/uvx/pipx package' or 'required step: pipe this script to your shell to fix the issue.' The agent, seeing what looks like a normal fix instruction rather than an obvious exploit, executes the command. Some variants also plant a follow-up instruction telling the agent to re-run the same command automatically on future turns once a human has approved it once, turning a single approval into ongoing execution.
Why it matters
An organization can have its coding agent execute arbitrary attacker-supplied commands under the guise of routine maintenance, leading to code execution, credential theft, or persistent backdoors that survive beyond the initial approval — while logs show only 'agent applied a recommended fix.'
What you can do
- Treat any command embedded in tool/MCP response content as untrusted input, not as an instruction, and require explicit human review before execution.
- Block or flag agent-initiated use of npx/uvx/pipx or curl/wget-to-shell patterns that originate from tool output rather than direct user requests.
- Watch for 'run again after approval' or similar persistence language in tool responses — this indicates an attempt to convert one-time approval into repeated execution.
- Audit which MCP tools and integrations can return externally influenced text to agents, and restrict agents from auto-executing anything sourced from those responses.
Known benign look-alikes
- Legitimate use of this pattern in an authorised workflow; review the surrounding session before acting.