CVE-2026-61536 in banksinfo

Summary

by MITRE • 07/30/2026

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.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 07/30/2026

This vulnerability exists within a banking application framework that utilizes large language models for generating prompts through a templating system. The system employs a simple template language where banks generates meaningful prompts using {% completion %} blocks that contain Tool JSON objects. These tool objects define callable functions that should be executed when the LLM emits tool calls matching specific function names. The vulnerability stems from how the framework processes these tool definitions, specifically in the completion.py module where it resolves import_path fields through direct Python introspection mechanisms.

The core technical flaw involves an insecure deserialization pattern where the system accepts arbitrary Python import paths without any validation or sanitization. When parsing Tool JSON objects, the framework uses importlib.import_module() followed by getattr() to resolve callable functions from the import_path field. This approach creates a path traversal vulnerability that allows attackers to import and execute any Python module accessible to the application process. The absence of an allowlist or input validation means that malicious actors can specify system-level modules like os.system, subprocess.getoutput, or other potentially dangerous functions directly within their tool definitions.

The operational impact of this vulnerability is severe as it enables arbitrary code execution within the context of the banks-hosting process. When an LLM generates a tool_call entry with a function name matching an attacker-controlled tool definition, the system invokes the resolved callable with arguments decoded from tool_call.function.arguments. This creates a full command injection scenario where attackers can execute arbitrary system commands, potentially leading to complete system compromise. The vulnerability affects versions prior to 2.4.3 and represents a distinct issue from CVE-2026-44209 despite both being related to template processing and sandboxing.

The exploitability is enhanced by the fact that malicious Tool JSON objects are plain text within the rendered template body, eliminating the need for complex Jinja attribute access patterns that might bypass sandboxing. This means the existing sandboxing mechanism in version 2.4.2, which was implemented to address GHSA-gphh-9q3h-jgpp / CVE-2026-44209, is irrelevant to this particular vulnerability because it operates at a different layer of the processing chain. The fix implemented in version 2.4.3 addresses the root cause by introducing proper input validation and sanitization for import_path fields before allowing module resolution. This aligns with security best practices outlined in CWE-74 and CWE-94, which address injection flaws and insecure deserialization vulnerabilities respectively. The vulnerability also maps to ATT&CK technique T1059.001 for command and scripting interpreter, demonstrating how attackers can leverage template processing systems to execute arbitrary code on target systems.

Responsible

GitHub M

Reservation

07/10/2026

Disclosure

07/30/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sector

Finance

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!