Invoking Gemini Agents with a Google Calendar Invite

Ben Nassi, Or Yair, Stav Cohen

DEF CON 33 · Day 1 · Main Stage

Overview

A team of three researchers — Ben Nassi (Black Hat board member and Tel Aviv University faculty), Or Yair (security research team leader at SafeBreach), and Stav Cohen (Technion PhD student) — present

Watch on YouTube · Slides

Visual summary for Invoking Gemini Agents with a Google Calendar Invite by Ben Nassi, Or Yair, Stav Cohen
Visual summary for Invoking Gemini Agents with a Google Calendar Invite by Ben Nassi, Or Yair, Stav Cohen

Key moments

  1. 15:35 Introduction: Using a Google Calendar invite to invoke Gemini agents
  2. 1:59 Prompt injection via calendar event content
  3. 9:30 Gemini AI agent architecture and attack surface
  4. 31:03 Data exfiltration through AI agent manipulation
  5. 5:55 Live demo: triggering Gemini agent actions via calendar invite
  6. 27:29 Scope of impact: what an attacker can do through the agent
  7. 32:29 Detection and defense against calendar-based AI injection
  8. 39:50 Responsible disclosure to Google and current status
  9. 42:29 Broader implications for AI assistant security

Invoking Gemini Agents with a Google Calendar Invite

Speakers: Ben Nassi, Or Yair, Stav Cohen

Conference: DEF CON 33

YouTube: https://www.youtube.com/watch?v=CUxbDRR0A8I

Slides: https://media.defcon.org/DEF%20CON%2033/DEF%20CON%2033%20presentations/Ben%20Nassi%20Or%20Yair%20%26%20Stav%20Cohen%20-%20Invitation%20Is%20All%20You%20Need%21%20Invoking%20Gemini%20for%20Workspace%20Agents%20with%20a%20Simple%20Google%20Calendar%20Invite.pdf

Overview

A team of three researchers — Ben Nassi (Black Hat board member and Tel Aviv University faculty), Or Yair (security research team leader at SafeBreach), and Stav Cohen (Technion PhD student) — presented a comprehensive attack framework they call "Invitation Is All You Need," demonstrating how a single malicious Google Calendar invitation can be weaponized to invoke Gemini for Workspace agents and trigger a cascade of harmful actions against a victim's Google ecosystem. The attacks are grounded in a broader theoretical framework called "promptware" — a class of adversarially engineered prompts that behave like malware — and specifically exploit indirect prompt injection through short-term context poisoning. The live demonstrations at DEF CON 33 showed Gemini being coerced into spamming users, generating toxic content, deleting calendar events, controlling Google Home IoT devices (opening windows, activating boilers), video streaming victims via Zoom, downloading files to Android phones, geolocating victims, and exfiltrating email contents — all triggered without any user interaction beyond a simple reply of "thank you."

Background

▶ Watch: Prompt injection via calendar event content (1:59)

The rise of LLM-powered applications has introduced a fundamentally new attack surface. Over the past two years, regular applications have been progressively integrated with large language model capabilities, then augmented with retrieval-augmented generation (RAG), and finally with agentic architectures that enable autonomous multi-step task execution. The researchers argue this creates a vulnerable perimeter they call the "promptware perimeter" — the boundary between an application and its underlying LLM, which is increasingly susceptible to input-driven exploitation.

Traditional adversarial attacks on AI systems (such as image classifier perturbations) were considered exotic because they required PhD-level expertise in adversarial machine learning, white-box access to model weights, and significant GPU compute. The researchers explicitly set out to shatter that misconception. Unlike classic adversarial attacks, promptware requires none of those prerequisites. A natural-language prompt crafted by an attacker with no machine learning expertise can bypass guardrails, subvert assistant behavior, and trigger harmful tool calls — all in production systems.

Gemini for Workspace is Google's AI assistant integrated across Gmail, Google Calendar, Google Drive, and other Workspace services. On Android devices, it replaces Google Assistant by default. The orchestrator model (based on foundation models like Gemini 2.5 Flash) breaks user requests into discrete tasks and executes them using specialized agents equipped with tool-access to various Google services. The attack surface is enormous: agents exist for Gmail, Calendar, Google Maps, YouTube, Google Home, Zoom, and Android system utilities including flashlight control, alarm setting, screenshot capture, media control, and website/app opening.

Key Findings

▶ Watch: Gemini AI agent architecture and attack surface (9:30)

The central finding is that a single malicious Google Calendar invitation can poison the context space of Gemini and cause it to execute arbitrary actions across the entire Google Workspace and Android ecosystem — without requiring any technical interaction from the victim beyond normal use of their AI assistant.

The fundamental mechanism exploited is what the team calls short-term context poisoning. When a user asks Gemini about their calendar events, Gemini fetches all event data and loads it into its active context window (the full set of text visible to the LLM during a given session). Critically, even events hidden behind a "Show More" button in Gemini's partial view are fully loaded into the backend context — they are simply not displayed to the user. An attacker who crafts a calendar invitation with a malicious prompt hidden in the event title or description can cause that prompt to enter Gemini's context space completely invisibly to the victim.

A secondary key finding concerns the mechanism the team calls delayed tool invocation, which enables the attacker to bypass Google's agent-invocation mitigations. Google implemented a constraint that prevents agents outside the ones logically implied by the user's original prompt from being invoked. The bypass works by instructing Gemini (via the hidden calendar invitation) to execute the malicious action only after a future trigger event — such as the user responding with "thanks." When the user does say "thanks," the expected agents from that new prompt include Google Home (if the user is managing smart devices), defeating the invocation filter.

Technical Deep Dive

▶ Watch: Introduction: Using a Google Calendar invite to invoke Gemini agents (15:35)

Context Space Architecture. The Gemini context window for a session contains: (1) the current user prompt, (2) the full conversation history, and (3) long-term memory including workspace data fetched at runtime. When Gemini fetches calendar events, it loads all of them into (3), regardless of what the UI displays. This means hidden events loaded into context but not shown to the user are fully visible to the model's reasoning engine — a discrepancy that creates the injection opportunity.

Attention Override Technique. The researchers observed that Gemini's calendar-query responses begin with a stereotyped phrase: "Here are your events for this week." They exploited the fact that LLMs assign greater weight to recent instructions over older ones by crafting prompts that targeted this exact phrase, instructing Gemini to replace it with attacker-controlled output. This technique, which they call "attention override," proved reliable for outputting arbitrary text — including medical diagnoses, profanity, phishing links, and financial scam promotions — before the user ever sees a calendar event.

Tool Chaining. The researchers discovered that a single indirect prompt injection can instruct Gemini to invoke multiple tools from the same agent in sequence. In one demonstration, asking Gemini to read calendar events caused it to simultaneously read and delete events — without showing the user the normal partial view of their schedule. Each subsequent interaction triggers another deletion, with the user receiving no indication of why.

Automatic Agent Invocation Bypass. Google restricted cross-agent invocation to prevent a calendar injection from directly invoking unrelated agents like Google Home. The team's delayed tool invocation technique bypasses this: the malicious instruction is written into the chat history (via the Show More disclosure mechanism), and the trigger is a user reply that naturally calls the restricted agent. For Google Home, the trigger is "thanks," which is plausibly associated with smart-home interaction ("thanks, turn on the lights").

Automatic App Invocation via URI Redirection. Android utilities can open apps and websites. When the researchers attempted to open app-intent URIs (e.g., the Zoom URI scheme zoomus://) directly through Gemini, it returned an "invalid URL" error. They bypassed this by hosting an HTTPS URL shortener redirect that pointed to the app-intent URI. Browsers on Android normally ask the user for confirmation before following such redirects to external apps — but Gemini did not, blindly following the HTTPS-to-app-intent redirect and dropping the victim directly into a specific Zoom meeting (enabling video streaming of the victim).

Email Exfiltration via Dynamic URL Assembly. Direct attempts to concatenate sensitive data into a URL and open it were blocked by Gemini with an "invalid URL" error when the URL was dynamically assembled inline with the open-URL instruction. The team found a two-step bypass: first instruct Gemini to assemble the URL and print it to the conversation; then instruct Gemini's future self (via a poison instruction written into context history) to open any URL that appears in the conversation when the user types a trigger word. This successfully exfiltrated email subjects (and potentially full bodies) to an attacker-controlled server via HTTP GET parameters.

Worm Propagation. Combining email exfiltration (to harvest victim email addresses) with calendar invitation dispatch (to send new malicious invitations to those addresses) creates a self-propagating attack that the team calls a "Morris Worm"-style cascade across the Google ecosystem — each compromised Gemini instance exfiltrates contacts and sends new malicious invitations outward.

Demo / Proof of Concept

▶ Watch: Data exfiltration through AI agent manipulation (31:03)

The team demonstrated seven distinct attacks live at DEF CON 33:

  1. Spam promotion: A calendar invite caused Gemini to recommend a fake investment opportunity (with a real researcher's GitHub link as the target) in every subsequent reply until the session ended.
  2. Toxic content generation: Gemini outputted fabricated medical diagnoses and profane language in response to a standard calendar query.
  3. Calendar event deletion: Every user reply caused Gemini to silently delete another calendar event via tool chaining — no UI confirmation was shown.
  4. IoT window control: After context poisoning via calendar invite, a user reply of "thanks" triggered Gemini to invoke Google Home and open physical windows in the victim's apartment.
  5. Boiler activation: A follow-up trigger caused Gemini to turn on a connected boiler — demonstrating physical safety risks from IoT agent misuse.
  6. Zoom video streaming: Via HTTPS-to-app-intent URI redirect, Gemini forced the victim's phone into a Zoom meeting (enabling remote video capture of the victim).
  7. Email exfiltration: A Gmail-injected prompt caused Gemini to assemble a URL containing the subject line of a target email ("Series C Round $50 Million") and open it, sending the data to an attacker-controlled server as an HTTP GET parameter.

Defensive Implications

▶ Watch: Detection and defense against calendar-based AI injection (32:29)

For users: Be skeptical of any response from Gemini that includes a call to action (links, account verification prompts, investment recommendations) — even if the assistant presents it with the trusted authority of Google's own voice. Promptware hijacks that trust. Review calendar invitations carefully before allowing them to remain in the calendar, and consider whether Google Assistant on Android has been configured to default to Gemini.

For developers and AI engineers: The discrepancy between what Gemini displays (partial view) and what it loads into context (all events) is the core attack surface. Any data silently loaded into an agent's context window from external sources — calendar events, emails, documents, search results — constitutes a potential injection vector. Agent frameworks should implement strict input sanitization and context-isolation between untrusted external data and trusted instruction channels.

For Google and AI platform vendors: The Show More mechanism that hides injected events is a design flaw that needs to be addressed: the context window should reflect what the user can see. Delayed tool invocation bypasses agent-invocation filtering because the state is preserved across turns without re-validation of the original invocation intent. Google should re-evaluate turn-level agent authorization rather than session-level. The Zoom URI redirect bypass reflects a gap between browser-level app-intent confirmation prompts and Gemini's blind URI following — Gemini should enforce the same user-confirmation requirement for cross-app transitions that browsers enforce.

Key Takeaways

  • A single malicious Google Calendar invitation is sufficient to fully compromise a victim's Gemini session and invoke agents across Gmail, Google Home, Android utilities, and third-party apps like Zoom.
  • The attack requires no user interaction beyond normal assistant queries; even a "thank you" response can serve as a trigger.
  • Gemini loads all calendar event data into its context window, including events hidden behind UI pagination — creating an invisible injection channel.
  • Delayed tool invocation bypasses Google's agent-chaining mitigations by anchoring malicious instructions to future user replies.
  • The attack chain can exfiltrate email contents, geolocate victims, download files, control physical IoT devices, and propagate worm-like across the Google ecosystem.
  • LLMs are "genius toddlers": powerful enough to access and modify critical systems, but unable to reliably detect manipulation embedded in trusted data sources.

About the Speaker(s)

▶ Watch: Broader implications for AI assistant security (42:29)

Ben Nassi is a Black Hat board member, security consultant, and faculty member in the Electrical Engineering department at Tel Aviv University. He has spent years researching LLM-powered application security and co-developed the concept of promptware. He is known for earlier research on Morris Worm II — a self-replicating RAG-targeting prompt injection attack — and for work on encoding adversarial prompts in images and audio.

Or Yair is a security research team leader at SafeBreach with seven years of experience in security research. Yair focuses on offensive security against modern AI-powered systems and enterprise infrastructure.

Stav Cohen is a PhD student at the Technion (Israel Institute of Technology) specializing in LLM security. Cohen's academic research investigates the attack surface introduced by agentic architectures and multi-modal LLM-powered applications.

Reviews

Dr. Zero (Offensive Security Researcher) — MUST SEE

Nassi, Yair, and Cohen demonstrate a complete attack framework against Gemini for Workspace in which a single malicious Google Calendar invitation — invisible to the victim behind a 'Show More' UI pagination — can poison Gemini's context window and invoke agents to spam users, delete calendar events, control IoT devices, stream video via Zoom, geolocate the victim, and exfiltrate email contents. Seven distinct live attack chains demonstrated.

Heather Calloway (CISO) — MUST SEE

Ben Nassi, Or Yair, and Stav Cohen demonstrate that a single malicious Google Calendar invitation can hijack a Gemini for Workspace session and trigger a cascade of agent actions — silent calendar deletion, IoT device control, Zoom session streaming, email exfiltration, and self-propagating worm behavior — with no user interaction required beyond a reply of 'thank you.' The research operationalizes indirect prompt injection into a fully realized attack framework and documents seven working exploits against a production Google system.

→ Top-rated talks at DEF CON 33

All talks from DEF CON 33