CVE Explorer
CVE-2025-65106
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.8
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"langchain","vendor":"langchain-ai","versions":[{"status":"affected","version":">= 1.0.0, < 1.0.7"},{"status":"affected","version":"< 0.3.80"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:3c854f9e7ef959d2c253fdcbe22d1692483446a99d384ddbe141d5031e02ddd1 · sha256:67b5dc88a2e4b134… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":8.3,"baseSeverity":"HIGH","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"LOW"},"metric_type":"cvssV4_0"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:3c854f9e7ef959d2c253fdcbe22d1692483446a99d384ddbe141d5031e02ddd1 · sha256:67b5dc88a2e4b134… · /containers/cna/metrics/0/cvssV4_0
CWE assertions
1 source assertion{"cweId":"CWE-1336","description":"CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:3c854f9e7ef959d2c253fdcbe22d1692483446a99d384ddbe141d5031e02ddd1 · sha256:67b5dc88a2e4b134… · /containers/cna/problemTypes/0/descriptions/0
Source references
3 source assertions{"name":"https://github.com/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a","tags":["x_refsource_MISC"],"url":"https://github.com/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:3c854f9e7ef959d2c253fdcbe22d1692483446a99d384ddbe141d5031e02ddd1 · sha256:67b5dc88a2e4b134… · /containers/cna/references/1
{"name":"https://github.com/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00","tags":["x_refsource_MISC"],"url":"https://github.com/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:3c854f9e7ef959d2c253fdcbe22d1692483446a99d384ddbe141d5031e02ddd1 · sha256:67b5dc88a2e4b134… · /containers/cna/references/2
{"name":"https://github.com/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f","tags":["x_refsource_CONFIRM"],"url":"https://github.com/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:3c854f9e7ef959d2c253fdcbe22d1692483446a99d384ddbe141d5031e02ddd1 · sha256:67b5dc88a2e4b134… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.