{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-61536","id":"CVE-2026-61536","title":"Banks: Unsafe importlib.import_module of attacker-controlled Tool.import_path in CompletionExtension allows RCE","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 Py","descriptionLong":"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.","published":"2026-07-30T16:50:01.730Z","updated":"2026-10-28T02:31:02.382804404Z","reserved":"2026-07-10T16:27:03.093Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["masci banks"],"affectedProducts":[{"vendor":"masci","product":"banks","defaultStatus":null,"versions":[{"version":"< 2.4.3","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"banks","purl":"pkg:pypi/banks","ranges":["<2.4.3"],"fixed":["2.4.3"],"advisory":"GHSA-64vx-6h2c-rjh7"}],"cwes":["CWE-94","CWE-470"],"aliases":["GHSA-64vx-6h2c-rjh7"],"references":[{"url":"https://github.com/masci/banks/security/advisories/GHSA-64vx-6h2c-rjh7","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61536.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61536","tags":["advisory"]},{"url":"https://github.com/masci/banks/pull/75","tags":["web"]},{"url":"https://github.com/masci/banks/commit/e443f112b80a20ac24438afe4eb8f8a746a8396d","tags":["web"]},{"url":"https://github.com/masci/banks","tags":["package"]},{"url":"https://github.com/masci/banks/releases/tag/v2.4.3","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00377,"epssPercentile":0.32409,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-61536","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61536","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-61536","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-64vx-6h2c-rjh7","ok":true,"note":"GHSA-64vx-6h2c-rjh7"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-61536","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}