Template Injection Vulnerability in LangChain by LangChain AI
CVE-2025-65106
8.3HIGH
What is CVE-2025-65106?
LangChain, a framework designed for developing agents and applications powered by large language models (LLMs), has a template injection flaw within its prompt template system. This vulnerability affects versions 0.3.79 and earlier, as well as 1.0.0 through 1.0.6, enabling potential attackers to exploit untrusted template strings beyond mere variables. By leveraging this issue in ChatPromptTemplate and related classes, an adversary can gain unauthorized access to Python object internals, compromising the application's integrity. It's crucial for users to update to LangChain versions 0.3.80 or 1.0.7, where this vulnerability has been successfully patched.
Affected Version(s)
langchain >= 1.0.0, < 1.0.7 < 1.0.0, 1.0.7
langchain < 0.3.80 < 0.3.80
