cve.bz

CVE-2026-107717 masci banks: Improper Input Validation

6.5 mediumEPSS 0.3%Fix available

Medium (6.5) in masci banks. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in banks 2.5.0.

On this page
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.

Severity

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 27th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2026-10-13. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • banks (PyPI): fixed in 2.5.0

Ask an AI about this CVE

Show the promptExplain CVE-2026-107717 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-107717?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-107717?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-107717 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
masci banks< 2.5.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-hmq2-7hp6-7crhPyPIbanks<2.5.02.5.0
PYSEC-2026-4202PyPIbanks<2.5.02.5.0

Red Hat

Red Hat rates this Moderate.

Red Hat's 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.

Red Hat's 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.

ProductPackageStateAdvisory
Exploit Intelligenceexploit-intelligence/vulnerability-analysis-rhel9Out of support scope
Lightspeed Corelightspeed-core/rag-tool-cpu-rhel9Fix deferred
Lightspeed Corelightspeed-core/rag-tool-cuda-12.9-rhel9Fix deferred
OpenShift Lightspeedopenshift-lightspeed/lightspeed-ocp-rag-rhel9Fix deferred
OpenShift Lightspeedopenshift-lightspeed/lightspeed-service-api-rhel9Not affected
OpenShift Lightspeedopenshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/lightspeed-chatbot-rhel8Out of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-107717.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON