<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-09T17:34:23.304636+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/fkie_cve-2026-107717</id>
    <title>fkie_cve-2026-107717</title>
    <updated>2026-10-09T17:34:23.306868+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>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.</p>
      </div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/fkie_cve-2026-107717"/>
  </entry>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/ghsa-hmq2-7hp6-7crh</id>
    <title>GHSA-hmq2-7hp6-7crh — Banks: User-controlled prompt input can be parsed as privileged chat messages</title>
    <updated>2026-10-09T17:34:23.306958+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: banks</p>
<p>## Summary</p>
<p>Banks' `Prompt.chat_messages()` method parses every rendered output line as a potential `ChatMessage` JSON
  object. If attacker-controlled template data renders to JSON such as `{"role":"system","content":"..."}`,
  Banks returns it as a privileged `system` message instead of treating it as plain user-controlled text.</p>
<p>Applications that render untrusted user input with `Prompt.chat_messages()` and pass the returned messages
  directly to an LLM provider may be vulnerable to chat role injection and prompt boundary bypass.</p>
<p>## Details</p>
<p>The issue is in `src/banks/prompt.py`:</p>
<p>```python
  messages: list[ChatMessage] = []
  for line in rendered.strip().split("\n"):
      try:
          messages.append(ChatMessage.model_validate_json(line))
      except ValidationError:
          # Ignore lines that are not a message
          pass</p>
<p>if not messages:
      # fallback, if there was no {% chat %} block in the template,
      # try to build a list of messages for the role "user"
      messages.append(chat_message_from_text(role="user", content=rendered))
```
  The method first renders the template, then attempts to parse each rendered line as a ChatMessage.</p>
<p>Because this parsing is applied to the final rendered output, user-controlled template variables can
  accidentally become trusted structured chat messages.</p>
<p>The ChatMessage model also accepts any string as the role in src/banks/types.py:
  ```python
  class ChatMessage(BaseModel):
      role: str…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-hmq2-7hp6-7crh"/>
  </entry>
</feed>
