Advisory record · GHSA-6qv9-48xg-fc7f

LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates

CVSS 8.3 HighEPSS 0.0052 · 45th percentile

Published by the GitHub Advisory Database at 20 Nov 2025, 17:42 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
langchain-corePyPI>=1.0.0, <1.0.7 || <0.3.801.0.7, 0.3.80
Identifiers
GHSA-6qv9-48xg-fc7f · CVE-2025-65106 · PYSEC-2026-1518
Weakness (CWE)
CWE-1336
Published
20 Nov 2025
Updated
10 Sept 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

The langchain-core package versions before 0.3.80 and from 1.0.0 before 1.0.7 are affected by a template injection flaw in prompt templates. An attacker who can supply untrusted template strings, not just template variables, can use attribute access and indexing to reach Python object internals, such as environment variables via MessagesPlaceholder with chat message objects. Upgrade langchain-core to 0.3.80 or 1.0.7. The source gives few details on the Jinja2 hardening beyond the fixed versions.

Written 5 Nov 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
8.3 High 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 CNA (GitHub_M)
  • CISA KEV Not listed.
  • EPSS 0.0052, the 45th percentile, on 15 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 19 Nov 2025, 22:33 UTC Published by the maintainers as a GitHub repository advisory
  2. 31 Oct 2026, 14:34 UTC First seen by agentprime
  3. 31 Oct 2026, 14:34 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.