CVE-2025-46059 Details
Description
langchain-ai v0.3.51 was discovered to contain an indirect prompt injection vulnerability in the GmailToolkit component. This vulnerability allows attackers to execute arbitrary code and compromise the application via a crafted email message. NOTE: this is disputed by the Supplier because the code-execution issue was introduced by user-written code that does not adhere to the LangChain security practices.
A remote indirect prompt injection vulnerability has been identified in the Langchain GmailToolkit component, specifically in version 0.3.51 and prior. This vulnerability allows attackers to execute arbitrary code by sending a crafted email that is processed by an email agent created with Langchain. The agent unconditionally executes commands derived from the email content, leading to unauthorized actions such as forwarding sensitive emails or sending phishing messages from the victim's account.
It is recommended to introduce an intent-verification module that audits the outputs of the language model and ensures that API calls align directly with the user's instructions. This could prevent the agent from executing commands based on untrusted email content.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 29, 2025CISA-ADP
Assessed Jul 29, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/Jr61-star/CVEs/blob/main/CVE-2025-46059.md | [email protected] | ExploitTechnical Analysis |
| https://github.com/langchain-ai/langchain-community/issues/217#issuecomment-3144824471 | [email protected] | |
| https://github.com/langchain-ai/langchain/issues/30833 | [email protected] | ExploitIssue TrackingTechnical DescriptionVendor |
| https://python.langchain.com/docs/security/ | [email protected] |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| langchain-ai/langchain | <v0.3.51 (semver) |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 4, 2025 | CVE Modified | [email protected] |
| Jul 29, 2025 | New CVE Received | [email protected] |
| Jul 29, 2025 | CVE Modified | CISA-ADP |
Volerion