LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · Low · None
- Fix status
- Partial Red Hat: 4 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-1336.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| langchain-ai | langchain | 1.0.0 to before 1.0.7; before 0.3.80 | 1.0.7, 0.3.80 | Patch available | CNA |
| — | langchain-core (PyPI) | 1.0.0 to before 1.0.7 | 1.0.7 | Patch available | GHSA-6qv9-48xg-fc7f |
| — | langchain-core (PyPI) | before 0.3.80 | 0.3.80 | Patch available | GHSA-6qv9-48xg-fc7f |
- langchain Vendorlangchain-ai Affected 1.0.0 to before 1.0.7; before 0.3.80 Fixed in 1.0.7, 0.3.80 Patch available CNA
- langchain-core (PyPI) Vendor— Affected 1.0.0 to before 1.0.7 Fixed in 1.0.7 Patch available GHSA-6qv9-48xg-fc7f
- langchain-core (PyPI) Vendor— Affected before 0.3.80 Fixed in 0.3.80 Patch available GHSA-6qv9-48xg-fc7f
Remediation
- Fix · CNA langchain (langchain-ai) Fixed in 1.0.7, 0.3.80
- Fix · GHSA-6qv9-48xg-fc7f langchain-core (PyPI) Fixed in 1.0.7 Advisory →
- Fix · GHSA-6qv9-48xg-fc7f langchain-core (PyPI) Fixed in 0.3.80 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| OpenShift Lightspeed | Affected | No fix yet |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet |
| Red Hat Enterprise Linux AI (RHEL AI) | Affected | No fix planned: Will not fix |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix planned: Will not fix |
Not affected: 2 products
- Red Hat Ansible Automation Platform 2
- Red Hat OpenShift AI (RHOAI)
Timeline
- 2026-10-02 Threatist record created from CVE-2025-65106
- 2026-10-03 Alias added: GHSA-6qv9-48xg-fc7f
References
Other 4
- https://github.com/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f
- https://github.com/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a
- https://github.com/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00
- https://github.com/langchain-ai/langchain
More langchain-ai vulnerabilities
- TI-2024-31340 langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain… CVSS 3.1CRITICAL 9.8
- TI-2023-20724 An issue in langchain langchain-ai v.0.0.232 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
- TI-2023-20706 An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary… CVSS 3.1CRITICAL 9.8
- TI-2023-20166 An issue in Harrison Chase langchain v.0.0.194 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
- TI-2023-20136 An issue in LangChain v.0.0.231 allows a remote attacker to execute arbitrary code via the prompt parameter. CVSS 3.1CRITICAL 9.8
- TI-2023-18185 An issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via a… CVSS 3.1CRITICAL 9.8
Sources
- CVE-2025-65106 · CVE Program
- CVE-2025-65106 · NVD
- FIRST EPSS
- GHSA-6qv9-48xg-fc7f · GitHub Advisory Database · CC BY 4.0
- CVE-2025-65106 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences