CVE-2025-65106 json
LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates
published 2025-11-20 11 mo ago modified 2026-10-19 21 d ago also EUVD-2025-198318 , GHSA-6qv9-48xg-fc7f , PYSEC-2026-1518
- cvss
- 8.3
- version 4.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 44%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi langchain-core 0.3.80, 1.0.7
- langchain langchain_core 0.3.80, 1.0.7
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-65106 updated cvss 8.2
langchain-core: LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates
-
Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-service-api-rhel9 Red Hat Ansible Automation Platform 2 ansible-automation-platform-24/lightspeed-rhel8, ansible-automation-platform-25/lightspeed-rhel8, ansible-automation-platform-26/lightspeed-rhel9, ansible-automation-platform-25/lightspeed-chatbot-rhel8affected: workaround, no fix available “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.”
-
Red Hat Enterprise Linux AI (RHEL AI) rhelai1/bootc-amd-rhel9, rhelai1/bootc-intel-rhel9, rhelai1/bootc-nvidia-rhel9, rhelai1/bootc-azure-amd-rhel9, rhelai1/instructlab-amd-rhel9, rhelai1/bootc-aws-nvidia-rhel9, +4 more Red Hat OpenShift AI (RHOAI) rhoai/odh-llama-stack-core-rhel9affected: workaround, no fix planned “No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.”
-
Red Hat Ansible Automation Platform 2 ansible-automation-platform/ee-minimal-rhel8, ansible-automation-platform/ee-minimal-rhel9, ansible-automation-platform-26/mcp-tools-rhel9, ansible-automation-platform-24/de-minimal-rhel8, ansible-automation-platform-24/de-minimal-rhel9, ansible-automation-platform-24/ee-minimal-rhel8, +26 morenot affected: vulnerable code not present
-
Red Hat OpenShift AI (RHOAI) rhoai/odh-trustyai-ragas-lls-provider-dsp-rhel9not affected: component not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 11 mo ago
Exploit prediction
0.52% chance of exploitation in the next 30 days, higher than 44% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 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 |
| CNA | 4.0 | 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 |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | langchain-core | >=1.0.0, <1.0.7 <0.3.80 |
1.0.7 0.3.80 |
Affected products
- langchain-ai langchain
Classification
- Weakness
-
- CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine
References
-
github.com
/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a
web
-
github.com
/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00
web
-
github.com
/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f
web
-
nvd.nist.gov
/vuln/detail/CVE-2025-65106
advisory
-
github.com
/langchain-ai/langchain
package
-
pypi.org
/project/langchain-core
package
-
github.com
/advisories/GHSA-6qv9-48xg-fc7f
advisory
Sources
- CVE List CVE-2025-65106
- GitHub Advisory GHSA-6qv9-48xg-fc7f
- NVD CVE-2025-65106
- OSV PYSEC-2026-1518
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.