CVE-2025-65106
HIGH 8.3CVSS 4.0LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates
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.
- Published
- 21 Nov 2025
- Last modified
- 19 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-1336
- Also known as
- GHSA-6qv9-48xg-fc7fPYSEC-2026-1518
- Sources
- NVDJSONOSV GHSA-6qv9-48xg-fc7fJSONOSV PYSEC-2026-1518JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | HIGH 8.3 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 | |
| OSV | PyPA | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | langchain-core | >= 1.0.0, < 1.0.7 | 1.0.7 |
| OSV | PyPI | langchain-core | < 0.3.80 | 0.3.80 |
| OSV | PyPI | langchain-core | < 0.3.80; >= 1.0.0, < 1.0.7 | 0.3.80, 1.0.7 |
References
- https://github.com/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a · WEB
- https://github.com/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00 · WEB
- https://github.com/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-65106 · ADVISORY
- https://github.com/langchain-ai/langchain · PACKAGE
- https://pypi.org/project/langchain-core · PACKAGE
- https://github.com/advisories/GHSA-6qv9-48xg-fc7f · ADVISORY
History
- 25 Nov 2026 20:59 UTC · NVD: first stored (published 21 Nov 2025)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 20 Nov 2025)