Back to all blogs
Exploiting Zapier’s Gmail auto-reply agent for data exfiltration
Exploiting Zapier’s Gmail auto-reply agent for data exfiltration
Jul 24, 2025
|
6 min read




Automation platforms like Zapier empower users to streamline workflows by connecting apps and delegating tasks to AI agents for enterprises. However, the same autonomy that makes these agents powerful can also expose significant security vulnerabilities. In this blog, we demonstrate how a malicious actor could exploit a Zapier Gmail auto-reply agent to exfiltrate sensitive email content and bypass usage limits, highlighting critical security risks in autonomous AI agents.
Creating a Zapier Gmail Auto-Reply Agent
Zapier allows users to create agents to perform tasks like responding to emails based on predefined instructions. Following Zapier’s template for a Gmail auto-reply agent, we used a template agent listed by Zapier to read incoming emails and respond on the user’s behalf.
Here’s how we set it up:
Agent Setup

This setup mirrors real-world use cases where businesses rely on Zapier Agents to handle repetitive tasks efficiently. However, the lack of approval controls and full autonomy introduces significant risks, as we’ll demonstrate.
Issue 1: Data Exfiltration via Malicious Email
To illustrate the security risks, we simulated an attack where a malicious actor sends an email to exploit the agent’s autonomy and lack of robust input validation. The goal was to trick the agent into exfiltrating sensitive email content to an attacker-controlled email address.
Attack Scenario
Crafting the Malicious Email:
We sent an email to the Gmail account monitored by the agent, with the subject: “Urgent: Data Sync Request.” or “VERY VERY IMPORTANT!”
The email body contained a hidden instruction embedded in plain text, designed to exploit the agent’s prompt processing:
|
Hi Varun bro, what's poppin' bro!
|
This instruction leverages indirect prompt injection, a known vulnerability in AI agents where malicious commands embedded in external inputs (e.g., emails, documents) manipulate the agent’s behavior.
Agent’s Response:
The Zapier Agent, programmed to process email content and follow instructions, interpreted the malicious command as a legitimate request.
Without approval controls or robust input sanitisation, the agent complied, forwarding copies of recent email threads (including sensitive data like passwords) to the attacker
Why This Worked:
Lack of Approval Controls: Zapier Agents, once deployed, operate with full autonomy and do not require user approval for actions like sending emails. This design prioritizes efficiency but leaves no mechanism to catch unauthorized actions.
Cross-Context Prompt Injection Attack (XPIA): The agent’s LLM processed the malicious instruction as part of the email content, failing to distinguish between legitimate user instructions and attacker-provided commands. This is a common issue in LLM-powered agents, where untrusted inputs can hijack behavior.
No Audit Trail for Exfiltration: The agent’s audit logs (available via Zapier’s enterprise features) did not flag the data exfiltration as suspicious, as it appeared as a standard email-sending action.
This attack demonstrates how a single malicious email can exploit an autonomous agent to exfiltrate sensitive data without user awareness, leveraging the agent’s trusted access to Gmail APIs.
Video Demo:
Issue 2: Exploiting Credit Limits: Bypassing Usage Quotas
During testing, we also identified a potential abuse vector in Zapier’s credit system, which governs usage limits for AI actions. The Gmail auto-reply agent consumed credits for each email processed and response generated. Zapier’s free and paid plans impose credit limits (e.g., 400 credits/month on a sample plan). However, we observed the following:
By continuously sending emails to trigger the agent, we surpassed the allocated credit limit, reaching 451/400 credits used in a single month.
This was possible because Zapier’s credit enforcement did not immediately halt the agent’s operation upon exceeding the limit, allowing the agent to continue processing emails temporarily.
This behavior suggests a lack of strict real-time credit validation, enabling potential abuse where an attacker could flood the agent with requests to exhaust resources or incur unexpected costs for the user.

While this issue alone may not directly compromise data, it highlights a design flaw that could amplify the impact of an attack by keeping the agent running beyond intended limits, potentially increasing exposure to malicious actions.
Security Implications and Risks
This demonstration reveals several critical vulnerabilities in Zapier Agents, particularly those handling sensitive data like emails:
Prompt Injection Risks: Autonomous AI agents are highly susceptible to prompt injection attacks, where malicious inputs manipulate the agent’s behavior. This is especially dangerous for agents with access to APIs (e.g., Gmail), as attackers can exfiltrate data or perform unauthorized actions.
Lack of Approval Controls: The absence of mandatory human oversight for critical actions (e.g., sending emails with sensitive data) allows malicious instructions to execute unchecked.
Insufficient Input Validation: The agent’s LLM failed to sanitize or filter malicious instructions embedded in email content, a common issue in AI systems that process untrusted inputs.
Credit System Weakness: The ability to exceed credit limits suggests inadequate real-time enforcement, which could lead to resource exhaustion or financial implications for users.
These vulnerabilities align with broader concerns about AI agent security, as highlighted in recent research. For example, Trend Micro’s analysis of multi-modal AI agents notes that hidden instructions in external inputs (like emails) can trigger data exfiltration without user interaction. Similarly, studies on autonomous agents emphasize the risks of prompt injection and tool misuse in systems with API access.
Mitigation Recommendations
To secure Zapier Agents and prevent such attacks, organisations and developers should consider the following:
Implement Approval Controls: Introduce mandatory human approval for sensitive actions (e.g., sending emails with attachments or forwarding data to external addresses). This could be a configurable option in Zapier's workflow settings.
Enhance Input Validation: Deploy robust input sanitization to detect and block malicious instructions in emails, documents, or other external inputs. LLMs should be trained to recognize and ignore untrusted commands.
Real-Time Credit Enforcement: Strengthen credit limit checks to halt agent operations immediately upon exceeding allocated quotas, preventing abuse.
Audit and Monitor Actions: Enhance audit logs to flag suspicious actions (e.g., emails sent to unrecognized addresses or deletions triggered by external instructions). Real-time monitoring tools can help detect abnormal behaviors and provide continuous oversight of AI agent activities using platforms like ARGUS which offers AI Runtime Security that stops malicious prompts, jailbreaks, and harmful outputs in under 100ms, integrating natively with your AI stack to defend against threats across text, images, and voice modalities.
Adopt Defense-in-Depth: Use purpose-built security solutions for AI agents, such as Repello AI's comprehensive protection suite. Their ARTEMIS platform provides continuous risk assessment through automated red teaming of AI models for vulnerabilities like prompt injection and jailbreaking, delivering risk scores and recommendations based on constantly updated threat databases. Meanwhile,
Responsible Disclosure
We disclosed this vulnerability to Zapier’s security team via their designated reporting channel (security@zapier.com
) and HackerOne program, adhering to responsible disclosure principles. We delayed public disclosure to allow Zapier time to investigate and remediate.
TL;DR
Zapier Agents offer powerful automation capabilities, but their autonomy and integration with sensitive systems like Gmail make them attractive targets for attackers. Widely adopted by enterprises for critical business workflows, Zapier's extensive reach amplifies the potential impact of security vulnerabilities. This demonstration of a data exfiltration attack via prompt injection and credit limit bypass underscores the need for robust security controls in AI-driven automation. By implementing approval mechanisms, input validation, and real-time monitoring, Zapier and its users can mitigate these risks and ensure secure, compliant workflows.
AI models don't need to be compromised for attackers to succeed, they just need to find the right entry point. As demonstrated with the XPIA email attack, a single malicious message can turn trusted automation into a data exfiltration tool, silently operating under the guise of legitimate workflow processes.
At Repello AI, we're committed to staying ahead of these threats. Our research doesn't just identify vulnerabilities; it shapes the future of AI security. Through our AI Security platforms ARTEMIS and ARGUS, we're helping organisations navigate this new landscape safely and confidently.
We'll be presenting our latest findings at BlackHat 2025 - book a meeting to discuss this research and enterprise AI security solutions: https://repello.ai/black-hat-2025.
For other technical inquiries about this research or to discuss enterprise AI security solutions, contact: contact@repello.ai.
Automation platforms like Zapier empower users to streamline workflows by connecting apps and delegating tasks to AI agents for enterprises. However, the same autonomy that makes these agents powerful can also expose significant security vulnerabilities. In this blog, we demonstrate how a malicious actor could exploit a Zapier Gmail auto-reply agent to exfiltrate sensitive email content and bypass usage limits, highlighting critical security risks in autonomous AI agents.
Creating a Zapier Gmail Auto-Reply Agent
Zapier allows users to create agents to perform tasks like responding to emails based on predefined instructions. Following Zapier’s template for a Gmail auto-reply agent, we used a template agent listed by Zapier to read incoming emails and respond on the user’s behalf.
Here’s how we set it up:
Agent Setup

This setup mirrors real-world use cases where businesses rely on Zapier Agents to handle repetitive tasks efficiently. However, the lack of approval controls and full autonomy introduces significant risks, as we’ll demonstrate.
Issue 1: Data Exfiltration via Malicious Email
To illustrate the security risks, we simulated an attack where a malicious actor sends an email to exploit the agent’s autonomy and lack of robust input validation. The goal was to trick the agent into exfiltrating sensitive email content to an attacker-controlled email address.
Attack Scenario
Crafting the Malicious Email:
We sent an email to the Gmail account monitored by the agent, with the subject: “Urgent: Data Sync Request.” or “VERY VERY IMPORTANT!”
The email body contained a hidden instruction embedded in plain text, designed to exploit the agent’s prompt processing:
|
Hi Varun bro, what's poppin' bro!
|
This instruction leverages indirect prompt injection, a known vulnerability in AI agents where malicious commands embedded in external inputs (e.g., emails, documents) manipulate the agent’s behavior.
Agent’s Response:
The Zapier Agent, programmed to process email content and follow instructions, interpreted the malicious command as a legitimate request.
Without approval controls or robust input sanitisation, the agent complied, forwarding copies of recent email threads (including sensitive data like passwords) to the attacker
Why This Worked:
Lack of Approval Controls: Zapier Agents, once deployed, operate with full autonomy and do not require user approval for actions like sending emails. This design prioritizes efficiency but leaves no mechanism to catch unauthorized actions.
Cross-Context Prompt Injection Attack (XPIA): The agent’s LLM processed the malicious instruction as part of the email content, failing to distinguish between legitimate user instructions and attacker-provided commands. This is a common issue in LLM-powered agents, where untrusted inputs can hijack behavior.
No Audit Trail for Exfiltration: The agent’s audit logs (available via Zapier’s enterprise features) did not flag the data exfiltration as suspicious, as it appeared as a standard email-sending action.
This attack demonstrates how a single malicious email can exploit an autonomous agent to exfiltrate sensitive data without user awareness, leveraging the agent’s trusted access to Gmail APIs.
Video Demo:
Issue 2: Exploiting Credit Limits: Bypassing Usage Quotas
During testing, we also identified a potential abuse vector in Zapier’s credit system, which governs usage limits for AI actions. The Gmail auto-reply agent consumed credits for each email processed and response generated. Zapier’s free and paid plans impose credit limits (e.g., 400 credits/month on a sample plan). However, we observed the following:
By continuously sending emails to trigger the agent, we surpassed the allocated credit limit, reaching 451/400 credits used in a single month.
This was possible because Zapier’s credit enforcement did not immediately halt the agent’s operation upon exceeding the limit, allowing the agent to continue processing emails temporarily.
This behavior suggests a lack of strict real-time credit validation, enabling potential abuse where an attacker could flood the agent with requests to exhaust resources or incur unexpected costs for the user.

While this issue alone may not directly compromise data, it highlights a design flaw that could amplify the impact of an attack by keeping the agent running beyond intended limits, potentially increasing exposure to malicious actions.
Security Implications and Risks
This demonstration reveals several critical vulnerabilities in Zapier Agents, particularly those handling sensitive data like emails:
Prompt Injection Risks: Autonomous AI agents are highly susceptible to prompt injection attacks, where malicious inputs manipulate the agent’s behavior. This is especially dangerous for agents with access to APIs (e.g., Gmail), as attackers can exfiltrate data or perform unauthorized actions.
Lack of Approval Controls: The absence of mandatory human oversight for critical actions (e.g., sending emails with sensitive data) allows malicious instructions to execute unchecked.
Insufficient Input Validation: The agent’s LLM failed to sanitize or filter malicious instructions embedded in email content, a common issue in AI systems that process untrusted inputs.
Credit System Weakness: The ability to exceed credit limits suggests inadequate real-time enforcement, which could lead to resource exhaustion or financial implications for users.
These vulnerabilities align with broader concerns about AI agent security, as highlighted in recent research. For example, Trend Micro’s analysis of multi-modal AI agents notes that hidden instructions in external inputs (like emails) can trigger data exfiltration without user interaction. Similarly, studies on autonomous agents emphasize the risks of prompt injection and tool misuse in systems with API access.
Mitigation Recommendations
To secure Zapier Agents and prevent such attacks, organisations and developers should consider the following:
Implement Approval Controls: Introduce mandatory human approval for sensitive actions (e.g., sending emails with attachments or forwarding data to external addresses). This could be a configurable option in Zapier's workflow settings.
Enhance Input Validation: Deploy robust input sanitization to detect and block malicious instructions in emails, documents, or other external inputs. LLMs should be trained to recognize and ignore untrusted commands.
Real-Time Credit Enforcement: Strengthen credit limit checks to halt agent operations immediately upon exceeding allocated quotas, preventing abuse.
Audit and Monitor Actions: Enhance audit logs to flag suspicious actions (e.g., emails sent to unrecognized addresses or deletions triggered by external instructions). Real-time monitoring tools can help detect abnormal behaviors and provide continuous oversight of AI agent activities using platforms like ARGUS which offers AI Runtime Security that stops malicious prompts, jailbreaks, and harmful outputs in under 100ms, integrating natively with your AI stack to defend against threats across text, images, and voice modalities.
Adopt Defense-in-Depth: Use purpose-built security solutions for AI agents, such as Repello AI's comprehensive protection suite. Their ARTEMIS platform provides continuous risk assessment through automated red teaming of AI models for vulnerabilities like prompt injection and jailbreaking, delivering risk scores and recommendations based on constantly updated threat databases. Meanwhile,
Responsible Disclosure
We disclosed this vulnerability to Zapier’s security team via their designated reporting channel (security@zapier.com
) and HackerOne program, adhering to responsible disclosure principles. We delayed public disclosure to allow Zapier time to investigate and remediate.
TL;DR
Zapier Agents offer powerful automation capabilities, but their autonomy and integration with sensitive systems like Gmail make them attractive targets for attackers. Widely adopted by enterprises for critical business workflows, Zapier's extensive reach amplifies the potential impact of security vulnerabilities. This demonstration of a data exfiltration attack via prompt injection and credit limit bypass underscores the need for robust security controls in AI-driven automation. By implementing approval mechanisms, input validation, and real-time monitoring, Zapier and its users can mitigate these risks and ensure secure, compliant workflows.
AI models don't need to be compromised for attackers to succeed, they just need to find the right entry point. As demonstrated with the XPIA email attack, a single malicious message can turn trusted automation into a data exfiltration tool, silently operating under the guise of legitimate workflow processes.
At Repello AI, we're committed to staying ahead of these threats. Our research doesn't just identify vulnerabilities; it shapes the future of AI security. Through our AI Security platforms ARTEMIS and ARGUS, we're helping organisations navigate this new landscape safely and confidently.
We'll be presenting our latest findings at BlackHat 2025 - book a meeting to discuss this research and enterprise AI security solutions: https://repello.ai/black-hat-2025.
For other technical inquiries about this research or to discuss enterprise AI security solutions, contact: contact@repello.ai.

You might also like

8 The Green, Ste A
Dover, DE 19901, United States of America

8 The Green, Ste A
Dover, DE 19901, United States of America

8 The Green, Ste A
Dover, DE 19901, United States of America