Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl Banks template variable
-
DeliveryInject ../ traversal path into media filter
-
ExploitBanks opens target file rb
-
ExecutionSensitive file base64-encoded into prompt
-
ImpactRead secrets from rendered output
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the embedding application passes attacker-influenced data into a Banks Prompt template variable that is consumed by one of the four media filters (image, audio, video, or document), and that the rendered prompt output (or the resulting LLM response) is observable to the attacker so the base64-encoded file contents can be retrieved. The exact feature is the media-filter file-read path that calls open(Path(value), "rb"). Limiting factors: the flaw is not exploitable if template variables are entirely operator/developer-controlled rather than user-supplied, if no media filter is used on untrusted input, or if the app runs before version 2.4.4 but never surfaces the rendered output; disclosure is also bounded by the file permissions of the Python process (only files it can read are exposed). |
| Impact | The CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N scores 7.5 and models pure confidentiality loss via network-reachable, unauthenticated, low-complexity access - consistent with arbitrary file read. The important caveat is that exploitability is application-dependent: 'AV:N/PR:N' only holds when the embedding application forwards untrusted, remotely-supplied data into Banks template variables and then exposes the rendered output; in deployments where template variables are operator-controlled, real-world reach is lower. No EPSS score, SSVC decision, or POC flag was provided in the input, and the vulnerability is not listed in CISA KEV, so exploitation status is 'no public exploit identified at time of analysis' rather than active exploitation. Impact is limited to disclosure (I:N/A:N), but that disclosure includes secrets (.env, SSH keys, cloud credentials) that enable follow-on compromise, so treat as a genuine priority anywhere user input flows into Banks prompts, and as lower urgency where inputs are trusted. |
| Exploit ScenarioDerived | An application uses Banks to render prompts and passes a user-supplied field (e.g., a filename or attachment path) into a template that applies the document filter. The attacker sets that variable to '../../../../etc/shadow' or '../../.env'; Banks opens the file and embeds its base64-encoded contents in the rendered prompt, which the attacker then reads back from the LLM interaction or response. No exploit code was provided in the input, but the traversal technique is trivial given AV:N/AC:L. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 30, 2026
Arbitrary file disclosure in the Banks Python prompt-templating library (masci/banks) before 2.4.4 lets attackers who control template variables read any file the Python process can access. All four media filters (image, audio, video, document) wrap untrusted input in Path(value) and feed it straight to open(file_path, "rb") with no sanitization, so path traversal (../) reads files like .env, SSH keys, cloud credentials, source, /etc/passwd and /etc/shadow, returning them base64-encoded in the rendered prompt for trivial exfiltration. No public exploit identified at time of analysis and it is not in CISA KEV, but the fix in 2.4.4 is straightforward to reverse-engineer.
RemediationAI
Vendor-released patch: upgrade Banks to version 2.4.4, which fixes all four media filters (pin banks>=2.4.4 in requirements/pyproject and rebuild). Until you can upgrade, do not pass user-controlled or otherwise untrusted data into Banks template variables that reach the image, audio, video, or document filters; if media embedding is not required, avoid those filters entirely. As compensating controls, validate and canonicalize any path-like variable before rendering and reject values containing '../', absolute paths, or symlinks, and/or confine the filters to a dedicated media directory via an allowlist - the trade-off is added validation code and possible breakage of legitimate nested media paths. Running the Python process under a least-privilege account limits which files traversal can reach (side effect: none functional, but it does not stop the read itself). See the advisory GHSA-98rr-gvc9-3cjh (https://github.com/masci/banks/security/advisories/GHSA-98rr-gvc9-3cjh) for details.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Banks is a Python library that builds LLM prompts from a simple Jinja-style template language, where filters such as {{ var | image }} embed media by reading it from disk. The CPE cpe:2.3:a:masci:banks:*:*:*:*:*:*:*:* confirms the affected component is the masci 'banks' application/library across all versions prior to the fix. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory): the media filters construct a filesystem path directly from template variable content - Path(value) - and open it in binary mode without canonicalization (no realpath resolution), no allowlist/base-directory confinement, and no rejection of traversal sequences, so relative segments like ../ resolve against the process working directory and escape any intended media folder.
Know when Banks gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Untrusted template input is network-reachable and unauthenticated in the intended threat model, low complexity; pure arbitrary-file-read gives C:H with no integrity or availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Banks generates meaningful LLM prompts using a simple template language. In versions prior to 2.4.4, all four media filters (image, audio, video, document) in banks accept untrusted user input as file paths via Path(value) and pass them directly to open(file_path, "rb") without any path sanitization, canonicalization, or directory restriction. An attacker who controls template variables passed to a banks Prompt can use path traversal (../) to read arbitrary files accessible to the Python process-including .env files, SSH keys, cloud credentials, source code, /etc/passwd, and /etc/shadow-with the content returned base64-encoded in the rendered prompt output, making exfiltration trivial. This is particularly dangerous for applications that use banks to process user-provided template variables before sending prompts to an LLM. This issue has been fixed in version 2.4.4.
Articles & Coverage 1
Executive ViewAI
Masci/banks Python templating library versions before 2.4.4 contain a critical file disclosure vulnerability allowing attackers who control template variables to read sensitive files including AWS credentials, SSH keys, and source code via path traversal. Organizations using this library risk credential theft and unauthorized infrastructure access if template inputs are not properly restricted.
No vendor-released patch identified at time of analysis. Implement strict input validation to reject path traversal sequences in template variables; run with minimal file system permissions; disable media filters if unused; store credentials outside the Python process working directory; monitor for suspicious template variable patterns; consider running the templating service in a restricted container or sandbox.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Path traversal in the Banks Python prompt-template library (all versions prior to 2.4.5) allows a low-privileged attacke
Arbitrary code execution in the Banks Python LLM-templating library (versions prior to 2.4.3) allows an attacker who can
Banks, a Python library for generating LLM prompts from a simple template language, ships a DirectoryPromptRegistry that
Prompt-structure injection in the Banks LLM prompt-templating library (masci/banks) before 2.5.0 allows attacker-control
EUVD-2026-51231
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB