Skip to content
IAM Insights

Explainers · Glossary

Command injection

command ejection · OS command injection

Untrusted input reaches a shell or command line and runs as a command.

reference →

In our briefings

The claim each of the newest briefings on Command injection would have you leave with.

  1. Sehgal calls shadow MCP servers "Shadow IT with direct access to action". A developer finds a server online, adds a small configuration entry and restarts the client. The server then runs on the developer's machine, inherits their environment variables, and can reach internal services and run commands with the developer's permissions. Asked how many MCP servers exist in an environment, she says she would not know without asking developers. She has not seen many security teams actually detect these servers, and while commercial tools exist, she says the problem still needs a lot of attention.

    The OWASP MCP Top 10 lead says few security teams can find the MCP servers developers run on their own machinesBI-FIND-2026-1496

  2. MCP's sign-in flow lets the server tell the client where to send the user, and Zhong's team showed that the client passes that whole authorization URL to whatever opens it. A malicious or compromised server turned that into code running as the user: a PowerShell sub-expression through the widely used npm `open` package on Windows, which affected Google's Gemini CLI before version 0.17; file and SMB links that ran local or remote scripts; script injection in browser-based clients; and, in Anthropic's MCP Inspector, a stolen CSRF token that let a request start a local command. The fix in the official TypeScript SDK blocks javascript:, data: and vbscript: links but not file: or SMB, and the specification gives no rule for validating these URLs.

    An MCP server picks the login URL its client opens, and that was enough to run code on users' machinesBI-FIND-2026-0746

  3. Rajagopalan and Rao propose that every call an agent makes to a tool, data source or model carry its arguments and its policy signed together, and that an enforcement point in front of each tool check the signature, then that the policy was not swapped, then the policy itself, before anything runs. Tools sign their results back. Each tool gets its own keypair at registration, a user's login, through whichever scheme a framework uses (OAuth, API keys, SAML), is bridged into short-lived keypairs bound to the session, and a delegated agent's scope is what its delegator grants intersected with what it already holds. The signatures make a forged or altered call detectable. In the authors' own emulation of the Atlas browser attack, though, what stopped the injected instructions was policy: filesystem policies denying credential paths and network policies restricting external endpoints. We read this as saying the injection defence is only as good as the policies someone writes. The guarantee also assumes enforcement points nobody can get around; doing so, the authors write, means compromising framework binaries, "equivalent to kernel compromise and out of scope."

    MACAW Security's trust layer signs every agent call, but what stopped its prompt-injection test was a policyBI-FIND-2026-1230

›Cited in 7 briefings

Every briefing that discusses this term, newest first.

  1. The OWASP MCP Top 10 lead says few security teams can find the MCP servers developers run on their own machines

    Podcast · · The Application Security Podcast · Shadow MCP Servers: The AI Security Risk Hiding on Your Developers' Laptops · Oct 12, 2026

  2. An MCP server picks the login URL its client opens, and that was enough to run code on users' machines

    Video · · Black Hat · Aug 20, 2026

  3. MACAW Security's trust layer signs every agent call, but what stopped its prompt-injection test was a policy

    Paper · · arXiv · Mohan Rajagopalan et al. · Feb 11, 2026

  4. An MCP threat survey shows agents trusting tool names and descriptions, and skips the spec's own OAuth rules

    Paper · · arXiv · Xinyi Hou et al. · Oct 7, 2025

  5. MCP-Guard's classifier alone came within half a point of its best full pipelines' F1 on the authors' test set, and ran faster

    Paper · · arXiv · Wenpeng Xing et al. · Aug 14, 2025

  6. An MCP privilege study says obscure servers are riskier; its own table points the other way

    Paper · · arXiv · Zhihao Li et al. · Jul 5, 2025

  7. MCP Guardian wraps tool calls in token and regex checks, leaving poisoned servers and agent IDs open

    Paper · · arXiv · Sonu Kumar et al. · Apr 17, 2025