GHSA-926x-3r5x-gfhw · 深刻度: medium · エコシステム: pip — LangChain has incomplete f-string validation in prompt templates
LangChain is a framework for building agents and LLM-powered applications. Prior to 0.3.84 and 1.2.28, LangChain's f-string prompt-template validation was incomplete in two respects. First, some prompt template classes accepted f-string templates and formatted them without enforcing the same attribute-access validation as PromptTemplate. In particular, DictPromptTemplate and ImagePromptTemplate could accept templates containing attribute access or indexing expressions and subsequently evaluate those expressions during formatting. Second, f-string validation based on parsed top-level field names did not reject nested replacement fields inside format specifiers. In this pattern, the nested replacement field appears in the format specifier rather than in the top-level field name. As a result, earlier validation based on parsed field names did not reject the template even though Python formatting would still attempt to resolve the nested expression at runtime. This vulnerability is fixed in 0.3.84 and 1.2.28.
総合評価: CVE-2026-40087 は低リスク(27.5/100)。CVSS 深刻度は中。悪用される可能性が高い(EPSS 0.26%、17 パーセンタイル) 推奨対応: 悪用情報と EPSS の推移を監視し、必要に応じて優先度を見直してください。
リスクは変動します。再評価に基づき、本ページの表示内容を更新しています。
EPSS は日次で悪用されやすさの相対度合いを推定します。パーセンタイルは採点済み CVE の中での相対位置(高いほど相対的に深刻)を示します。
| # | 日付 | 旧 EPSS スコア | 新 EPSS スコア | Δ(新 − 旧) |
|---|---|---|---|---|
| 1 | 2026-06-15 | 0.05% | 0.26% | +0.21% |
| 2 | 2026-04-17 | 0.04% | 0.05% | +0.01% |
| 3 | 2026-04-10 | — | 0.04% | — |
EPSS の全履歴 (全 3 件)
この CVE の CVSS 指標。
| ベーススコア | バージョン | 深刻度 | ベクトル | 悪用しやすさ | 影響 | スコアの出典 |
|---|---|---|---|---|---|---|
| 5.3 | 3.1 | MEDIUM |
|
3.9 | 1.4 | [email protected] |
GHSA-926x-3r5x-gfhw · 深刻度: medium · エコシステム: pip — LangChain has incomplete f-string validation in prompt templates
| vendor | priority | summary | link |
|---|---|---|---|
redhat
|
medium | — | https://access.redhat.com/security/cve/CVE-2026-40087 |
| ベンダー | 製品 | バージョン | 生の CPE |
|---|---|---|---|
| langchain | langchain_core | < 0.3.84 | cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:* |
| langchain | langchain_core | >= 1.0.0, < 1.2.28 | cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:* |
| URL | タグ |
|---|---|
| https://github.com/langchain-ai/langchain/commit/6bab0ba3c12328008ddca3e0d54ff5a6151cd27b | Patch |
| https://github.com/langchain-ai/langchain/commit/af2ed47c6f008cdd551f3c0d87db3774c8dfe258 | Patch |
| https://github.com/langchain-ai/langchain/pull/36612 | Issue Tracking Patch |
| https://github.com/langchain-ai/langchain/pull/36613 | Issue Tracking Patch |
| https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.84 | Product Release Notes |
| https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.28 | Product Release Notes |
| https://github.com/langchain-ai/langchain/security/advisories/GHSA-926x-3r5x-gfhw | Mitigation Vendor Advisory |