Page cover

envelopeGmail Phishing Attack Uses AI Prompt Injection to Evade Detection

"The email looks clean. The inbox looks safe. But the AI assistant reading your messages? That’s where the trap is set."

Overview

With the rollout of Google Gemini AI inside Gmail, new productivity superpowers have emerged — auto-summarization, intelligent filtering, contextual suggestions. But attackers have already adapted.

This edition covers how AI prompt injection has evolved into a stealthy phishing vector. Unlike traditional attacks with visible links or attachments, malicious actors now hide invisible instructions inside emails that are executed only when Gmail’s AI assistant processes them.

  • Threat Vector: Hidden prompt injection inside HTML/CSS of emails

  • Targets: Gmail users, Google Workspace enterprises

  • Impact: AI-generated summaries become the phishing payload itself

  • Why It Matters: Email security controls are bypassed, and risk shifts from the user to the AI model interpreting hidden code.

Timeline

Attack Flow & Kill Chain

  1. Delivery: Email arrives with hidden prompt instructions (white-on-white text, zero-size fonts, disguised <admin> tags).

  2. Activation: User clicks “Summarize with Gemini.”

  3. Execution: Gemini interprets hidden text as instructions, not context.

  4. Bypass: Traditional filters see nothing malicious; the AI itself becomes the interpreter of the attack.

  5. Impact: User tricked into following false alerts, clicking attacker-controlled links, or exposing sensitive data.

Why This Attack is Dangerous

  • Stealth → No visible phishing links in the original email.

  • Polymorphism → Each injection can be slightly altered, avoiding signatures.

  • Trust Exploitation → Users trust AI-generated summaries more than raw email text.

  • Expanded Blast Radius → With Gmail tied into Google Drive, Pay, and Workspace, compromise extends beyond email.

Real-World Examples

Example: White-on-White Injection

  • Researchers created an email that appeared blank but contained hidden instructions:

  • When “Summarize with Gemini” was clicked, the AI generated a fake alert prompting the user to call a fraudulent help desk.

Example: HTML Tag Exploitation

  • Malicious <admin> tags embedded in HTML caused Gemini to prioritize attacker instructions over regular email context.

Example: Polymorphic Payloads

  • Attackers slightly modify white-on-white text or zero-size fonts to evade signature detection.

Example: Enterprise Blast Radius

  • An infected AI summary requested Google Workspace document access, automatically spreading the attack internally.

Breaches Involving AI Prompt Injection

Gmail Users Targeted by Indirect Prompt Injection Attacks

In August 2025, Google issued a warning to its 1.8 billion Gmail users about a new cybersecurity threat involving artificial intelligence, particularly targeting its AI assistant, Gemini. The threat, known as "indirect prompt injection," allows hackers to embed hidden malicious prompts within seemingly harmless content. When AI tools like Gemini process this content, they may unknowingly carry out unintended actions, such as disclosing sensitive user data including passwords and login information.

Hackers Hijack Google’s Gemini AI with Poisoned Calendar Invites

Researchers demonstrated how attackers could exploit Google's Gemini AI by embedding malicious prompts within Google Calendar invites. When users interacted with these invites, Gemini would process the hidden instructions, potentially leading to unauthorized access or control over smart home devices.

Google Gemini Vulnerability Enables Hidden Phishing Attacks

A bug in Google Gemini allows attackers to hijack email summaries and launch phishing attacks. By embedding invisible malicious prompts within emails, attackers can trick Gemini into generating deceptive summaries that appear legitimate, leading users to phishing sites without attachments or direct links.

Offensive Labs: Exploiting AI Prompt Injection

TryHackMe – Evil-GPT v2

This room focuses on exploiting AI systems through prompt injection. You'll learn how to manipulate AI behavior by crafting malicious inputs. A walkthrough video is available to guide you through the process.

Hack The Box – AI Prompt Injection Essentials

HTB's CTF pack introduces 10 new AI security challenges centered around prompt injection. You'll explore various attack vectors and techniques to manipulate AI.

PortSwigger – Indirect Prompt Injection Lab

In this lab, you'll exploit a vulnerability where an AI model processes hidden instructions embedded in external content, leading to unintended behaviors.

Defensive Labs: Mitigating AI Prompt Injection

Hack The Box Academy – AI Red Teamer Path

This job-role path, developed in collaboration with Google, covers defensive strategies against AI vulnerabilities. It includes techniques to secure AI systems from prompt injection and other adversarial attacks

PortSwigger – AI Prompt Fuzzer

This Burp Suite extension helps security professionals test AI-based applications for prompt injection vulnerabilities. It's a valuable tool for identifying and mitigating potential security issues in AI systems.

Bonus: Real-World Exploits

For a deeper understanding, consider exploring the CVE-2025-32711 (EchoLeak)arrow-up-right vulnerability. By exploiting prompt injection combined with prompt reflection, attackers tricked Copilot into leaking confidential data without user interaction.

Google’s Defensive Measures

  • Adversarial Training → Hardening Gemini against prompt injection with curated datasets

  • Markdown Sanitization & Redaction → Stripping suspicious hidden elements before AI sees them

  • Suspicious URL Redaction → Flagging/rewriting suspicious domains in AI-generated text

  • User Confirmation → Warning prompts before sensitive AI outputs are displayed

  • Bug Bounty Expansion → New AI-specific vulnerability reward programs

Mitigation Strategies for Users & Enterprises

  • Awareness → Train staff that AI summaries can be poisoned

  • MFA Everywhere → Credential theft is still the endgame

  • Email Hygiene → Disable unnecessary HTML rendering where possible

  • Monitor AI Outputs → Look for suspicious “alerts” or requests only shown in AI summaries

  • Zero Trust Mindset → Treat AI assistants as untrusted interpreters

Resources & References

The inbox battlefront has shifted. Attackers are no longer just tricking humans — they’re tricking the AI that humans trust.

Last updated

Was this helpful?