CVE-2026-61536: Banks: Unsafe importlib.import_module of attacker-controlled Tool.import_path in CompletionExtension allows RCE

Published Jul 30, 2026
·
Updated

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 importpath field through importlib.importmodule(...) + getattr(...) to obtain the callable that handles a tool call. There is no allowlist or sanitization on importpath, so any importable Python attribute (e.g. os.system, subprocess.getoutput) can be selected. When the LLM emits a toolcalls entry whose function.name matches the attacker-supplied tool name, the resolved callable is invoked with kwargs decoded from toolcall.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 Software

1 affected component
banks<2.4.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade banks to a version that resolves this vulnerability.

    Fixed in 2.4.3

Event History

Jul 30, 2026
CVE Published
via MITRE·04:50 PM
Data Sourced
via MITRE·04:50 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2026-61536?

CVE-2026-61536 has a severity rating of high, scored at 7.5 on the CVSS scale.

2

How does CVE-2026-61536 allow for remote code execution?

CVE-2026-61536 allows remote code execution because it uses unsafe importlib.import_module to load attacker-controlled Tool.import_path.

3

Which versions of the software are affected by CVE-2026-61536?

CVE-2026-61536 affects versions of banks prior to 2.4.3.

4

How do I fix CVE-2026-61536?

To fix CVE-2026-61536, update your banks installation to version 2.4.3 or later.

5

What type of vulnerability is CVE-2026-61536 classified as?

CVE-2026-61536 is classified as a code injection vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203