CVE-2025-65106
published high CVSS 4.0 · 8.3LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| langchain-ai | — | langchain>= 1.0.0, < 1.0.7 · < 0.3.80 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.3 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| langchain-ai | langchain | >= 1.0.0, < 1.0.7 (affected)< 0.3.80 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-1336 CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
References
3Provider assertions
2GitHub_M · cna
LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 028301c1a795e5fad6b2ff115e34f87088f5eddd455cb407b2da77a168d31378
- Ingested
- 23 Sep 2026, 08:56:20 UTC
- Source record
- Official CVE record