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.
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
| Score | Rating | CVSS | Vector | Source |
|---|---|---|---|---|
| 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
- 8 Apr 2026, 19:29 UTC Published by the maintainers as a GitHub repository advisory
- 31 Oct 2026, 14:11 UTC First seen by agentprime
- 31 Oct 2026, 14:11 UTC Confirmed by OSV
Sources
- GitHub Advisory Database: GHSA-926x-3r5x-gfhw
- OSV: GHSA-926x-3r5x-gfhw
- github.com/langchain-ai/langchain/security/advisories/GHSA-926x-3r5x-gfhw
- nvd.nist.gov/vuln/detail/CVE-2026-40087
- github.com/langchain-ai/langchain/pull/36612
- github.com/langchain-ai/langchain/pull/36613
- github.com/langchain-ai/langchain/commit/6bab0ba3c12328008ddca3e0d54ff5a6151cd27b
- github.com/langchain-ai/langchain/commit/af2ed47c6f008cdd551f3c0d87db3774c8dfe258
- github.com/langchain-ai/langchain
- github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.84
- github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.28