Intel

AIKIDO-2026-224340

banks is vulnerable to Unsafe Reflection

CVE-2026-61536Published Jun 24, 2026
June 24, 2026

60

CVE Score

Medium

Unsafe Reflection

Are you affected? Scan for Free

TL;DR

The completion extension resolves tool callables by reading each tool's import_path and loading it dynamically with importlib.import_module and getattr. Tool definitions are parsed from the rendered completion body, so an import_path influenced by untrusted prompt or tool data can point to arbitrary modules and functions such as os.system. When the model issues a matching tool call, the resolved callable is invoked with model-supplied arguments, enabling arbitrary code execution on the host. The fix removes the dynamic importlib lookup, resolves tools only from an explicit allowlisted callable registry populated by the tool filter, and stops sending import_path to the model.

How do I fix this?

Upgrade the banks library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application uses the {% completion %} function-calling feature with tool definitions that can be influenced by untrusted input.

Package

Versions

1.4.0 - 2.4.2

Fixed in 2.4.3

Background info

banks is vulnerable to Unsafe Reflection in versions 1.4.0 - 2.4.2.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea