CVE-2025-65106
BaseFortify
Publication date: 2025-11-21
Last updated on: 2025-11-21
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| langchain | langchain | * |
Helpful Resources
Exploitability
| 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.