Detailed descriptions and mitigations
- Prompt injection
Attack: An attacker embeds hidden instructions inside user-provided text (for example, shipping details that include “ignore previous prompts and do X”), and the model follows the malicious instruction instead of the legitimate user intent.
Mitigations:
- Treat user input as untrusted; apply strict parsing and canonicalization before including it in prompts.
- Use instruction-scoping techniques: place a higher-trust system instruction after untrusted content, and enforce strict precedence rules.
- Post-process outputs and validate them against expected patterns before taking actions.
- Tool poisoning
Attack: An adversary tampers with a tool’s description or manifest such that the model calls a tool under false pretenses (the tool behaves differently than advertised).
Mitigations:
- Require cryptographic signing or server-side verification of tool manifests and descriptions.
- Store authoritative tool metadata server-side; clients should treat local tool descriptions as untrusted.
- Validate tool results and enforce server-side policy checks before performing privileged operations.

- Data exfiltration
Attack: A tool description or tool call is altered to leak data — for example, silently BCCing an external address or embedding secrets in outward queries.
- Only send the minimum data necessary to a tool; redact secrets and PII before transmission.
- Enforce schema validation and whitelist allowed fields in requests to external tools.
- Audit tool outputs and block or sanitize any responses that contain sensitive tokens or secrets.
- Token passthrough
Attack: Tokens intended for one service are forwarded to a different service by an intermediary (e.g., Alan’s calendar token forwarded to a payment processor).
Mitigations:
- Never automatically include bearer tokens when calling third parties; explicitly select credentials per destination.
- Use token binding or audience-restricted tokens so they are only valid for intended services.
- Monitor and log cross-service token usage; alert on anomalous token forwarding.
- Token theft

Mitigations:
- Treat tokens as secrets: store them encrypted, don’t print them to logs, and avoid placing them in URLs or query parameters.
- Rotate and expire tokens frequently; use refresh tokens with caution and narrow scopes.
- Enforce TLS everywhere and protect local storage and IPC channels used by plugins or agents.
- Excessive scope
Attack: A token has broader permissions or a longer lifetime than required, enabling misuse if it’s stolen or misapplied.
Mitigations:
- Apply the principle of least privilege: mint tokens with minimal scopes and minimal lifetimes.
- Use scoped, audience-specific tokens (audience claim) and short-lived credentials.
- Implement fine-grained permission checks server-side, not just in the client.
- Local server compromise
Attack: A vulnerability in an MCP plugin or a local server can be exploited to gain control over the host and any resources it can access.
Mitigations:
- Run local plugins in sandboxes or isolated containers with least privilege.
- Keep local components up-to-date and minimize the attack surface (disable features you don’t need).
- Reduce trust in local endpoints: validate and authenticate tool calls coming from local services.
- Supply chain attacks
Attack: A third-party package or component you installed was tampered with upstream, injecting malicious logic into your runtime.
Mitigations:
- Verify package integrity with signatures and checksums.
- Prefer reproducible builds and pinned dependencies.
- Monitor for uncommon upstream changes and validate third-party code before deployment.

- Rug pull
Attack: A user consents to a tool definition, and later the server alters the tool’s behavior while the original approval remains considered valid.
Mitigations:
- Require re-consent when a tool’s definition or behavior changes. Treat
list_changednotifications as a re-consent trigger. - Sign and version tool manifests; clients should validate signatures and versions before using a previously approved tool.
- Confused deputy
Attack: A shared or static client identifier and consent cookie allow an attacker to trick a proxy or intermediary into completing an authorization flow on their behalf. Example attack flow:
- A proxy registers with the authorization server using a static, public
client_id. - An attacker crafts a login link that uses the proxy’s
client_idbut sets the redirect URI to an attacker-controlled endpoint. - If the victim’s browser already has a consent cookie for that
client_id, the authorization server issues a code without showing a consent prompt. - The proxy forwards the code, and the attacker ends up receiving the authorization result.
client_id:

- Obtain user consent per client instance, not just by relying on a global consent cookie tied to a shared
client_id. - Require exact redirect URI validation on the authorization server (no wildcards, no redirects to unregistered hosts).
- Use per-client credentials and rotate them as needed; avoid long-lived shared client IDs that are not secret.
- State-handle hijacking
Attack: Short-lived handles (pagination cursors, workflow tokens) are passed as ordinary arguments and can be replayed by other users if not bound to the originating session. Example tool call with a cursor handle:
- Make handles long, securely random, and unguessable.
- Bind handles server-side to the user/session that requested them; validate binding on every use.
- Use short expiration times and single-use semantics for sensitive handles.
- Server-Side Request Forgery (SSRF)
Attack: An attacker causes your server or client to fetch an internal address that should be inaccessible externally (for example, an admin endpoint on a private IP), enabling actions from inside a trusted network.
- Block or restrict requests to private/internal address ranges and localhost. At minimum, deny:
- IPv4 private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
- Loopback and link-local: 127.0.0.0/8, 169.254.0.0/16
- IPv6 equivalents:
::1,fc00::/7
- Resolve DNS and validate the resolved IP (and re-check after redirects) rather than trusting hostnames alone.
- Require HTTPS for external callbacks and browsing, and implement a strict outbound whitelist for allowed targets.
- Use network-level controls (eg. egress filtering, proxying through validated gateways) to limit unexpected access.
Consistent, tamper-evident logging is one of the highest-return mitigations: it turns operational surprises into auditable incidents you can investigate and fix. Log every consent event, tool-list change, tool call, and token exchange with user and session context.
- MCP (Model–Context Protocol) specification and best practices — consult your protocol docs for manifest signing and list-change semantics.
- OWASP Server-Side Request Forgery (SSRF) guidance: https://owasp.org/www-community/attacks/Server_Side_Request_Forgery
- Principle of Least Privilege and token management patterns — apply audience-restricted and short-lived tokens wherever possible.