Skip to content
HighVulnerability

GHSA-gphh-9q3h-jgpp: banks has Critical Remote Code Execution (RCE) via Jinja2 SSTI

Published
Record updated
View JSON
Affected
  • banks <= 2.4.1
Fixed in
2.4.2
  • released April 27, 2026, 11 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%

Summary

banks versions up to and including 2.4.1 render prompt templates with an unsandboxed jinja2.Environment() in src/banks/env.py. Applications that pass user-supplied strings as the template argument to Prompt() are exposed to Server-Side Template Injection, which can lead to Remote Code Execution on the host.

Mitigation

Fixed in banks 2.4.2 (PR #74), which switches to jinja2.sandbox.SandboxedEnvironment. Developers on banks <= 2.4.1 should upgrade to 2.4.2 and avoid passing untrusted user input as the template argument to Prompt().