CVE-2026-107717
MEDIUM 6.5CVSS 3.1Banks: User-controlled prompt input can be parsed as privileged chat messages
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
- 8 Oct 2026
- Last modified
- 15 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-20
- Also known as
- GHSA-hmq2-7hp6-7crhPYSEC-2026-4202
- Sources
- NVDJSONOSV GHSA-hmq2-7hp6-7crhJSONOSV PYSEC-2026-4202JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | banks | < 2.5.0 | 2.5.0 |
References
- https://github.com/masci/banks/commit/02172b816fb84f6a824cc09a8aca7416f53c12cb · WEB
- https://github.com/masci/banks/pull/78 · WEB
- https://github.com/masci/banks/releases/tag/v2.5.0 · WEB
- https://github.com/masci/banks/security/advisories/GHSA-hmq2-7hp6-7crh · 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
History
- 25 Nov 2026 21:22 UTC · NVD: first stored (published 8 Oct 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 15 Oct 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 8 Oct 2026)