Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted API request with traversal sequence in Prompt.name
-
DeliveryDirectoryPromptRegistry.set() constructs unvalidated filesystem path
-
ExploitResolved path escapes registry root
-
ExecutionApplication writes Prompt.raw bytes to attacker-chosen writable path
-
PersistOverwritten file (config, script, or cron entry) is subsequently loaded or executed
-
ImpactAttacker achieves persistent arbitrary impact
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 three concurrent conditions: (1) the target application uses DirectoryPromptRegistry and directly incorporates externally-supplied, unvalidated values as Prompt.name or Prompt.version - this is an application-level design decision, not a default behavior of the library itself; (2) the attacker possesses at least low-privilege access to the interface that accepts these values (PR:L per CVSS 4.0 vector); and (3) the application process has write permission to files outside the registry root that the attacker wishes to target. Exploitation is limited by: the AT:P requirement meaning only applications with the specific anti-pattern of forwarding raw user input to Prompt name/version fields are vulnerable; the file-write primitive is constrained to paths writable by the process user under standard OS permissions; and the absence of a read-back or availability channel means the attacker must identify a secondary abuse vector - such as overwriting a configuration file, cron job, or Python module - to escalate to code execution. Applications that validate or sanitize Prompt.name and Prompt.version at the API boundary before passing them to the library are not exploitable regardless of library version. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N, score 6.0) appropriately reflects the central limiting factor: AT:P (Attack Requirements: Present) encodes that the host application must directly expose externally-supplied data as Prompt.name or Prompt.version without its own sanitization - a specific architectural anti-pattern, not a universally-present attack surface. The high integrity impact (VI:H) is well-founded: any writable path accessible to the process can be targeted. Confidentiality and availability are correctly scored N, as this is a write-only primitive with no read-back or crash capability. Real-world operational risk is moderate rather than high: the niche deployment footprint of a specialized LLM prompt-library means relatively few exposed instances, and the AT:P prerequisite filters out applications that do not forward raw user input to Prompt fields. EPSS score was not provided in the input data; exploitation probability is inferred as low-to-moderate given the precondition. There is no CISA KEV listing and no known public exploit code, which lowers urgency relative to the raw integrity-impact score. The CVSS 4.0 score of 6.0 is a reasonable representation - no significant conflict between available signals is observed, though the absence of EPSS data leaves exploitation likelihood partially uncharacterized. |
| Exploit ScenarioDerived | An attacker with low-privilege access to an application that exposes a prompt-creation API sends a crafted request setting Prompt.name to ../../../etc/cron.d/backdoor and Prompt.version to 0, with Prompt.raw containing a malicious cron job payload; DirectoryPromptRegistry.set() writes the payload directly to /etc/cron.d/backdoor. The path is then stored in index.json, so it persists across application restarts without requiring the attacker to re-submit. No public exploit code has been identified, but the attack requires only a standard HTTP request and no special tooling beyond knowledge of the API schema. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Path traversal in the Banks Python prompt-template library (all versions prior to 2.4.5) allows a low-privileged attacker to write arbitrary bytes to attacker-chosen filesystem paths accessible to the application process. DirectoryPromptRegistry.set() in directory.py constructs on-disk paths by directly interpolating unvalidated Prompt.name and Prompt.version values - enabling relative sequences like ../victim/foo or absolute paths to escape the configured registry root. The poisoned path persists in index.json and is reconstructed on subsequent registry loads, meaning exploitation survives application restarts. No public exploit or CISA KEV listing exists at time of analysis; a vendor-released patch is available as version 2.4.5.
RemediationAI
Upgrade to banks version 2.4.5 or later, which introduces the _resolve_prompt_file() validation helper and eliminates the traversal entirely; the patched release is available at https://github.com/masci/banks/releases/tag/v2.4.5 (fix commit: a215f6d779966945c56e0af5abed1ae5916fd9d3, PR #77). If an immediate upgrade is not possible, the primary compensating control is to never pass unsanitized external user input directly into Prompt.name or Prompt.version - applications should allowlist these fields to alphanumeric characters, hyphens, and intentional forward-slash namespacing, and reject any value containing '..', an absolute path prefix, or non-printable characters before constructing a Prompt object. Additionally, running the application process under a dedicated service account with write access scoped strictly to the registry directory limits the blast radius to in-registry overwrites, though it does not fully mitigate the vulnerability. No known side effects exist for upgrading to 2.4.5 beyond the intended rejection of previously-accepted malformed names.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Banks (CPE: cpe:2.3:a:masci:banks:*:*:*:*:*:*:*:*) is a Python library providing a Jinja2-based template language for constructing LLM prompts. DirectoryPromptRegistry stores named, versioned prompt templates as .jinja files under a configurable root directory and maintains an index.json manifest. Prior to v2.4.5, both set() and _load() constructed the target path via naive string interpolation - path / f'{prompt.name}.{prompt.version}.jinja' - without calling Path.resolve() or verifying the result remained inside the registry root. This is a textbook CWE-22 (Path Traversal) flaw: unsanitized, user-controlled path components are concatenated directly into a filesystem write operation. The fix (PR #77, commit a215f6d) introduces _resolve_prompt_file(), which rejects absolute names and versions, bars dot-segments and separators in version strings, resolves both root and candidate path via .resolve(), and asserts is_relative_to(root) before returning. The poisoned-index attack surface (_load() reconstructing stored paths) is also patched by routing all path reconstruction through the same validation helper.
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
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
AC:H maps the AT:P prerequisite (application must forward raw user input to Prompt fields); S:C reflects writes escaping the registry component boundary; PR:L captures required application-level authenticated access.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Banks generates meaningful LLM prompts using a simple template language. Prior to version 2.4.5, DirectoryPromptRegistry.set() in src/banks/registries/directory.py interpolates attacker-controlled Prompt.name and Prompt.version values into a Path without canonicalization or containment validation. Relative traversal such as ../victim/foo and an absolute Prompt.name can escape or discard the configured registry root, while overwrite=True permits replacement of existing target files. The poisoned name is persisted in index.json and reconstructed by _load(), allowing the out-of-root path to survive later registry loads. An application that forwards request data into these fields can therefore write Prompt.raw bytes to attacker-chosen paths writable by the application process. This issue is fixed in version 2.4.5.
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.
Arbitrary file disclosure in the Banks Python prompt-templating library (masci/banks) before 2.4.4 lets attackers who co
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-63414
GHSA-x8wg-4xgc-vr54
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB