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.
Published: 2026-10-08
Score: 6.5 Medium
EPSS: n/a
KEV: No
Impact: Privilege escalation via prompt injection
Action: Apply Patch
AI Analysis

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 not available 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.

Generated by OpenCVE AI on October 8, 2026 at 22:21 UTC.

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 8, 2026 at 22:21 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

Thu, 08 Oct 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Masci
Masci banks
Vendors & Products Masci
Masci banks

Thu, 08 Oct 2026 21:45:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-08T21:38:07.447Z

Reserved: 2026-10-08T17:21:52.975Z

Link: CVE-2026-107717

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-10-08T22:17:27.560

Modified: 2026-10-08T22:17:27.710

Link: CVE-2026-107717

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-08T22:30:18Z

Weaknesses
  • CWE-20

    Improper Input Validation