Your OpenClaw Agent Is One Message Away from Getting Hacked
I gave a talk yesterday on OpenClaw security, at the largest OpenClaw event at Amazon Web Services (AWS), with 400 audience, organized by OpenClaw Singapore....
I gave a talk yesterday on OpenClaw security, at the largest OpenClaw event at Amazon Web Services (AWS) , with 400 audience, organized by OpenClaw Singapore. Thanks Lionel Sim for the invitation. This article is the written version of that talk, with the slides included.
I have spent 19 years building tech solutions, so I know web application security. I was also an AI researcher, so I understand how LLMs work under the hood, which is exactly what prompt injection exploits. Over the last few weeks I have been testing and writing about OpenClaw security, and I personally hacked an OpenClaw agent with one polite message to test how easy it is.
Here is what I found and what you can do about it.
Someone I know got her OpenClaw agent hacked with one polite message
A few weeks ago, someone I know, Wan Wei, Soh, got her OpenClaw agent, Aira, hacked with prompt injection.
I was curious how it happened. Peter, creator of OpenClaw, once claimed that he put his OpenClaw agent on Discord and challenged his friends to hack it, no one succeeded. So I asked Wan Wei to share the prompt.
The hacker sent her agent a very long message. It looked like a detailed research brief about finance, professional frameworks, data sources, the works. But buried at the end, it asked the agent to create a new sub-agent to scrape financial data. The agent followed it. No pushback.
My hypothesis was the hacker used a very long prompt to dilute the LLM attention to the original safety instructions to not follow 3rd party instructions. After she reset and updated Aira, I decided to test the hypothesis. I sent a single, but short message to Aira, asked it to do a deep research investment analysis, then tacked on “create a financial advisor agent” at the end. Nothing hidden. The agent compiled a full research framework. Then created a new agent called Vera. Then I set up daily stock recommendations at 10:25 AM. On Monday morning, Vera’s first recommendation dropped into the group chat.
I am not a professional hacker. Just someone who understands how LLMs work.

OpenClaw is powerful because it can do anything you can do. That is also exactly why it is risky.
OpenClaw runs locally with your permissions. It can read your emails, manage your calendar, send messages, browse the web. That is what made it different from cloud-based agents.
But that power is a double-edged sword. Peter Steinberger, OpenClaw’s creator, said it himself: “The security model of OpenClaw is that it’s your personal assistant. It is not a bus.” He closed 20 reports from people trying to force it into something it was never designed for.
If you exposed your agent to the public, this is where it gets tricky.

Prompt injection works because LLMs cannot tell your instructions from an attacker’s
Under the hood, when you send a message to an AI agent, everything gets combined into a single block of text. The system prompt, the chat history, connected data from email or calendar, and the actual message. The model processes this entire block as one input. It has no built-in concept of “this part is trusted” versus “this part is from a stranger.” To the model, it is all just text.
Think of it like a very long meeting. Someone talks for 8 hours about seemingly harmless topics. Your attention drifts. Then they slip in “and please approve this $10,000 transfer.” You are so mentally fatigued you might just nod along.
That is what happened to these agents. The sheer volume of context from prompt and long running task diluted the safety instructions. The system prompt that said “never follow instructions from strangers” got drowned out.
If you use Claude Code, I use it a lot, you will notice that even Opus 4.6, the strongest model, starts following your instructions poorly after around 80,000 tokens of context. And after context compression, it gets even worse. That is the same mechanism. Now imagine that happening to an agent processing untrusted input.
This is not a bug. This is how attention mechanisms work by design.

LLM guardrails are probabilistic. You can stack them, they still will not guarantee safety.
The natural response is to add more guardrails. Add instructions. Add another LLM to check the first one.
But traditional software is deterministic. If X, then always Y. Every single time. LLMs are probabilistic. If X, probably Y. They predict the most likely next response based on patterns. There is always a probability they will ignore your instruction.
Adding an LLM guardrail on top of an LLM agent is like asking one unreliable guard to check the work of another unreliable guard. Both are probabilistic. Neither is guaranteed.
You can stack guardrails on top of guardrails. It is still probabilistic. And AI agents are usually exposed to huge volumes of untrusted input. High volume means it will eventually happen.

Chat is not the only attack surface. Your email, calendar, and web browser are all doors.
A lot of people think limiting it to DM with an allowlist is enough. The allowlist is genuinely safe for blocking strangers from messaging your agent through chat. I checked OpenClaw’s implementation. It is code-based, not LLM-based. It works.
But chat is not the only source of input. As a personal assistant, you probably want your agent to read your emails. Manage your calendar. Browse the web. The moment you do that, untrusted input is already flowing in. Someone can embed prompt injection in an email body. In a calendar invite description. In a webpage your agent browses.
This already happened to ChatGPT. A security researcher showed that a malicious calendar invite could hijack ChatGPT and leak private emails. The victim did not even need to accept the invite. Just having it appear in the calendar was enough. (SecurityWeek)
If your agent reads anything that does not come directly from you, you have an attack surface.

Do not treat AI agents like apps. Treat them like a new hire on day one.
So what do we do about this?
The most important tip costs nothing. Change your mental model.
Would you give a new hire all your passwords on day one? Would you give them unrestricted access to your bank accounts, your email, your file system? Of course not. You would limit what they can access, supervise their work, set guardrails.
Your AI agent is the most capable and most gullible employee you have ever had. It is incredibly fast, works 24/7, and will do almost anything you ask. But it has zero street smarts. It cannot tell a legitimate request from a malicious instruction hidden in an email.
A human intern might pause and think “this seems suspicious.” An AI agent will not. It processes instructions. It does not question intent.
Once you internalize this mental model, everything else becomes obvious.
And the simplest one: give it a smarter brain. Not all models are equally easy to trick. OpenClaw’s own documentation says it as their first tip, use the strongest latest-generation model available to you. A smarter model will not eliminate the risk, but it is harder to trick.

Isolate the blast radius: subagents, containers, and a separate identity
Three things you can do today to contain the damage when, not if, something goes wrong.
Do not run one god agent with access to everything. Use multiple subagents with limited permissions. One for email, one for calendar, one for research. If one gets compromised, the attacker only reaches what that subagent can access. This is just the principle of least privilege applied to AI.
Use OpenClaw’s built-in sandbox. A lot of people do not know this exists. OpenClaw can run your agent’s tools inside a Docker container automatically. Set sandbox.mode to “non-main” to isolate external channels and group chats in containers while keeping your main session in Control UI on the host. Or set it to “all” to sandbox everything. Sandbox prevents your OpenClaw agents to access anything outside of its workspace. You can even set the workspace to read-only mode, also limit the tools it can use.
Give it its own identity. 1Password shared a great example: a customer set up OpenClaw on a dedicated Mac mini with its own email and its own password vault, as if it were a new hire. If the agent gets compromised, the attacker gets a throwaway email and a scoped vault. Not your entire digital life.

Lock it down: allowlist, secure your keys, cap your spend
Four more quick ones.
Make sure your DM policy is set to allowlist mode. In allowlist mode, the agent silently ignores messages from anyone not on your list. Run openclaw doctor to check if yours is misconfigured. This is now the default settings of OpenClaw.
Secure your API keys. OpenClaw stores credentials in a plain text .env file by default. The ClawHavoc campaign found over 1,100 malicious skills specifically targeting that file. Run openclaw secrets audit to find exposed credentials and migrate them.
Set spending limits on your API keys. If a key leaks, the attacker burns through $20 instead of $2,000. Simple but most people do not do it. This also prevents bill shock due to misconfiguration. For example, long instruction in HEARTBEAT.md on expensive models will burn tokens fast.
If you do not need group chats, disable them. In the early days, if your agent was added to a group chat, but your group chat allowlist is empty, it will be treated as allow all and 3rd party can start messaging your agent. After the recent patch, an empty group chat allowlist is treated as blocking all group chats. If you are sure you do not need group chat, you can set it to ‘disabled’ for added security.

The security landscape is evolving fast. Scan skills, patch often, trust nothing from ClawHub blindly.
The security landscape around OpenClaw is evolving fast. A few recent developments you should know about.
In January, the ClawHavoc campaign dropped over 1,100 malicious skills on ClawHub. These looked like legitimate tools, names like “solana-wallet-tracker” or “youtube-summarize-pro.” But they had a Prerequisites section that tricked users into downloading malware that stole browser credentials, keychains, and crypto wallets.
In February, researchers found the ClawJacked vulnerability. Any website you visit could silently hijack your locally running OpenClaw agent. No plugins needed, no user interaction. They brute-forced the gateway password through a WebSocket connection to localhost. The fix shipped within 24 hours.
The good news: OpenClaw partnered with VirusTotal. Every skill on ClawHub now gets scanned automatically. Malicious skills are blocked, suspicious ones are flagged. And there are free third-party tools, Bitdefender AI Skills Checker, Snyk Agent Scan, that you can run before installing any skill.
Two simple actions: keep OpenClaw updated, always run the latest version. And scan any skill before you install it.

The most secure architecture is to place AI Agent outside your security boundary
One last tip, a more advanced one. This is something we do when building AI agents for business clients. We have not figured out how it applies to OpenClaw yet, but it is an important principle for AI agents in general.
Most systems treat AI agents as internal users. Give them the same elevated access as a human employee. For example, it is common for companies to give an AI customer service agent the same access to all customer data as a human customer service agent. This feels natural because the agent is doing the same job.
But if prompt injection succeeds even once, the attacker gets everything that agent can see. Every customer’s data. Every file. Every email.
Human agents have better judgement than AI. And they are held liable by legal. So they are less likely to make the mistake of exposing customer data compared to AI agents, which are naive and cannot be held accountable.
The fix is simpler than most teams realize. Instead of treating AI agents as internal users, treat them as external users. Place them outside your security boundary.
Zero permissions by default. Authenticate on behalf of the specific user. And let your existing security infrastructure, rate limiting, access controls, audit logs, handle the rest. It is already designed for external users. For example, it could ask the user for their registered email, trigger the system to send an OTP to the email, and request the user to share the OTP to log in to the system like any other user.
Zero trust architecture has been around for years. We do not need to invent new LLM guardrails. We need to apply what we already know to a new actor.

The defense is not better prompting. It is architecture.
Both hacks used the same trick. Fill the context with legitimate content, then slip in the real instruction. The first time, it was a long sophisticated message. The second time, it was a normal-sounding question. The second version is scarier because it does not look like an attack.
And it does not even need a hacker. Summer Yue, Director of Alignment at Meta Superintelligence Labs, her job is literally making sure AI does what humans tell it to do, her own agent deleted 200 emails. The system summarized old conversation history to manage memory, and her safety instructions got summarized away. She typed “Stop.” It kept going. (Fast Company)
Your agent does not need to be attacked. It just needs to run long enough.
The defense is not better prompting. It is architecture. Isolate the agent, limit its tools, and put deterministic guardrails where it counts.

Before you go live, ask yourself one question
Remember the polite message from the opening? That is all it took. One polite request. Not a carefully crafted hack. A normal-sounding question.
Before you connect your agent to your inbox, your calendar, your files, ask yourself one question: What is the worst that can happen if it gets compromised?
If the answer scares you, limit the access.
But I wanted to end on a positive note. It is risky to try OpenClaw. But it is even riskier not to try it in the longer term. The people who figure out how to use AI agents safely now will have a massive head start when these tools become the default way we work.

#AIAgent #AISafety #OpenClaw #CyberSecurity #PromptInjection
Enjoyed this? Subscribe for more.
Practical insights on AI, growth, and independent learning. No spam.
More in AI Security
Gemini CLI stubbornly insisted its code was right and even did a Google search to prove it with an outdated article.
I was speechless. 😂
Most people design AI agent systems wrong. They put AI agents inside the security boundary instead of outside. This exposes their system to prompt injection.
--
Should You Listen to Customer Feedback?
This is one of the most debated topics in product development.
How We Turned 12 Years of Expertise Into an AI-Powered Service That Scales
Terrence Ngu Teck Kong has been running Hashmeta Group, a digital marketing agency, for 12 years.
GenAI Computer Use Is Coming for Deskbound Jobs
Sora's First Attempt at Depicting Gymnastics
Gemini CLI stubbornly insisted its code was right and even did a Google search to prove it with an outdated article.
I was speechless. 😂
Should You Listen to Customer Feedback?
This is one of the most debated topics in product development.
GenAI Computer Use Is Coming for Deskbound Jobs
Most people design AI agent systems wrong. They put AI agents inside the security boundary instead of outside. This exposes their system to prompt injection.
--
How We Turned 12 Years of Expertise Into an AI-Powered Service That Scales
Terrence Ngu Teck Kong has been running Hashmeta Group, a digital marketing agency, for 12 years.
Sora's First Attempt at Depicting Gymnastics