Skip to main content
← All vulnerabilities
CVE-2025-65106GHSA-6QV9-48XG-FC7FPYSEC-2026-1518

LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.0.7, 0.3.80
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • langchain-ai langchain

    From 1.0.0 · fixed in 1.0.7; fixed in 0.3.80

  • langchain-corePyPI

    From 1.0.0 · fixed in 1.0.7

  • langchain-corePyPI

    fixed in 0.3.80

  • langchain-corePyPI

    fixed in 0.3.80; From 1.0.0 · fixed in 1.0.7

References 3

GitHub · langchain-ai/langchain