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

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.34%, higher than 28% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-08T21:38:07.447Z
- Modified: 2026-10-15T14:56:15.712Z
- Also known as: GHSA-hmq2-7hp6-7crh, PYSEC-2026-4202
- Weaknesses: CWE-20
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- masci banks: < 2.5.0
- banks (PyPI): before 2.5.0

## Every score

- GitHub_M: 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`
- GitHub: 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`
- PyPA Advisory Database: 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`

## References

- <https://github.com/masci/banks/security/advisories/GHSA-hmq2-7hp6-7crh> (exploit, web)
- <https://github.com/masci/banks/pull/78> (web)
- <https://github.com/masci/banks/commit/02172b816fb84f6a824cc09a8aca7416f53c12cb> (web)
- <https://github.com/masci/banks/releases/tag/v2.5.0> (web)
- <https://github.com/masci/banks> (package)
- <https://pypi.org/project/banks> (package)
- <https://github.com/advisories/GHSA-hmq2-7hp6-7crh> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-107717> (advisory)

## Sources

- CVE List: [CVE-2026-107717](https://www.cve.org/CVERecord?id=CVE-2026-107717), CVE Terms of Use, modified 2026-10-13
- GitHub Advisory Database: [GHSA-hmq2-7hp6-7crh](https://github.com/advisories/GHSA-hmq2-7hp6-7crh), CC-BY-4.0, modified 2026-10-15
- NVD: [CVE-2026-107717](https://nvd.nist.gov/vuln/detail/CVE-2026-107717), Public domain, modified 2026-10-13
- PyPA Advisory Database: [PYSEC-2026-4202](https://osv.dev/vulnerability/PYSEC-2026-4202), CC-BY-4.0, modified 2026-10-15

---

Page: https://cve.day/CVE-2026-107717 · Whole record: https://cve.day/CVE-2026-107717.json · Rebuilt by cve.day 2026-11-25T22:59:43.239Z
