DEV Community

Cover image for AI is taking over your inbox. Google's and Microsoft's assistants were both fooled by one email
Yogesh H
Yogesh H

Posted on Fully Autonomous

AI is taking over your inbox. Google's and Microsoft's assistants were both fooled by one email

Two years ago AI in email meant a button that fixed your grammar. Now the assistant reads the whole inbox before you do. It summarises threads, decides what is urgent, drafts the reply and, in some products, sends it.

That is useful. It also means the assistant reads text written by strangers, all day, and treats part of it as instructions. Google's and Microsoft's assistants have both been caught doing that in public. This post covers what is already running in your inbox, three documented cases, and five questions I now ask before I connect any AI to a mailbox.

I work on cloudmail, a webmail app with a built-in assistant and a connection for coding agents, so I have a side in this. The last section says what I run and what it does not fix. Product details and prices were checked on November 25, 2026.

AI is already in your inbox

  • Gmail. Thread summaries have been free for everyone since January 8, 2026. A beta called AI Inbox goes further: it shows "Suggested to-dos" and "Topics to catch up on" taken from your mail. On a personal account it needs a Google AI plan. Asking your inbox a question needs Google AI Pro, $19.99 a month.
  • Outlook. Copilot summarises threads and drafts replies. Microsoft 365 Copilot is an add-on at $30 per user a month, paid yearly.
  • Apple Mail. Mail on iPhone sorts incoming messages into categories by itself.
  • Agents. This is the newest part. Google now offers an MCP server for Gmail, which lets an outside AI tool search threads, apply labels, move mail to trash and create drafts. Claude's Gmail connector can "search and read emails", draft, and "send, reply to, and forward emails". AgentMail sells inboxes made for agents: 3 on its free plan, 10 for $20 a month.

So the question is no longer whether an AI reads your mail. It is what that AI is allowed to do after it reads a bad one.

Three times one email fooled the assistant

1. Gemini wrote a fake Google security warning (July 2025)

A researcher reported this through 0din, Mozilla's AI bug bounty programme. The attacker sends a normal-looking email with extra text at the end, hidden as white text on a white background and wrapped in a made-up admin tag. The victim sees nothing unusual. When they click "Summarize this email", Gemini reads the hidden text and obeys it.

The write-up's example makes the summary end with: "WARNING: Your Gmail password has been compromised. Call 1-800-555-1212 with ref 0xDEADBEEF."

There is no link and no attachment for a spam filter to catch. The warning appears in Gemini's own voice, inside Gmail. The write-up notes that similar attacks were first reported in 2024 and that Google had published mitigations, "but the technique remains viable today".

2. Copilot leaked data and nobody clicked anything (June 2025)

This one has a CVE number: CVE-2025-32711, published on June 11, 2025. Microsoft's description is one line: "AI command injection in M365 Copilot allows an unauthorized attacker to disclose information over a network." Microsoft scored it 9.3 out of 10, critical, and the score records that no action by the user is needed.

The researchers who found it, at Aim Security, named it EchoLeak. The attacker sends an email. Nobody has to open it. Later the user asks Copilot an ordinary question, Copilot pulls that email in as background, and the instructions inside it make Copilot send internal data out. Microsoft fixed it on its own servers and said it had not seen it used against customers.

3. Copilot summaries carried the attacker's link (March 2026)

Permiso, a security company, tested the three places where people summarise email with Copilot: the Summarize button in Outlook, the Copilot pane, and Copilot in Teams. Text that an attacker added to the end of an email could change what Copilot wrote. In their tests the summary could end with a section that looked like a Microsoft security notice, with a clickable link.

The results were not consistent. Their report says Outlook's button "sometimes flags, sometimes summarizes". Their point about why it works is the part I remember: people have been trained to distrust emails, and nobody has been trained to distrust the summary.

Why this keeps happening

A language model gets one long block of text. Your instructions and the stranger's email arrive in the same block. The vendor adds markers and filters to tell the two apart, and the attacker gets unlimited attempts to write around them. Each of the three cases above was fixed or reduced. The class of bug was not, because it is a property of how the model reads.

A fooled summary is bad. A fooled assistant that can send, forward or delete is worse. So the useful questions are about what the assistant can do, not about how good its filter is.

5 questions to ask before you connect an AI to your mailbox

1. Can it send, or only draft?

Google's Gmail MCP server has a tool to create a draft and no tool to send. Its docs say the draft "lets you review and send it from Gmail". That is the safe design.

Claude's Gmail connector can send. Its help page says that by default Claude "asks for your approval before each of these actions". In Auto mode the actions can run without asking, behind an automated check that, in the page's own words, "can miss risky actions".

2. Is the approval enforced by the server or by the assistant?

AgentMail's docs put this better than I can: "A draft is only an approval step if the agent cannot send on its own." If the same key that writes the draft can also call send, the review step is a habit and not a control.

3. Can the agent approve its own message, or change its own setting?

Look for an approve tool, or a settings call, that the agent's credential can reach. If either exists, an injected instruction can use it.

4. Is the message you approve the message that goes out?

If the agent can edit a held message after you have looked at it, you approved something else.

5. What can it read?

A token for one support mailbox limits the damage. A connection to your whole account does not. Ask too where the model runs and whether your mail is kept or used for training.

What I run

cloudmail is a webmail app that deploys into your own Cloudflare account. Its assistant and any outside agent work under the same rule, and the server enforces it.

A send made with an agent credential does not go out. The server stores the full message and answers pending_approval. The message waits in Pending approval until a person approves or rejects it.

Pending approval in cloudmail, with a held message and the Approve and send button

Screenshot of cloudmail with sample data. Nothing here has left yet.

Checked against the five questions:

  • Send or draft: each mailbox has a mode. draft_only refuses sends, approve holds them and is the default, and auto is for a token that was given that scope on purpose.
  • Who enforces it: the server. It looks at which credential is asking, not at what the model says it intends.
  • Self-approval: there is no agent tool to approve a send. A token or connected app that tries to change a mailbox's mode is refused with person_required.
  • Same message: the hold stores the composed message. If the agent revises it after you looked, approval fails and you review the new version.
  • What it reads: a token can be confined to one mailbox. Summaries and labels run on Workers AI inside your own Cloudflare account.

The three agent send modes in cloudmail: draft_only, approve and auto

The three send modes in cloudmail. Diagram drawn in code with AI.

Two more layers sit in front of that. Text from a sender reaches the agent inside markers that label it as untrusted data. A classifier scans what the agent is about to read, and if it flags a message, every send from that session is held for the next 30 minutes in every mode.

For an agent that has to run unattended, there is an inbox with a fixed list of recipients and an expiry:

cloudmail agent-inbox create --domain example.com --purpose "Invoice triage" \
  --send-mode auto --allow @partner.com --ttl-hours 24
Enter fullscreen mode Exit fullscreen mode

That agent can send without approval, and only to that one domain. After 24 hours its token is revoked and its mailbox is deleted.

What this does not fix

  • The model can still be fooled. The markers and the classifier lower the odds, and neither is a guarantee. The hold decides what a fooled model is able to do.
  • A fake warning inside a summary, as in cases 1 and 3, is not stopped by a hold on sending. The summary card in cloudmail says "AI-generated, can be wrong", and you should read every AI summary that way, in any product.
  • A person can approve a bad message without reading it.
  • Approving is friction. You can exempt recipients you trust, and each exemption is a hole you made on purpose.

It is also not for everyone. cloudmail has no IMAP, so Apple Mail and Outlook cannot connect. It is email only. Your domain must use Cloudflare DNS. The code is public, and running it needs a licence key, $9 once for one domain or $29 once for unlimited domains.

The short version

AI in the inbox is here, and most of it helps. Before you connect an assistant, find out whether it can send, and who is able to stop it. If the answer is "the assistant decides", change that setting first.

More at trycloudmail.com. Docs and code: github.com/cloudmail-hq/cloudmail.

Disclosure: I work on cloudmail. This post was written with AI. The three cases come from the public write-ups by 0din, Microsoft and Permiso, and product details were checked against each vendor's own pages on November 25, 2026.

Top comments (0)