CVE-2026-107717

Description

A flaw was found in banks. When generating chat messages for Large Language Models (LLMs), the library attempts to parse every rendered template line as structured data without restricting message roles. A remote attacker can exploit this flaw by submitting crafted input that is interpreted as privileged system, assistant, or tool messages. Consequently, an attacker can bypass prompt boundaries, override application instructions, and manipulate downstream model behavior.

Statement

A MODERATE severity vulnerability was found in the banks Python library, which is used by Red Hat Lightspeed and Ansible lightspeed offerings to generate prompts for Large Language Models (LLMs). The banks library attempts to parse every line of rendered template output as ChatMessage JSON without restricting message roles. When an application renders attacker-controlled input through a banks template and passes the resulting messages to an LLM provider, a remote attacker requiring no privileges or user interaction can submit crafted JSON that crosses the prompt boundary and is interpreted as privileged system, assistant, or tool messages. This can override application instructions, alter the intended prompt structure, and manipulate downstream model behavior, impacting the confidentiality and integrity of the LLM-driven application. Red Hat rates this flaw as MODERATE with a CVSS 3.1 score of 6.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N), consistent with the upstream severity assessment.

The banks library as shipped in Lightspeed Core 0.6 and 0.7 (rag-tool containers), OpenShift Lightspeed 1 (lightspeed-ocp-rag container), Red Hat Ansible Automation Platform 2.5 (lightspeed-chatbot container), and Exploit Intelligence (vulnerability-analysis container) is affected. For the Lightspeed Core and OpenShift Lightspeed streams the fix is deferred because this is a moderate-severity flaw with a CVSS score below 7.0, for which Red Hat does not file trackers; the residual risk is that an attacker able to control data rendered through a banks template could inject privileged chat messages into prompts sent to an LLM. The Ansible Automation Platform 2.5 and Exploit Intelligence affected components are in streams that are out of support scope. Other OpenShift Lightspeed components that ship banks versions in which the vulnerable code is not present are not affected.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability. The upstream banks project has addressed this issue in version 2.5.0.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.5N/A6.5
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityLowN/ALow
Integrity ImpactLowN/ALow
Availability ImpactNoneN/ANone

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Understanding the Weakness (CWE)

Access Control

Technical Impact: Bypass Protection Mechanism

Frequently Asked Questions

Want to get errata notifications? Sign up here.