Advisory record · GHSA-926x-3r5x-gfhw

LangChain has incomplete f-string validation in prompt templates

CVSS 5.3 MediumEPSS 0.0027 · 19th percentile

Published by the GitHub Advisory Database at 8 Apr 2026, 21:51 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
langchain-corePyPI<0.3.84 || >=1.0.0a1, <1.2.280.3.84, 1.2.28
Identifiers
GHSA-926x-3r5x-gfhw · CVE-2026-40087 · PYSEC-2026-2563
Weakness (CWE)
CWE-20 · CWE-1336
Published
8 Apr 2026
Updated
10 Sept 2026

Machine-written summary

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

Affected versions of langchain-core are those below 0.3.84 and those from 1.0.0a1 up to (not including) 1.2.28. Attackers who can supply the template string itself, not just variable values, can get some prompt template classes, including DictPromptTemplate and ImagePromptTemplate, to evaluate attribute access or indexing expressions during formatting, which may expose internal object data if richer Python objects are passed in. Upgrade to langchain-core 0.3.84 or 1.2.28. Applications that use hardcoded templates or accept only variable values are not affected.

Written 1 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
5.3 Medium 3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N CNA (GitHub_M)
  • CISA KEV Not listed.
  • EPSS 0.0027, the 19th percentile, on 14 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 8 Apr 2026, 19:29 UTC Published by the maintainers as a GitHub repository advisory
  2. 31 Oct 2026, 14:11 UTC First seen by agentprime
  3. 31 Oct 2026, 14:11 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.