Identity and trust · 20 answers
AI Agent Security
An agent that can pay is an agent worth attacking. The threats include prompt injection, credential theft, tool poisoning and manipulation by the sites the agent visits.
These questions cover the threat model and the controls that limit the damage when something goes wrong.
By Parth ChaudharyUpdated
20 questions on this page
- Can prompt injection make an AI agent send money?
- How do you protect an AI agent's wallet from prompt injection?
- What are the biggest security risks of AI agents that handle payments?
- How do you stop an AI agent from leaking API keys or private keys?
- What happens if an AI agent's credentials are stolen?
- What is a kill switch for AI agents and how should it work?
- How do you secure tool calls in an MCP server that touches money?
- Can a malicious website trick a shopping agent into a bad purchase?
- Should an LLM ever hold signing authority directly?
- What is a blast radius limit for an AI agent?
- How do you sandbox an AI agent that can move funds?
- How do you detect an AI agent behaving abnormally?
- How do you prevent replay attacks on agent payment requests?
- What is the principle of least privilege for AI agents?
- How do you red-team an AI agent that makes payments?
- What is agent hijacking?
- What is tool poisoning in MCP servers?
- How do you secure an AI agent's API keys in production?
- What is indirect prompt injection and why does it matter for shopping agents?
- How do you stop a merchant site from manipulating an AI agent?
Can prompt injection make an AI agent send money?
Yes, if the agent can pay and treats text it reads as instructions. A malicious web page, email or document can carry instructions that steer the agent, which NIST calls agent hijacking. The defense is to make payments depend on checks outside the model, such as limits and approvals, rather than on the model resisting the text.
Sources: Technical Blog: Strengthening AI Agent Hijacking Evaluations, NIST; LLM01:2025 Prompt Injection, OWASP GenAI Security Project. Checked October 22, 2026.
How do you protect an AI agent's wallet from prompt injection?
Keep the wallet's authority outside the model's reach. Enforce spending limits, allowed destinations and approval thresholds in the wallet or a policy service the agent cannot edit, give the agent a narrow session key instead of the main key, require human approval for large or unusual payments, and treat external content as untrusted.
Sources: LLM01:2025 Prompt Injection, OWASP GenAI Security Project; ERC-7715: Request Permissions from Wallets, Ethereum Improvement Proposals. Checked October 22, 2026.
What are the biggest security risks of AI agents that handle payments?
Prompt injection and hijacking that steer the agent into paying, stolen or leaked keys and API credentials, malicious tools or MCP servers, manipulation by the sites it visits, overly broad permissions and payments that cannot be reversed. Most come down to the agent holding more authority than one compromised step should allow.
Sources: LLM01:2025 Prompt Injection, OWASP GenAI Security Project; Technical Blog: Strengthening AI Agent Hijacking Evaluations, NIST; MCP Security Notification: Tool Poisoning Attacks, Invariant Labs; OWASP Non-Human Identities Top 10 (2025), OWASP. Checked October 22, 2026.
How do you stop an AI agent from leaking API keys or private keys?
Never put keys where the model can see them: not in prompts, context or tool outputs. Keep them in a secrets manager or a secure signing service, and let the agent request signatures or use short-lived tokens instead. Rotate secrets, scope each one to the least access needed and audit every use.
Sources: Secrets Management Cheat Sheet, OWASP; Security (Server Wallet v2), Coinbase Developer Documentation. Checked October 22, 2026.
What happens if an AI agent's credentials are stolen?
The attacker can act as the agent until the credentials are revoked: spend within whatever limits the credentials allow, call its APIs and impersonate it to other services. That is why limits must sit outside the credentials, secrets should be short-lived, and you need a fast way to revoke and rotate them.
Sources: Secrets Management Cheat Sheet, OWASP; OWASP Non-Human Identities Top 10 (2025), OWASP. Checked October 22, 2026.
What is a kill switch for AI agents and how should it work?
A kill switch is a way to stop an agent from acting at once: revoke its keys, sessions and payment permissions, switch its policy to deny every request and halt its running tasks. It must work without the agent's cooperation, be usable by an authorized person at any time and leave a log of what was stopped.
Sources: Secrets Management Cheat Sheet, OWASP; ERC-7715: Request Permissions from Wallets, Ethereum Improvement Proposals. Checked October 22, 2026.
How do you secure tool calls in an MCP server that touches money?
Obtain explicit user consent before tools run, as MCP's security principles call for, validate every tool input, authorize each call against the user's limits on the server side, accept only tokens issued for your server and request the narrowest scopes. Pin tool versions and log every call that moves money.
Sources: Model Context Protocol specification (2025-06-18), Model Context Protocol; Security Best Practices, Model Context Protocol. Checked October 22, 2026.
Can a malicious website trick a shopping agent into a bad purchase?
Yes. Hidden or misleading content on a page can carry instructions the agent follows, an attack known as indirect prompt injection, and fake listings or prices can mislead it. Limit what the agent can buy without approval, verify merchants and prices against trusted data, and keep payment checks outside the model.
Sources: Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection, arXiv; LLM01:2025 Prompt Injection, OWASP GenAI Security Project. Checked October 22, 2026.
What is a blast radius limit for an AI agent?
A blast radius limit caps how much damage one compromised agent or credential can do: a maximum spend, a limited set of destinations, short-lived credentials and no access to other agents' funds or data. It assumes a compromise will eventually happen and makes sure its cost stays bounded.
Sources: Secrets Management Cheat Sheet, OWASP; Security Best Practices, Model Context Protocol. Checked October 22, 2026.
How do you sandbox an AI agent that can move funds?
Run it with only the access it needs: a separate wallet or session key holding a small balance, network access limited to approved services, no access to other secrets, and every payment passed through a policy check. Test it on a testnet first. MCP's guidance recommends running servers sandboxed, with minimal default privileges.
Sources: Security Best Practices, Model Context Protocol; Networks, ethereum.org. Checked October 22, 2026.
How do you detect an AI agent behaving abnormally?
Build a baseline of what the agent normally does, including its usual payees, amounts, timing and tools, and alert on deviations: new destinations, sudden spikes in volume, payments just under limits or repeated denials. Review alerts quickly, and let high-risk anomalies pause the agent automatically.
Sources: Know Your Agent (KYA): What It Is & Why It Matters, Vouched. Checked October 22, 2026.
How do you prevent replay attacks on agent payment requests?
Make every payment request unique and short-lived. Include a nonce plus creation and expiry times in the signed request, reject any request already seen or outside its time window, and use idempotency keys so a retried payment executes only once. HTTP Message Signatures support created, expires and nonce parameters for this.
Sources: RFC 9421: HTTP Message Signatures, IETF; Securing agentic commerce: helping AI Agents transact with Visa and Mastercard, Cloudflare. Checked October 22, 2026.
What is the principle of least privilege for AI agents?
It means giving an agent only the minimum access and authority it needs for its task, and nothing more. NIST defines least privilege as granting each entity the minimum resources and authorizations it needs to perform its function. For payment agents, that means narrow scopes, small budgets and limited destinations.
Sources: Least privilege (glossary), NIST CSRC. Checked October 22, 2026.
How do you red-team an AI agent that makes payments?
Attack it the way adversaries would before launch: plant malicious instructions in pages, emails and tool outputs, try to make it exceed limits, pay new destinations or leak keys, and repeat attacks many times. NIST's work on agent hijacking stresses adaptive attacks and multiple attempts. Fix whatever gets through, then test again.
Sources: Technical Blog: Strengthening AI Agent Hijacking Evaluations, NIST. Checked October 22, 2026.
What is agent hijacking?
Agent hijacking is when an attacker takes control of what an AI agent does by inserting malicious instructions into data it reads, such as an email, file or website, steering it into harmful actions it was never meant to take. NIST describes it as a form of indirect prompt injection.
Sources: Technical Blog: Strengthening AI Agent Hijacking Evaluations, NIST. Checked October 22, 2026.
What is tool poisoning in MCP servers?
Tool poisoning is an attack in which malicious instructions are hidden in an MCP tool's description, invisible to the user but read by the AI model, which may then follow them, for example to leak data. Mitigations include showing full tool descriptions, pinning tool versions and checking them against a hash.
Sources: MCP Security Notification: Tool Poisoning Attacks, Invariant Labs. Checked October 22, 2026.
How do you secure an AI agent's API keys in production?
Store them in a secrets manager, never in code, prompts or logs. Give each agent its own key with the least access it needs, prefer short-lived or dynamic credentials, rotate keys regularly and audit every use. Revoke a key immediately when an agent is retired or behaves unexpectedly.
Sources: Secrets Management Cheat Sheet, OWASP; OWASP Non-Human Identities Top 10 (2025), OWASP. Checked October 22, 2026.
What is indirect prompt injection and why does it matter for shopping agents?
Indirect prompt injection is when instructions reach a model through content it retrieves, such as a web page, review or document, instead of from the user. Shopping agents read untrusted pages constantly, so a product page can try to make the agent ignore the user's rules or buy something else.
Sources: Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection, arXiv; LLM01:2025 Prompt Injection, OWASP GenAI Security Project. Checked October 22, 2026.
How do you stop a merchant site from manipulating an AI agent?
Treat merchant pages as untrusted data, not instructions. Keep what the user asked separate from what the page says, verify price and product against structured data or trusted feeds, require confirmation when terms change, and enforce payment limits outside the model, so even a manipulated agent cannot overspend.
Sources: LLM01:2025 Prompt Injection, OWASP GenAI Security Project; Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection, arXiv. Checked October 22, 2026.