Improper Neutralization of Special Elements Used in a Template Engine Affecting open-webui package, versions <0.8.12-r3


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.05% (16th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-CHAINGUARDLATEST-OPENWEBUI-16078105
  • published16 Apr 2026
  • disclosed9 Apr 2026

Introduced: 9 Apr 2026

NewCVE-2026-40087  (opens in a new tab)
CWE-1336  (opens in a new tab)

How to fix?

Upgrade Chainguard open-webui to version 0.8.12-r3 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream open-webui package and not the open-webui package as distributed by Chainguard. See How to fix? for Chainguard relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1