CVE-2025-65106
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-11-21

Last updated on: 2025-11-21

Assigner: GitHub, Inc.

Description
LangChain is a framework for building agents and LLM-powered applications. From versions 0.3.79 and prior and 1.0.0 to 1.0.6, a template injection vulnerability exists in LangChain's prompt template system that allows attackers to access Python object internals through template syntax. This vulnerability affects applications that accept untrusted template strings (not just template variables) in ChatPromptTemplate and related prompt template classes. This issue has been patched in versions 0.3.80 and 1.0.7.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-11-21
Last Modified
2025-11-21
Generated
2026-05-07
AI Q&A
2025-11-22
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
langchain langchain *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1336 The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a template injection issue in LangChain's prompt template system. It allows attackers to exploit the template syntax to access Python object internals when untrusted template strings are accepted in ChatPromptTemplate and related classes. This means that if an application uses vulnerable versions of LangChain and accepts untrusted input as templates, an attacker can potentially execute unauthorized actions by injecting malicious template code.


How can this vulnerability impact me? :

The vulnerability can allow attackers to access internal Python objects, which may lead to unauthorized information disclosure or code execution within applications using vulnerable LangChain versions. This can compromise the security and integrity of the affected application and its data.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, immediately upgrade LangChain to version 0.3.80 or later, or 1.0.7 or later, where the template injection vulnerability has been patched. Additionally, avoid accepting untrusted template strings in ChatPromptTemplate and related prompt template classes.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart