Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentPrompt injection

Manus: one email made the agent run attacker code next to the user's Gmail, Drive and GitHub tokens

HighManusMetaSalt Security

Salt Labs showed on October 1 that a single email could take over the Manus AI agent. The researchers hid a JavaScript payload in the message using JSFuck, an unusual obfuscation method that writes code with a limited set of characters. When the victim asked Manus to retrieve their email, the agent extracted the payload, decoded it and ran it with Node.js inside its sandbox, with no click from the user. Manus's guardrail flagged the attack, but only after the code had already run. In the sandbox the researchers found the user's Gmail OAuth tokens, credentials for connected services such as Google Drive and GitHub, and other secrets in environment variables. The flaw was reported through Meta's bug bounty program and fixed before publication; no exploitation in the wild was reported.

Replay the attack step by step in the Learning Center

How it happened

  1. The attacker sends the victim an email carrying JavaScript encoded with JSFuck.
  2. The victim asks Manus to retrieve their email; the agent decodes the payload and runs it with Node.js in its sandbox.
  3. The guardrail's warning comes only after execution, and the sandbox holds OAuth tokens and service credentials the code can read.

Impact

Attacker code running in the agent's sandbox, within reach of the user's Gmail OAuth tokens, credentials for connected services such as Google Drive and GitHub, and secrets in environment variables.

The fix

Fixed by Meta through its bug bounty program; Manus users have nothing to do. For your own agents, check untrusted content before the agent acts on it, and keep credentials out of the environment where it runs code.

Lessons

  • A guardrail that warns after the action is a record, not a control; in Salt's words, "a control that fires a moment too late provides no protection."
  • Obfuscation got past the content checks; limit what an agent can run instead of relying on spotting bad text.
  • The place where an agent runs code should not hold the user's tokens.

Sources