Description
Banks generates meaningful LLM prompts using a template language that makes sense. Prior to 2.4.2, banks 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 vulnerability is fixed in 2.4.2.
Published: 2026-05-26
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Banks renders LLM prompt templates using Jinja2’s Environment without sandboxing. When an application passes a user‑supplied string directly to the Prompt() function, the unsanitised template can execute arbitrary Python code. This leads to remote code execution on the host and is classified as an SSTI flaw (CWE‑1336).

Affected Systems

The affected product is Banks from the masci organization. Versions earlier than 2.4.2 use the vulnerable rendering engine and are therefore impacted. The issue is fixed in 2.4.2, with no additional patch information provided.

Risk and Exploitability

The CVSS score is 7.5, indicating high severity, and the EPSS score is not available, so the exact exploitation probability is unknown. The vulnerability is not listed in CISA KEV. Because the attack requires supplying a malicious template string to Prompt(), it can be executed remotely from any interface that allows user‑provided prompt content. Successful exploitation results in full code execution on the server hosting Banks.

Generated by OpenCVE AI on May 26, 2026 at 22:28 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Banks to version 2.4.2 or later, which removes the unsandboxed Jinja2 rendering.
  • If an upgrade cannot be performed immediately, hard‑enforce that the Prompt() function receives only pre‑validated or constant templates and rejects any dynamic user‑supplied strings.
  • Consider reimplementing the prompt rendering with a sandboxed Jinja2 environment or an alternative safe templating library to mitigate future injection risks.

Generated by OpenCVE AI on May 26, 2026 at 22:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-gphh-9q3h-jgpp banks has Critical Remote Code Execution (RCE) via Jinja2 SSTI
History

Wed, 27 May 2026 10:30:00 +0000

Type Values Removed Values Added
First Time appeared Masci
Masci banks
Vendors & Products Masci
Masci banks

Tue, 26 May 2026 21:15:00 +0000

Type Values Removed Values Added
Description Banks generates meaningful LLM prompts using a template language that makes sense. Prior to 2.4.2, banks 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 vulnerability is fixed in 2.4.2.
Title Banks: Critical Remote Code Execution (RCE) via Jinja2 SSTI
Weaknesses CWE-1336
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-28T14:07:44.481Z

Reserved: 2026-05-05T15:13:47.571Z

Link: CVE-2026-44209

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-05-26T21:16:37.620

Modified: 2026-05-29T15:29:42.387

Link: CVE-2026-44209

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-27T10:08:28Z

Weaknesses
  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine