PatchSiren

masci CVE debriefs

These pages are published after PatchSiren validates generated defensive summaries against stored public CVE and source evidence.

HIGH masci CVE published 2026-11-05

CVE-2026-61536

Banks generates meaningful LLM prompts using a simple template language. In versions prior to 2.4.3, banks parses Tool JSON objects from the rendered body of {% completion %} blocks and later resolves their import_path field through importlib.import_module(...) + getattr(...) to obtain the callable that handles a tool call. There is no allowlist or sanitization on import_path, so any importable Python attribute (e.g. os.system, subprocess.getoutput) can be selected. When the LLM emits a tool_calls entry whose function.name matches the attacker-supplied tool name, the resolved callable is invoked with kwargs decoded from tool_calls.function.arguments, yielding arbitrary code execution in the banks-hosting process. This is distinct from GHSA-gphh-9q3h-jgpp / CVE-2026-44209. That advisory was fixed in 2.4.2 by switching src/banks/env.py from Environment to SandboxedEnvironment. The fix does not touch src/banks/extensions/completion.py, and the unsafe import + getattr chain still executes on 2.4.2. The malicious Tool JSON is plain text in the rendered template body — it requires no Jinja attribute access, so the sandbox is irrelevant. This issue has been fixed in version 2.4.3. Affected users should upgrade to version 2.4.3 or later and review and restrict import paths for Tool JSON objects.

HIGH masci CVE published 2026-10-08

CVE-2026-107716

PatchSiren debrief based on the supplied source corpus. The CVE record was published on 2026-10-08T22:10:07.000Z and has not been modified since then. The 'DirectoryPromptRegistry' class in the 'banks' package does not properly handle symbolic links, allowing for arbitrary file disclosure and overwrite via the '_scan()', 'get()', 'set()', and '_save()' methods. This vulnerability, CVE-2026-107716, allows defenders to assess exposure and prioritize remediation, especially in systems using the 'banks' package with untrusted files in the prompt directory.

MEDIUM masci CVE published 2026-08-20

CVE-2026-71492

CVE-2026-71492 is a vulnerability in the Banks application that generates meaningful LLM prompts using a simple template language. The vulnerability exists in the DirectoryPromptRegistry.set() function, which interpolates attacker-controlled Prompt.name and Prompt.version values into a Path without canonicalization or containment validation. This allows an attacker to write Prompt.raw bytes to attacker-chosen paths writable by the application process.

HIGH masci CVE published 2026-07-30

CVE-2026-62663

CVE-2026-62663 is a high-severity vulnerability in the Banks library, which generates meaningful LLM prompts using a simple template language. In versions prior to 2.4.4, the library's media filters (image, audio, video, document) accept untrusted user input as file paths and pass them directly to open(file_path, 'rb') without any path sanitization, canonicalization, or directory restriction. This allows an attacker to use path traversal (../) to read arbitrary files accessible to the Python process, including sensitive files such as .env files, SSH keys, cloud credentials, source code, /etc/passwd, and /etc/shadow. The content of these files is returned base64-encoded in the rendered prompt output, making exfiltration trivial. This issue has been fixed in version 2.4.4.

HIGH masci CVE published 2026-05-26

CVE-2026-44209

## Summary A Server-Side Template Injection (SSTI) vulnerability in the Banks LLM prompt templating library (versions prior to 2.4.2) allows remote code execution when user-supplied strings are passed as template arguments to the `Prompt()` constructor. The root cause is the use of an unsandboxed `jinja2.Environment()` for rendering prompt templates. ## Technical Details Banks is a Python library that generates LLM prompts using Jinja2 templating. Prior to version 2.4.2, the library instantiated `jinja2.Environment()` without sandbox restrictions. When applications pass untrusted user input directly as the template string (rather than as template variables), attackers can inject malicious Jinja2 syntax to execute arbitrary Python code on the host system. The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H) indicates this requires network access, high attack complexity, no privileges, user interaction, but can result in complete confidentiality, integrity, and availability impact. The CWE-1336 classification identifies this as an improper neutralization of special elements used in a template engine. ## Affected Versions - Banks versions prior to 2.4.2 ## Fixed Versions - Banks 2.4.2 and later ## Recommended Actions 1. **Upgrade immediately** to Banks version 2.4.2 or later, which implements proper sandboxing for template rendering. 2. **Review application code** to identify any locations where user-supplied strings are passed as the template argument to `Prompt()` rather than as template variables. 3. **Architectural hardening**: Ensure user input is always passed as template context data, never as the template string itself. 4. **Input validation**: Implement strict allowlisting for any template strings that must be dynamically constructed. 5. **Runtime monitoring**: Deploy application security monitoring to detect suspicious template syntax in inputs. ## Timeline - **2026-05-26**: CVE published and vulnerability disclosed ## References - CVE Record: CVE-2026-44209 - NVD Entry: CVE-2026-44209 - GitHub Security Advisory: GHSA-gphh-9q3h-jgpp - Fix Pull Request: #74