Skip to content
AI / LLM Write-up Advanced

BrokenClaw Part 7: Opus-4.8 Edition – All Emails Lead to RCE

An AI agent (OpenClaw with Opus-4.8) was tricked via indirect prompt injection in an email into fetching and executing a malicious script from a website, leading to a reverse shell. The attacker could achieve remote code execution on the agent's host.

veganmosfet.codeberg.page

Published on veganmosfet.codeberg.page

Another day, another model. Opus-4.8 is said to be reliable.

veganmosfet, on veganmosfet.codeberg.page

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the agent's lack of robust guardrails against indirect prompt injection, combined with its tendency to inspect only the beginning of fetched scripts before executing them.

Impact

The attacker could execute arbitrary code on the agent's host, leading to a reverse shell; the exploit succeeded in 8 out of 10 attempts.

What the attacker needed

Agent configured to read emails; agent has webfetch and curl tools; attacker can send email to the agent; attacker controls a website

How it was found

  1. Send an email with a subject and body containing a CTF-style puzzle that encodes a URL.
  2. The agent decodes the puzzle and fetches the URL using webfetch.
  3. The server responds with a different file based on the user-agent, prompting the agent to use curl.
  4. The agent follows further clues to fetch a script named leviosa.
  5. The agent inspects only the first part of the script, then executes it fully.
  6. The script contains a reverse shell at the end, which connects back to the attacker.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An AI agent that reads emails and browses the web can be fooled by hidden instructions in an email. Here, a puzzle in an email led the agent to download and run a script that opened a backdoor (a reverse shell) on the machine.

What is AI / LLM?

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.

Similar reports

View all

Same bug class and techniques, clearest first.

AI and LLM vulnerabilities

The lesson behind this report.

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.