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

- Severity: High 8.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Published: 2025-11-20T17:42:12.000Z
- Modified: 2026-10-19T13:10:00.110Z
- Also known as: GHSA-6qv9-48xg-fc7f, PYSEC-2026-1518
- Weaknesses: CWE-1336
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- langchain-ai langchain: >= 1.0.0, < 1.0.7; < 0.3.80
- langchain-core (PyPI): from 1.0.0 before 1.0.7; before 0.3.80

## Every score

- GitHub_M: CVSS:4.0 8.3 High `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`
- GitHub: CVSS:4.0 High `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`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f> (web)
- <https://github.com/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a> (web)
- <https://github.com/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-65106> (advisory)
- <https://github.com/langchain-ai/langchain> (package)
- <https://pypi.org/project/langchain-core> (package)
- <https://github.com/advisories/GHSA-6qv9-48xg-fc7f> (advisory)

## Sources

- CVE List: [CVE-2025-65106](https://www.cve.org/CVERecord?id=CVE-2025-65106), CVE Terms of Use, modified 2025-11-21
- GitHub Advisory Database: [GHSA-6qv9-48xg-fc7f](https://github.com/advisories/GHSA-6qv9-48xg-fc7f), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-65106](https://nvd.nist.gov/vuln/detail/CVE-2025-65106), Public domain, modified 2026-10-19
- PyPA Advisory Database: [PYSEC-2026-1518](https://osv.dev/vulnerability/PYSEC-2026-1518), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-65106 · Whole record: https://cve.day/CVE-2025-65106.json · Rebuilt by cve.day 2026-11-25T22:59:07.930Z
