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_call.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.
Scoring
- Severity
- HIGH
- CVSS base score
- 7.5
- CVSS vector
- CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS probability
- 0.30%
- CWE
- CWE-94, CWE-470
- Published
- 2026-07-30
- Last modified
- 2026-07-31
Affected products
- masci banks
Weakness type
Related vulnerabilities
- CVE-2026-81803 — WordPress RepairBuddy plugin <= 4.1224 - Remote Code Execution (RCE) vulnerability
- CVE-2026-66632 — WordPress Simple Cloudflare Turnstile plugin <= 1.42.1 - Content Injection vulnerability
- CVE-2026-80352 — Apache Camel K: Camel K Master trait serviceAccountName YAML injection lets CR author apply arbitrary objects
- CVE-2026-19584 — Velociraptor VQL injection during notebook restore from backup
- CVE-2026-87926 — Rizwan17 inventory-management-system Login Page index.php cross site scripting
- CVE-2026-87923 — Rizwan17 inventory-management-system List DBOperation.php cross site scripting
- CVE-2026-87817 — GitPython before 3.1.60 Remote Code Execution via Git Directory Impersonation
- CVE-2026-41870 — Apache Nutch: Unauthenticated remote code execution (RCE) via JEXL injection in Nutch Server (Nutch REST API)