CVE-2026-40087: LangChain incomplete f-string validation in prompt templates
Attack on AI2 Disclosed vulnerabilityInfrastructure vulnerability
LangChain exhibited incomplete prompt template validation where certain classes permitted attribute access or indexing expressions during formatting. This could allow unintended data evaluation within prompt templates.
disclosed CVENo confirmed exploitation, so this record is tracked as a disclosed vulnerability and not counted as an incident. It moves into the counts if CISA or the vendor confirms exploitation. Why
Details
- type
- Attack on AIAn AI model, agent or AI-powered product was the thing exploited, abused or leaked.
- categories
- Infrastructure vulnerabilityCVEs and advisories in AI frameworks, inference servers, MCP servers, AI developer tools and hosting stacks.
- Infrastructure vulnerability
- owasp llm top 10
- mitre atlas
- no technique for these categoriesBoth rows are derived from the type and categories (OWASP 2025 edition, ATLAS release 2026.09), not classified per record. How
- severity
- 2 · Disclosed vulnerabilityCVE or vendor advisory, patched or patchable, no confirmed exploitation.
- targets
- Framework / tooling
- products
- LangChain
- incident date
- 8 Apr 2026
- first reported
- 8 Apr 2026
- origin
- GitHub Advisory DatabaseVulnerability record from NVD / the GitHub Advisory Database. This product uses the NVD API but is not endorsed or certified by the NVD.
- classifier confidence
- 0.95 · published at or above 0.80; see the methodology
- tags
- CVE-2026-40087 · prompt-template
- record
- created 2026-10-18 07:00Z · updated 2026-10-18 10:04Z · json
Sources · 2
- 2026-04-08CVE-2026-40087: LangChain has incomplete f-string validation in prompt templatesGitHub Advisory Database · github.com/advisories/GHSA-926x-3r5x-gfhw
- 2026-04-09CVE-2026-40087: LangChain is a framework for building agents and LLM-powered applications.NVD · nvd.nist.gov/vuln/detail/CVE-2026-40087
Titles and links belong to their publishers. The summary above is written by GCD AI RADAR in its own words; data is CC BY-SA 4.0.
Related incidents
- 2026-05-08CVE-2026-44843: LangChain vulnerable to unsafe deserialization2 Disclosedon AIInfra vulnSupply chain2 src
- 2026-04-24LangChain langchain-openai TOCTOU DNS rebinding vulnerability2 Disclosedon AIInfra vuln1 src
- 2026-04-24LangChain URL validation SSRF vulnerability in HTMLHeaderTextSplitter2 Disclosedon AIInfra vuln1 src
- 2026-03-31RCE Vulnerabilities in LLM-Integrated Applications via Prompt Injection1 Researchon AIPrompt inj.Infra vuln3 src
- 2026-03-27CVE-2026-34070: LangChain Core Has Path Traversal Vulnerabilities in load_prompt2 Disclosedon AIInfra vuln2 src
- 2026-08-20CVE-2026-72848: LangChain SitemapLoader vulnerable to unrestricted sitemap scraping2 Disclosedon AIInfra vuln1 src