Read the docs
TI-2025-40258 Aliases CVE-2025-65106GHSA-6qv9-48xg-fc7f

LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates

Priority LOW 37CWE-1336Published · Updated

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

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00524 44th percentileScored 2026-11-07
Fix Partial langchain (langchain-ai): 1.0.7, 0.3.80langchain-core (PyPI): 1.0.7, 0.3.80Red Hat: 4 without a fix

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

VendorProductAffected versionsFixed inStatusSource
langchain-ailangchain1.0.0 to before 1.0.7; before 0.3.801.0.7, 0.3.80Patch availableCNA
—langchain-core (PyPI)1.0.0 to before 1.0.71.0.7Patch availableGHSA-6qv9-48xg-fc7f
—langchain-core (PyPI)before 0.3.800.3.80Patch availableGHSA-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 →

ProductStatusPlan or fix
OpenShift LightspeedAffectedNo fix yet
Red Hat Ansible Automation Platform 2AffectedNo fix yet
Red Hat Enterprise Linux AI (RHEL AI)AffectedNo fix planned: Will not fix
Red Hat OpenShift AI (RHOAI)AffectedNo fix planned: Will not fix
Not affected: 2 products
  • Red Hat Ansible Automation Platform 2
  • Red Hat OpenShift AI (RHOAI)

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-65106
  2. 2026-10-03 Alias added: GHSA-6qv9-48xg-fc7f

References

  • 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
See all 75 →

Sources