01 Record
CVE-2026-40087
LangChain has incomplete f-string validation in prompt templates
MediumPUBLISHEDCNA: GitHub_M
CNA base score5.3 CVSS v3.xCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
02 Description
LangChain has incomplete f-string validation in prompt templates
03 Exploitation and scoring
- Exploitation
- Assessed, none found. CISA's assessment recorded neither public exploit code nor evidence of exploitation when it was made.
- SSVC decision
- ExploitationnoneCISA recorded no public exploit code and no evidence of exploitation.
- AutomatableyesAn attacker can reliably automate reconnaissance through exploitation, so this scales.
- Technical ImpactpartialSuccessful exploitation gives limited control of the vulnerable component.
- EPSS probability
- 0.26% probability of exploitation activity in the next 30 days.
- EPSS percentile
- Equal to or higher than the score of 17.7% of scored records. A rank, not a probability.
- NVD base score
- 5.3 (CVSS v3.x), scored by the NVD independently of the CNA.
- NVD CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- NVD analysis status
- Analyzed. NVD last modified this record on 2026-10-25.
- Red Hat severity
- Moderate. Red Hat's rating for its own products, not a CVSS rating.
Exploit-prediction scores from FIRST. Independent scoring and analysis status from the NVD. Vendor severity from Red Hat. Exploitation assessment and catalog membership from CISA.
04 Metadata
- Published
- 2026-04-09 19:34Z6 MO AGO
- Last updated
- 2026-04-14 14:48Z6 MO AGO
- Reserved
- 2026-04-09
- Assigning CNA
- GitHub_M
- Record state
- PUBLISHED
- Severity
- Medium (CVSS 5.3)
- CNA CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Weaknesses
- CWE-1336Improper Neutralization of Special Elements Used in a Template EngineBase
- Data version
- 5.2
- Document digest
- e36342cbc1646af689113e397a6b217c257019f8603b415ced3c05ec521bc342
05 Affected products
VendorProductVersionsPlatforms
06 References
- github.comhttps://github.com/langchain-ai/langchain/security/advisories/GHSA-926x-3r5x-gfhw
- github.comhttps://github.com/langchain-ai/langchain/pull/36612
- github.comhttps://github.com/langchain-ai/langchain/pull/36613
- github.comhttps://github.com/langchain-ai/langchain/commit/6bab0ba3c12328008ddca3e0d54ff5a6151cd27b
- github.comhttps://github.com/langchain-ai/langchain/commit/af2ed47c6f008cdd551f3c0d87db3774c8dfe258
- github.comhttps://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.84
- github.comhttps://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.28