Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') Affecting banks package, versions [,2.5.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.28% (19th 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-PYTHON-BANKS-20849383
  • published13 Oct 2026
  • disclosed8 Oct 2026
  • creditMuhammedali Aliyev

Introduced: 8 Oct 2026

NewCVE-2026-107717  (opens in a new tab)
CWE-74  (opens in a new tab)

How to fix?

Upgrade banks to version 2.5.0 or higher.

Overview

banks is an A prompt programming language

Affected versions of this package are vulnerable to Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') via Prompt.chat_messages(), which parsed every line of a rendered template as a possible ChatMessage without distinguishing between trusted template structure and untrusted template data. An attacker who controls data rendered into a prompt can inject JSON that is interpreted as a privileged system, assistant, or tool message. The same parsing path also affected CompletionExtension._body_to_messages(), where data could inject tool definitions, and chat_message_from_text(), where data could inject content blocks such as remote image URLs through the no-chat-block fallback.

CVSS Base Scores

version 4.0
version 3.1