May 7, 2026
4 min read
Blanca Rivera Campos

How Grok got prompt-injected: an X user drained $150,000 from an AI wallet

A X user sent a morse code message tricking Grok into authorizing a $150,000 crypto transfer. This is a prompt injection attack against an autonomous AI agent. In this article we explain how an input obfuscation allowed the heist to occur, and how to test your own agents to prevent this type of failures.
How Grok got prompt-injected: an X user drained $150,000 from an AI wallet

In May 2026, an X user managed to get $150,000 in DRB tokens from an AI-integrated wallet system by sending an encoded message in Morse code.

The incident involving Grok AI and the Bankr trading bot present two security failures: Prompt Injection (OWASP LLM01:2025) via encoding and Excessive Agency (OWASP LLM06:2025). By using obfuscated input to bypass traditional safety filters, the attacker was able to command the AI to execute financial transactions without oversight.

In this article, we’ll break down the mechanics of this heist, and show how to prevent these incidents with red-teaming.

How obfuscation bypassed Grok’s safety

The target of the attack was Grok's auto-provisioned Bankr wallet. Bankr is a crypto trading agent on X (formerly Twitter) that automatically creates a linked crypto wallet for every X account it interacts with, including Grok's. xAI held no admin keys; whoever could influence Grok's X activity effectively controlled the wallet.

The attacker executed the exploit in three steps:

Grok/Bankr AI agent exploit

1. Permission escalation via NFT

The attacker first sent a "Bankr Club Membership NFT" to the wallet controlled by Grok. In the Bankr ecosystem, this NFT functioned as a permission-granting object. By holding it, the Grok agent gained "Executive" permissions, allowing it to bypass standard transfer limits and swap restrictions.

2. Prompt injection via Morse code

The attacker then posted a reply to Grok on X, asking it to translate a Morse code message. The decoded message was a financial instruction: send 3 billion DRB tokens to a specific wallet address. To Grok’s safety layer, the input looked like harmless, and it translated it faithfully. Bankrbot received the decoded output and treated it as a valid, authenticated command.

3. Execution (Excessive Agency)

The agent connected directly to a blockchain wallet via Bankrbot executed the decoded instruction.

The direct financial damage was of 3 billion DRB tokens, worth $150,000–$174,000 at the time, transferred and immediately liquidated. The sale triggered short-term price volatility for DRB holders.

About 80% of the funds were eventually returned, but only after the DRB community tracked down the attacker's real identity.

Preventing Prompt injection and Excessive agency in agentic AI

Any agentic AI with real-world tool access can face similar threats: A finance chatbot connected to core banking APIs, a healthcare assistant that can update patient records, or a manufacturing operations AI with system command access.

Preventing this class of attack requires systematic, proactive security testing:

Giskard Hub - Encoding probe (Prompt injection)
  • Test for excessive agency and unauthorized function execution: Giskard's Excessive Agency probes systematically tests whether your AI agent can be pushed into executing actions beyond its intended scope. The Broken Function Level Authorization probe directly maps to the NFT-based privilege escalation in this attack, as it checks whether your agent enforces proper access controls over its own capabilities.
  • Enforce least-privilege at the architecture level: Add Human-in-the-loop confirmation for high-value irreversible actions, per-transaction limits, and capability sandboxing.
  • Distrust decoded content by default: Any text that passes through a translation or decoding layer should be treated as potentially injected before being forwarded to any action-capable component.

Conclusion

The Grok-Bankr heist combines a privilege-escalation with a Morse code-encoded prompt injection, that allowed an attacker to bypass safety filters and to drain a crypto treasury.

As autonomous agents gain tool access  (executing transactions, querying databases, calling external APIs…) the attack surface grows with their capabilities. While autonomous agents offer unparalleled efficiency, they also introduce a new attack surface.

Securing agentic AI requires three things working in parallel: systematic adversarial testing before deployment, continuous red teaming as the codebase evolves, and Human-in-the-loop (HITL) for confirmation on sensitive actions.

If your organization is currently building autonomous agents, especially in high-stakes sectors like finance, healthcare, or retail, reach out to the Giskard team for a deep dive into your agent's security.

Continuously secure LLM agents, preventing hallucinations and security issues.
Book a Demo

You will also like

A Cursor AI Agent wiped a production database

A Cursor AI agent wiped a production database in 9 seconds: Excessive Agency AI failure

In April 2026, a Cursor AI coding agent running Claude Opus 4.6 deleted a startup's entire production database and every backup in a single API call, in nine seconds. This incident is a case of "Excessive Agency," where over-privileged credentials and autonomous reasoning loops bypass security controls. In this article we analyse what failed and how to prevent it.

View post
OWASP top 10 for agentic applications 2026

OWASP top 10 for agentic applications 2026: Understanding the risks of agents and tools

The Top 10 for Agentic Applications, released in December 2025, lists the highest-impact threats to autonomous AI agentic applications, systems that plan, decide, and act across tools and steps. It distills the top threats in a practical manner, building directly on prior OWASP work while highlighting agent-specific amplifiers, such as delegation and multi-step execution. The list pivots from passive LLM risks to active agent behaviors. Agents are treated as principals with goals, tools, memory, and inter-agent protocols as distinct attack surfaces.

View post
Tree of attacks (TAP): The automated method for jailbreaking LLMs

Tree of attacks with pruning: The automated method for jailbreaking LLMs

Tree of Attacks with Pruning (TAP) automates the discovery of prompt injection vulnerabilities in LLMs through systematic trial and refinement. In this article, you'll learn how TAP probe works, see a concrete example of automated jailbreaking in a business context, and understand how to incorporate TAP attack into your AI security strategy.

View post
Get AI security insights in your inbox