LangChain GmailToolkit indirect prompt injection -> code execution
Date: 2025-04
Affected: langchain-community GmailToolkit 0.3.51
Attack vector: prompt-injection
Category: real-world
Severity: Critical
CVE: CVE-2025-46059
CWE: CWE-94
CVSS: 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

Indirect prompt-injection vulnerability in LangChain's GmailToolkit component v0.3.51. Attackers send emails with hidden/obfuscated instructions that bypass sanitization; when the GmailToolkit ingests the email, the embedded instructions can be executed as code in the agent environment.


Mitigations:

Architectural layers (MAESTRO):