Predictive Vulnerability Intelligence.

Product

  • Product
  • Pricing
  • Documentation

Company

  • About
  • Partnerships
  • Blog
  • Support

Legal

  • Terms
  • Privacy
  • Data Licensing

© 2026 FAUCET Technologies LLC. All rights reserved.

CVE-2026-40087

19
FAUCET Score

OVERVIEW CVE-2026-40087 affects LangChain, a popular framework for building AI agents and large language model-powered applications. The vulnerability stems from incomplete validation of f-string prompt templates in multiple template classes. Specifically, DictPromptTemplate and ImagePromptTemplate fail to enforce the same attribute-access restrictions as the base PromptTemplate class, and the validation logic does not properly detect nested replacement fields within format specifiers. This allows attackers to inject attribute access or indexing expressions that are evaluated during template formatting. The vulnerability impacts LangChain versions prior to 0.3.84 and 1.2.28. SEVERITY The vulnerability carries a CVSS 3.1 score of 5.3 (Medium), with a network-based attack vector requiring no special privileges or user interaction. The attack complexity is low, meaning exploitation requires minimal effort. The impact is limited to confidentiality, as the vulnerability enables information disclosure through unauthorized attribute access, while integrity and availability remain unaffected. The EPSS score of 0.0005 indicates this vulnerability has a lower probability of exploitation compared to the broader CVE landscape, though the 32.0/100 FAUCET risk score suggests some operational concern. EXPLOITATION STATUS There is no current evidence of active exploitation. The vulnerability is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog and is marked as inactive on threat intelligence platforms. No publicly available exploit code has been disclosed, and community attention remains minimal, suggesting responsible disclosure practices are being followed.

Impacted Technologies

VendorProductVersion(s)CPE
< 0.3.84CPE matchmatch criteria
cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:*
>= 1.0.0, < 1.2.28CPE matchmatch criteria
cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:*

CVSS Data

CVSS version used by this source: 3.1

5.3MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
LOW
Integrity Impact
NONE
Availability Impact
NONE
Exploitability Score
3.9
Impact Score
1.4
CvssVersion
3.1

Exploit Intelligence

EPSS Score
0.26%
Probability of exploitation in next 30 days
EPSS Percentile
17.9%
Percentile rank of EPSS score among Peer Group
As of 2026-07-28
Model: v2026.06.15
This CVE's current EPSS score of 0.0026 is in the 8th percentile among its peer group of 23,725 CVEs.

Social Chatter

The average CVE in this peer group has 0.0 Twitter, 0.0 Reddit, 0.1 Bluesky, 0.0 Mastodon, and 0.4 GitHub mentions.

Media Mentions

No media coverage found for this CVE.

The average CVE in this peer group has 0.0 InfoSec Media, 0.0 Vendor Blog, and 0.0 Security Researcher mentions.

Remediation

Patch Available

Vendor Patches (2)

pippatch availablevia ghsa
Product: langchain-coreFixed in: 0.3.84
pippatch availablevia ghsa
Product: langchain-coreFixed in: 1.2.28

Vendor Advisories (1)

pipGHSA-926x-3r5x-gfhwmedium

LangChain has incomplete f-string validation in prompt templates

Apr 8, 2026

References

github.com / langchain-ai/langchain/commit/6bab0ba3c12328008ddca3e0d54ff5a6151cd27b
Patch
github.com / langchain-ai/langchain/commit/af2ed47c6f008cdd551f3c0d87db3774c8dfe258
Patch
github.com / langchain-ai/langchain/pull/36612
Issue TrackingPatch
github.com / langchain-ai/langchain/pull/36613
Issue TrackingPatch
github.com / langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.84
ProductRelease Notes
github.com / langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.28
ProductRelease Notes
github.com / langchain-ai/langchain/security/advisories/GHSA-926x-3r5x-gfhw
MitigationVendor Advisory