CVE-2025-46059

langchain-ai v0.3.51 was discovered to contain an indirect prompt injection vulnerability in the GmailToolkit component

Critical · published July 29, 2025

CVSS v3.1
9.8
EPSS
1%
Percentile
55.5
In the wild
Unconfirmed
What it is

🔥 A sneaky indirect prompt injection vulnerability lurks in langchain-ai v0.3.51's GmailToolkit component, waiting for just the right crafted email to unleash chaos! Think of it like a delivery service that accepts any package without checking the contents. An attacker could send an email containing malicious commands, and the application would execute them without any verification — like bringing a mystery package right into the heart of your operation! This vulnerability could lead to absolute devastation! An attacker could execute arbitrary code, compromising the entire application and potentially gaining complete control over sensitive data. Imagine a hostile takeover happening through your email — that’s how dire it is!

Put simply

Think of it like a delivery service that accepts any package without checking the contents. An attacker could send an email containing malicious commands, and the application would execute them without any verification — like bringing a mystery package right into the heart of your operation! The indirect prompt injection vulnerability allows attackers to execute arbitrary code via a crafted email message, essentially abusing the application's reliance on user-written code that fails to adhere to LangChain's security guidelines.

What to do

This vulnerability could lead to absolute devastation! An attacker could execute arbitrary code, compromising the entire application and potentially gaining complete control over sensitive data. Imagine a hostile takeover happening through your email — that’s how dire it is! Immediately update to the latest version of langchain-ai if available. Review your application’s email handling code to ensure it aligns with security best practices and implement strict input validation. Stay vigilant and conduct regular security audits! You've got this! Follow these steps, and you'll reinforce your defenses in no time. 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00781 · 55.5th percentile
Published
2025-07-29T00:00Z
EPSS history
Timeline
  • 29 JUL 00:00Z
    langchain-ai v0.3.51 was discovered to contain an indirect prompt injection vulnerability in the GmailToolkit component
    cvelistv5