Skip to main content
VulnerabilityPublished Updated

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

Affects langchain-coreSource GCVE Database

0
Compare
Authoritative record:CVE-2025-65106· High 8.3

Not known to be exploited · CVSS 8.3 High : upgrade to 1.0.7 soon.

Data as of 27 Nov 2026, 04:51 UTC

CVSS 4.0 base score
8.3High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 4.08.3
Patch
Available – fixed in 1.0.7, 0.3.80
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 21 Nov 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Nov 2026.

What to do

Upgrade langchain-core to 1.0.7; langchain-core to 0.3.80.

Affected software

ProductAffectedFixed in
PyPIlangchain-coreAffected
  • >=1.0.0 <1.0.7
Fixed in
  • 1.0.7
PyPIlangchain-coreAffected
  • <0.3.80
Fixed in
  • 0.3.80

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in langchain-core versions 1.0.7 and 0.3.80. Users should upgrade to these or later versions to remediate the vulnerability. The vendor has also applied defensive hardening to Mustache and Jinja2 template formats to restrict attribute access. Applications should avoid accepting untrusted template strings and prefer hardcoded templates or validated inputs.

Description

A template injection vulnerability in LangChain's prompt template system allows attackers who control template strings to access Python object internals via attribute traversal. This affects the langchain-core package versions prior to 1.0.7 and 0.3.80. The vulnerability involves f-string, Mustache, and Jinja2 template formats, enabling access to sensitive data such as environment variables when untrusted template strings are used. The issue is fixed in versions 1.0.7 and 0.3.80.

References

Community reviews

Loading reviews…