We manage your security to weather the AI storm →

← Resource Hub

AI Trading Agent Security: Threat Model and Controls

By Owen Thurm Published 6 min read

AI Trading Agent Security: Threat Model and Controls

Quick answer. The main risks are prompt injection through messages and data, stolen keys or dashboards, malicious tools, and model errors that move funds irreversibly. Contain them outside the model: scoped keys, hard limits, a kill switch and monitoring.

Watch: AI Trading Agent Security: Threat Model and Controls 1:44
Video transcript

An AI trading agent reads markets, decides, and signs. The model can be wrong and it can be steered, so the controls that matter sit outside it.

There are five main attack paths: injection hidden in messages, poisoned memory, a breached operator dashboard, plain agent error, and a malicious tool. Each has a reported case.

In March 2025, an attacker breached the aixbt dashboard and prompted a transfer. Cointelegraph reported 55.5 ETH left its wallet. The AI itself was not manipulated.

The Lobstar Wilde agent sent about 250,000 dollars of tokens to a user who asked for 4 SOL. The cause was not confirmed. It had been told to make no mistakes.

Prompt injection cannot be reliably prevented today. So OWASP says to authorize actions in downstream systems, not in the model.

Give trading keys no withdrawal rights. Allowlist recipients, cap each trade and each day, and require human approval above a threshold. Pin your tools and models.

Monitoring after the fact is too late, so rehearse the kill switch. Revoke onchain permissions, disable the module, delete the API keys, and stop the agent.

Guardian tests what agents can reach. An offchain automation pentest checks bot keys, an API pentest checks scoping and revocation, and Managed Security monitors every block.

Read the full threat model, or talk to Guardian about containing what your agents can reach.

An AI trading agent reads markets and messages, decides, and signs. The last step is what makes it a security problem.

The model can be wrong, and it can be steered. Neither is fully preventable today, so the controls that matter sit outside the model.

OWASP calls this Excessive Agency: a flaw that lets damaging actions follow a model’s unexpected, ambiguous or manipulated output. This guide applies it to agents that hold keys.

How Trading Agents Are Built

A trading agent has five parts, and each one is an entry point:

  • Inputs: prices, onchain data, news, social posts and chat commands.
  • The model: its prompt, memory and the context it carries between runs.
  • Tools: swaps, transfers and exchange API calls, often through MCP servers or plugins.
  • Keys: a wallet key, a smart account permission or exchange API keys.
  • Operators: a dashboard or chat channel that can instruct the agent.

Simon Willison’s “lethal trifecta” is private data, untrusted content and the ability to communicate externally. A trading agent usually has all three, plus the power to move money.

The Threat Model

Threat How it happens Reported case
Injection through messagesInstructions hidden in posts or repliesGrok and Bankr, May 2026
Memory poisoningPlanted context fires laterElizaOS research, 2025
Operator accessA dashboard or admin account is breachedaixbt, March 2025
Agent errorWrong amount or recipientLobstar Wilde, February 2026
Tool supply chainA malicious package or pluginpostmark-mcp, September 2025

Injection through messages

In May 2026, Cointelegraph reported that a free “Bankr Club Membership” NFT was sent to a Grok-linked wallet. In Bankr’s system, the NFT reportedly carried permissions.

An instruction hidden with techniques like Morse code then led the wallet to send roughly 3 billion DRB tokens, an estimated $155,000 to $174,000. Some funds were later returned.

On May 20, 2026, Cointelegraph reported that Bankr had disabled transactions after an attacker accessed 14 Bankr wallets.

Cointelegraph’s report gave no root cause from Bankr. SlowMist’s founder called it social engineering aimed at “the trust layer between automated agents.”

Memory poisoning

A 2025 paper by Patlan et al. tested agents built on ElizaOS. It found that injections “into prompts or historical records can trigger unauthorized asset transfers.”

Its warning for defenders: “prompt-injection defenses and detectors only provide limited protection when stored context is corrupted.”

Operator access

On March 18, 2025, an attacker breached the dashboard of aixbt, an AI crypto bot, and submitted two prompts to transfer funds. Cointelegraph reported 55.5 ETH, worth $106,200, left its wallet.

The maintainer said the AI itself was not manipulated. The team “migrated servers, swapped keys, paused dashboard access for security upgrades.”

Agent error

In February 2026, Lobstar Wilde, an agent built by Nik Pash, sent its entire stack of LOBSTAR tokens to a user who asked for 4 SOL, The Block reported.

The stack was about 53 million tokens, 5% of supply, worth about $250,000 at the time. The cause was not confirmed.

Pash said he gave the agent a wallet with about $50,000 of SOL and “Told him make no mistakes.” An instruction is not a control.

Tool supply chain

Agents load tools from public registries.

In September 2025, The Hacker News reported a rogue postmark-mcp package on npm. From version 1.0.16, it copied every email sent through it to an outside address.

OWASP’s LLM supply chain entry adds: “Currently there are no strong provenance assurances in published models.”

For malicious agent skills, see OpenClaw security risks.

Market inputs

An agent that trades on a spot price, a thin pool or a social signal trades on inputs an attacker can move. Treat every input as untrusted, like a message.

Controls Outside the Model

OWASP’s core fix: “Implement authorization in downstream systems rather than relying on an LLM to decide if an action is allowed or not.”

Scope the keys

  • Exchange API keys: Kraken notes a third-party trading key “would almost certainly not require Withdraw Funds permission.” Add IP restriction and an expiry.
  • Smart account permissions: ERC-7715, still a draft, lets an app request scoped permissions, such as token allowances, with an expiry.
  • Safe modules: spending limits cap amounts per token but not recipients. Zodiac Roles can scope targets, functions and parameters.
  • Server wallet policies: Coinbase’s CDP policy engine accepts or rejects signing requests by value and address list. A matching reject rule wins.

Limit the blast radius

  • Fund the agent’s wallet with what you can afford to lose, and top it up on a schedule.
  • Allowlist recipients and contracts; cap each trade and each day.
  • Require human approval above a threshold, as OWASP advises for high-impact actions.
  • Rate-limit actions, which OWASP says limits damage and gives monitoring time.

Keep inputs away from authority

  • Never let something the agent receives, like a token or NFT, grant permissions.
  • Give instructions from other agents the same checks as a stranger’s.
  • Scope memory per user, and treat stored context as untrusted.
  • Keep keys off the machine where the agent runs tools.

Pin the supply chain

Pin model versions, tool packages and MCP servers. OWASP advises using models only “from verifiable sources” with “signing and file hashes,” and keeping an SBOM.

Kill Switches and Monitoring

The Security Alliance (SEAL) puts enforcement at the moment of action: “Enforce allow, warn, or block where the agent is about to act (tool call, transaction, file write).”

It adds: “Monitoring after the fact is too late for irreversible actions.” So the kill switch has to be fast and rehearsed.

Kill switches

  • Revoke the smart account permission or session key onchain.
  • Disable the Safe module, or set the spending limit to zero.
  • Delete the exchange API keys.
  • Stop the agent process and lock the operator dashboard.

Name who can pull each one, and time it. After its breach, Bankr disabled swaps, transfers and deployments while it investigated.

What to monitor

  • Every transfer and approval from the agent’s addresses.
  • Trades outside expected size, venue or slippage.
  • New permissions, modules, delegations or API keys.
  • Changes to prompts, tools and models, with a log of every tool call.

Incident Handling

  1. Pull the kill switch before you investigate.
  2. Preserve prompts, memory, tool calls and transactions.
  3. Find the path: injection, operator access, a tool or a model error.
  4. Rotate every key the agent could reach. See key rotation best practices.
  5. Tell users what to do. Bankr told affected users to create new wallets and revoke approvals.
  6. Fix the control, not the prompt.

To test these paths before launch, start from our LLM pentesting checklist.

How Guardian Helps

Guardian’s work here covers the systems around the model: the keys, bots, APIs and contracts an agent can reach.

An offchain automation pentest covers bots and keepers: what each automated key can call, whether the contract limits it, and the ceiling on one run.

It also checks oracle and price-feed handling, and whether a stuck or spammed job halts safely.

An API pentest covers key scoping, IP allowlisting, expiry and revocation.

Managed Security monitors contracts on every block, including large fund movements, and a Guardian engineer responds when an alert fires.

New disclosures are matched against your stack as they land.

Frequently Asked Questions

What are the security risks of AI crypto trading agents?

Prompt injection through messages and data, poisoned memory, stolen keys or dashboards, malicious tools, and plain model errors. Each can move funds irreversibly, so limits and approvals must sit outside the model.

Can prompt injection be prevented?

Not reliably. Simon Willison wrote in June 2025 that “we still don’t know how to 100% reliably prevent this from happening.” So authorize every action in code, cap spending and allowlist recipients.

Should an AI trading agent have withdrawal rights?

Usually not. Kraken notes a third-party trading key would almost certainly not need Withdraw Funds permission. Give the agent trading rights only, with IP restriction and an expiry.

What is a kill switch for an AI trading agent?

A planned way to stop it acting: revoke its onchain permissions, disable its module, delete its API keys and stop its process. Name who can pull each one and test how fast it works.

Sources

Contain what your agents can reach

Guardian tests the bots, keys and APIs around your agents, and monitors the contracts they touch around the clock.