CVE-2026-61536
Deferred Deferred - Pending Action

Code Execution in Banks via Malicious Tool JSON

Vulnerability report for CVE-2026-61536, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-30

Last updated on: 2026-07-30

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-30
Last Modified
2026-07-30
Generated
2026-07-31
AI Q&A
2026-07-31
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
banks banks to 2.4.3 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-470 The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code.
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability allows arbitrary code execution in the banks-hosting process. It occurs because the software parses Tool JSON objects from template blocks and resolves their import_path field without sanitization. Attackers can supply malicious Python attributes like os.system or subprocess.getoutput, which are then executed with user-controlled arguments.

Detection Guidance

Check the version of banks installed on your system. If it is prior to 2.4.3, the vulnerability is likely present. Run: pip show banks or pip list | grep banks to verify the version.

Impact Analysis

An attacker could execute arbitrary code on the system hosting the banks software. This could lead to data theft, system compromise, or unauthorized actions. The impact depends on the privileges of the hosting process.

Compliance Impact

This vulnerability could lead to unauthorized access or data breaches, violating GDPR and HIPAA requirements for data protection and access controls. Compliance may be compromised if sensitive data is exposed or altered.

Mitigation Strategies

Upgrade banks to version 2.4.3 or later immediately. Use: pip install --upgrade banks>=2.4.3. Review any custom Tool JSON objects in your templates to ensure they do not contain malicious import_path values.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-61536. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart