Vulnerability · Published Oct 8, 2026 · Assigned by GitHub_M

CVE-2026-107717Banks: User-controlled prompt input can be parsed as privileged chat messages

Medium 6.5

In plain English

A medium-severity improper input validation in banks from masci. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 27% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.3%top 73.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

Banks generates meaningful LLM prompts using a simple template language. Prior to 2.5.0, Banks Prompt.chat_messages() attempts to parse every line of rendered template output as ChatMessage JSON. When an application renders untrusted data and passes the returned ChatMessage objects to an LLM provider, attacker-controlled JSON can cross the prompt boundary and become a system, assistant, or tool message because ChatMessage.role accepts arbitrary strings. This can override application instructions, alter the intended prompt structure, or confuse downstream tool and message handling. This issue is fixed in version 2.5.0.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIbanks2.5.0GHSA-hmq2-7hp6-7crh
PyPIbanks2.5.0PYSEC-2026-4202

Affected products (as reported)

VendorProductVersions
masci banks < 2.5.0

Weakness: CWE-20 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

References