# CVE-2025-65106: LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates

- Priority: **Prioritise**
- Reason: Severe, CVSS 8.3 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability: affected before 0.3.80, 1.0.7 (CNA); fix release not confirmed
- Status: published
- Published: 2025-11-21 · Modified: 2025-11-21
- Aliases: GHSA-6qv9-48xg-fc7f, PYSEC-2026-1518, CGA-2g3h-j5p4-hmq5, CGA-4x9w-62m7-gg6c, CGA-67j5-q64c-rxrh, CGA-xxwf-h5gx-4pgc
- Record: https://cvemate.com/vulnerability/CVE-2025-65106 · JSON: https://cvemate.com/vulnerability/CVE-2025-65106/json

## Description

```text
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.
```

## Signals

- CVSS: 8.3 high (v4.0, CVE.org) 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
- EPSS: 0.528%, percentile 46.222%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard open-webui (Chainguard): \< 0.6.37-r0
- chainguard open-webui-compat (Chainguard): \< 0.6.37-r0
- wolfi open-webui (Wolfi): \< 0.6.37-r0
- wolfi open-webui-compat (Wolfi): \< 0.6.37-r0
- langchain-ai langchain: ≥ 1.0.0, \< 1.0.7 \| \< 0.3.80
- PyPI langchain-core (PyPI): \< 0.3.80 \| ≥ 1.0.0, \< 1.0.7

## References

- <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://nvd.nist.gov/vuln/detail/CVE-2025-65106>
- <https://github.com/langchain-ai/langchain>
- <https://pypi.org/project/langchain-core>
- <https://github.com/advisories/GHSA-6qv9-48xg-fc7f>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/65xxx/CVE-2025-65106.json>

---

Data as of 2026-12-05T12:51:56.871Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
