CVE-2026-107717

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

Published Oct 8, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Banks builds LLM prompts from a template language. In versions before 2.5.0, the Prompt.chat_messages() method parses every line of the rendered output as a JSON ChatMessage. If an attacker supplies untrusted data that is rendered into the prompt, the attacker can craft JSON that is interpreted as a system, assistant, or tool message because the ChatMessage.role field accepts any string. This allows the attacker to override application instructions, alter the prompt structure, or confuse downstream tool handling, effectively manipulating the behavior of the LLM. The flaw is a classic input validation issue (CWE‑20) that can lead to privilege escalation within the AI workflow.

Affected Systems

Banks (masci) versions earlier than 2.5.0 are affected. The vulnerability exists in all environments where the application renders untrusted data into prompts that are then passed to an LLM provider.

Risk and Exploitability

The CVSS score is 6.5, indicating moderate severity. Exploitation requires the attacker to influence the data rendered into the prompt, which is often possible if the application accepts user input or external data. The EPSS score is < 1% and the vulnerability is not listed in CISA's KEV catalog. The likely attack vector is through untrusted input supplied to the Prompt.chat_messages() function, where the attacker can inject arbitrary JSON to create privileged messages.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Banks to version 2.5.0 or later, which fixes the parsing flaw.
  • Validate or sanitize any data rendered into prompts before passing it to Prompt.chat_messages() to prevent injection of malformed JSON.
  • Restrict the ChatMessage.role field to the permitted roles (system, assistant, user, tool) in any custom or legacy code that may still construct ChatMessage objects.

Generated by OpenCVE AI on October 17, 2026 at 09:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-hmq2-7hp6-7crh Banks: User-controlled prompt input can be parsed as privileged chat messages
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Masci
Masci banks
Vendors & Products Masci
Masci banks
Type Values Removed Values Added
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.
Title Banks: User-controlled prompt input can be parsed as privileged chat messages
Weaknesses CWE-20
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N'}

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-501

    Trust Boundary Violation

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 13, 2026, 4:16 PM
Reserved
Oct 8, 2026, 5:21 PM
Status
Deferred
Published
Oct 8, 2026, 10:17 PM
Modified
Oct 13, 2026, 5:17 PM
Severity
Moderate
Public date
Oct 8, 2026, 9:38 PM