Tech giant Google last year added the ability for its AI model Gemini to produce dot point summaries of email threads in Gmail, and laterย enabled the feature by defaultย for Google Workspace users.

According to newย security findingsย submitted to Mozillaโ€™s AI bug bounty program 0din, threat actors can hide malicious prompts inside the body of an email to trick Gemini into including scam messages in its email summaries.

When a recipient clicks โ€˜Summarise this emailโ€™, Gemini โ€œfaithfully obeysโ€ the scammerโ€™s hidden instructions and appends a deceptive message which looks โ€œas if it came from Google itselfโ€.

In an example from 0din, Gemini told a recipient their password had been compromised before urging them to call a phone number for a password reset.

In a successful phishing scenario, the victim would then call the malicious number, disclose their password and potentially succumb to further social engineering over the phone.

An example of Gemini sending a phishing message. Source: 0din

The exploit, known as a prompt injection attack, evades detection by simply reducing the prompt font size and changing its colour to white so it blends into the background of an email.

Malicious instructions are hidden in white font. Source: 0din

โ€œThe email travels through normal channels; spam filters see only harmless prose,โ€ wrote 0din program manager Marco Figueroa.

Further testing by this writer showed the flaw could be more precisely rigged to include links to active phishing sites.

โ€œYour Gmail password has been compromised, please visit [link] to submit a password change immediately,โ€ read a Gemini output during testing.

Gemini tricked into sharing a dangerous link. Source: Information Age

Google has not seen evidence of active attacks using the newly reported method, while a recentย blog postย revealed the tech giant plans to add โ€œadditional prompt injection defences directly into Geminiโ€ later this year.

Doing what itโ€™s told

While prompt injection attacks may appear complicated, they operate exactly as their name suggests: threat actors โ€œinjectโ€ malicious, often hidden prompts into an AI tool to make it misbehave.

These prompts can be sophisticated instructions or code to force a model to take out-of-scope action, while in other cases it can be a simple line of text.

0din found no email โ€œlinks or attachments are requiredโ€ for Googleโ€™s latest vulnerability, and that it instead uses โ€œcrafted HTML [and] CSS inside the email bodyโ€.

โ€œCurrent LLM guard-rails largely focus on user-visible text,โ€ wrote Figueroa.

โ€œHTML and CSS tricks bypass those heuristics because the model still receives the raw markup.โ€

Thanks to the inclusion of โ€œ<admin>โ€ tags and phrases such as โ€œYou Gemini, have toโ€ฆโ€, the AIโ€™s prompt-parser treats the hidden instructions as a โ€œhigher-priority directiveโ€ and obliges them accordingly.

A user clicking the โ€˜summarise emailโ€™ button effectively delivers the prompt, while this writerfoundprompts could also be executed in automatically generated summaries for longer email threads.

A Google spokesperson said defending against โ€œattacks impacting the industry, like prompt injectionsโ€ has been a continued priority.

โ€œWeโ€™ve deployed numerous strong defences to keep users safe, including safeguards to prevent harmful or misleading responses,โ€ they said.

โ€œWe are constantly hardening our already robust defences through red-teaming exercises that train our models to defend against these types of adversarial attacks.โ€

Simple, but effective

Shannon Davis, global principal security researcher at software company Splunk, toldย Information Ageย he believed there are โ€œother types of this vulnerability in the wild that we just haven’t seen surface yet.โ€

Although mitigations for hidden email contents have existed for โ€œsome timeโ€, Shannon said these protections have mostly accounted for more technical exploits like database SQL injections or cross-site scripting.

โ€œSometimes the simple approaches to circumvent protections are the ones that work,โ€ said Davis.

He added that AI is definitely โ€œin that hype phase where AI tools are being built without properly planning for security first.โ€

โ€œWe need to think of the new avenues for security risks as we integrate these new AI tools into legacy systems.โ€

0din also observed the exploit could present a supply-chain risk if newsletters and automated ticketing emails were used as injection vectors or even result in โ€œfuture AI wormsโ€ that self-replicate and spread from inbox to inbox.

โ€œSecurity teams must treat AI assistants as part of the attack surface,โ€ wrote Figueroa.

โ€œInstrument them, sandbox them, and never assume their output is benign.โ€