CVE-2025-65106: Langchain core · LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates
Affects langchain-coreSource GCVE Database
Not known to be exploited · CVSS 8.3 High : upgrade to 1.0.7 soon.
Data as of 27 Nov 2026, 04:51 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 4.0 | 8.3 |
|---|
- Patch
- Available – fixed in 1.0.7, 0.3.80
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 21 Nov 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Nov 2026.
What to do
Upgrade langchain-core to 1.0.7; langchain-core to 0.3.80.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIlangchain-core | Affected
| Fixed in
|
| PyPIlangchain-core | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in langchain-core versions 1.0.7 and 0.3.80. Users should upgrade to these or later versions to remediate the vulnerability. The vendor has also applied defensive hardening to Mustache and Jinja2 template formats to restrict attribute access. Applications should avoid accepting untrusted template strings and prefer hardcoded templates or validated inputs.
Description
A template injection vulnerability in LangChain's prompt template system allows attackers who control template strings to access Python object internals via attribute traversal. This affects the langchain-core package versions prior to 1.0.7 and 0.3.80. The vulnerability involves f-string, Mustache, and Jinja2 template formats, enabling access to sensitive data such as environment variables when untrusted template strings are used. The issue is fixed in versions 1.0.7 and 0.3.80.
References
- github.com/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-65106 (opens in a new tab)
- github.com/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a (opens in a new tab)
- github.com/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00 (opens in a new tab)
- github.com/langchain-ai/langchain (opens in a new tab)