Katalog CVE

CVE-2026-40087

ŚrednieCVSS 5.3
Opublikowano: Zaktualizowano: Przetłumaczono: NVD NIST

Prawdopodobieństwo exploitacji (EPSS)

Niskie ryzyko
0.26%

Percentyl 18 - wyżej niż 18% wszystkich znanych CVE

Streszczenie

LangChain przed wersjami 0.3.84 i 1.2.28 ma niekompletną walidację szablonów f-string. Niektóre klasy szablonów (DictPromptTemplate, ImagePromptTemplate) formatowały szablony bez wymuszania walidacji dostępu do atrybutów, a walidacja oparta na nazwach pól nie odrzucała zagnieżdżonych pól w specyfikatorach formatu, co mogło prowadzić do ewaluacji wyrażeń w czasie formatowania.

Ocena ryzyka

Może to pozwolić na wykonanie nieautoryzowanych wyrażeń Pythona w kontekście aplikacji, potencjalnie prowadząc do wycieku danych lub dalszych ataków. Ryzyko dotyczy aplikacji wykorzystujących podatne klasy szablonów LangChain.

Rekomendacja

Zaktualizuj LangChain do wersji 0.3.84 lub 1.2.28 (lub nowszej). Przejrzyj aplikacje pod kątem użycia DictPromptTemplate i ImagePromptTemplate z niezaufanymi szablonami.

Inne podatności w LangChain

Zobacz wszystkie
Oryginalny opis (angielski, źródło NVD)

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.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS