Improper Neutralization of Special Elements Used in a Template Engine The advisory has been revoked - it doesn't affect any version of package redhat-user-workloads/lightspeed-service  (opens in a new tab)


Threat Intelligence

EPSS
0.27% (20th 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-RHEL10-REDHATUSERWORKLOADSLIGHTSPEEDSERVICE-16063970
  • published15 Apr 2026
  • disclosed9 Apr 2026

Introduced: 9 Apr 2026

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

Amendment

The Red Hat security team deemed this advisory irrelevant for RHEL:10.

NVD Description

Note: Versions mentioned in the description apply only to the upstream redhat-user-workloads/lightspeed-service package and not the redhat-user-workloads/lightspeed-service package as distributed by RHEL.

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.