<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Banks (&lt;= 2.4.2) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/banks--2.4.2/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 05 Nov 2026 22:30:30 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/banks--2.4.2/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Banks: Arbitrary import path resolution remote code execution (CVE-2026-61536)</title><link>https://feed.craftedsignal.io/briefs/2026-11-banks-rce/</link><pubDate>Thu, 05 Nov 2026 22:30:30 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-11-banks-rce/</guid><description>The banks library fails to validate tool import paths parsed from template content, allowing an attacker to achieve arbitrary code execution by defining malicious Tool objects that resolve to system-level Python callables.</description><content:encoded><![CDATA[<p>The banks library contains a vulnerability in its completion extension where tool definitions are parsed directly from template bodies without validation. An attacker can inject a JSON-serialized <code>Tool</code> object into a template, specifying an arbitrary <code>import_path</code>. When the application processes the template, <code>importlib.import_module</code> is invoked on the attacker-controlled path, allowing the instantiation of any available Python callable. This enables remote code execution (RCE) with the privileges of the host process. This vulnerability persists in version 2.4.2 despite previous fixes for Jinja sandboxing, as the tool resolution logic operates outside the sandboxed environment.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains write access to a prompt registry (e.g., RedisPromptRegistry or shared filesystem).</li>
<li>Attacker injects a malicious <code>{% completion %}</code> block containing a JSON-serialized <code>Tool</code> object.</li>
<li>The malicious <code>Tool</code> object specifies a high-risk <code>import_path</code> (e.g., <code>os.system</code>).</li>
<li>The application renders the template and calls <code>Tool.model_validate_json()</code> to parse the injected JSON.</li>
<li>The library calls <code>_get_tool_callable</code>, passing the untrusted <code>import_path</code> to <code>importlib.import_module</code>.</li>
<li>The LLM is invoked or prompted to call the function name defined in the malicious tool.</li>
<li>The application resolves the callable via <code>getattr()</code> and executes it with attacker-supplied arguments.</li>
<li>Arbitrary command execution occurs under the application process context.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows for arbitrary code execution on the server hosting the banks-based application. This impact is significant for environments where prompts are fetched from external or shared sources, potentially leading to full system compromise depending on the process permissions.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade or migrate away from vulnerable implementations using the affected <code>CompletionExtension</code> until a vendor-supplied security patch is released.</li>
<li>Implement a hardcoded allowlist for tool callables at the application level to replace the dynamic <code>importlib</code> resolution.</li>
<li>Audit all prompt storage mechanisms (Redis, file-based registries) to ensure only authorized users can modify template content.</li>
<li>Restrict process-level permissions for inference services to limit the impact of potential RCE.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>rce</category><category>python</category><category>vulnerability</category></item></channel></rss>