# CVE-2026-61536: masci banks remote code execution via unsafe Tool import_path

Source: https://junglewise.ai/threats/cve-2026-61536-masci-banks-remote-code-execution-via-unsafe-tool-import-path  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-30. Updated: 2026-07-30  
License: CC BY 4.0 with a link back

CVE-2026-61536 · Severity: high · CVSS 7.5 · Published 2026-07-30

Banks is a library used to generate prompts for Large Language Models (LLMs) using a template language. A vulnerability exists where the library incorrectly trusts instructions within a template to load and execute any Python function on the host server. If an attacker can influence the content of a template—such as through a shared database or file system—they can execute arbitrary code, potentially leading to a full system takeover or data breach.

Technologies: [Masci Banks](https://junglewise.ai/threats/technologies/banks), [banks (PyPI)](https://junglewise.ai/threats/technologies/pypi-banks). Vendors: [Masci](https://junglewise.ai/threats/vendors/masci), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-61536 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-61536 being exploited in the wild.

**How severe is CVE-2026-61536?** High severity, with a CVSS score of 7.5, published 30 July 2026.

**Which products and versions are affected?** Masci Banks < 2.4.3; banks (PyPI) <= 2.4.2, ECOSYSTEM:introduced=0,fixed=2.4.3.

**Is there a fix for CVE-2026-61536?** Yes. banks (PyPI): upgrade to 2.4.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-61536 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-61536?** Check whether you run Masci Banks or banks (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- banks (PyPI): upgrade to 2.4.3 or later

  ```sh
  pip install "banks>=2.4.3"
  ```


## Technical details

In Banks versions prior to 2.4.3, the CompletionExtension parses Tool JSON objects directly from the rendered body of {% completion %} blocks. The library uses the 'import_path' field from this JSON to resolve a callable via importlib.import_module() and getattr() without any allowlist or sanitization. An attacker who can provide a malicious template can specify dangerous Python functions (e.g., 'os.system') in the 'import_path'. When the LLM triggers a tool call matching the attacker-defined tool name, the library executes the specified function with attacker-controlled arguments. This bypasses previous sandboxing efforts (CVE-2026-44209) because the vulnerability exists in the Python-level tool resolution logic rather than the Jinja2 template environment.

## Affected products

- masci banks < 2.4.3

## Identifiers

- CVE-2026-61536
- GHSA-64vx-6h2c-rjh7

## Timeline

- 2026-06-26: advisory: GitHub Security Advisory GHSA-64vx-6h2c-rjh7 published
- 2026-07-30: disclosed: CVE-2026-61536 assigned
- 2026-07-30: patched: Fixed in version 2.4.3

## References

- [https://github.com/masci/banks/security/advisories/GHSA-64vx-6h2c-rjh7](https://github.com/masci/banks/security/advisories/GHSA-64vx-6h2c-rjh7)

## Related threats

- [Banks Prompt chat role injection via user-controlled input](https://junglewise.ai/threats/cve-2026-107717-banks-user-controlled-prompt-input-can-be-parsed-as-privileged)
- [Banks DirectoryPromptRegistry symlink traversal arbitrary file disclosure and overwrite](https://junglewise.ai/threats/cve-2026-107716-banks-symlink-traversal-and-arbitrary-file-disclosure-overwrite)
- [Banks DirectoryPromptRegistry path traversal in set()](https://junglewise.ai/threats/cve-2026-71492-banks-directorypromptregistry-path-traversal-in-set)
- [masci banks path traversal in media filters](https://junglewise.ai/threats/cve-2026-62663-masci-banks-path-traversal-in-media-filters)
- [masci banks Remote Code Execution via SSTI in Prompt templates](https://junglewise.ai/threats/cve-2026-44209-masci-banks-remote-code-execution-via-ssti-in-prompt-templates)
