Description
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.
Published: 2026-08-20
Score: 6 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

DirectoryPromptRegistry.set() in Banks permits an attacker to insert a crafted Prompt.name or Prompt.version that includes relative traversal or absolute path components. When these values are interpolated into a Path without canonicalization or containment checks, the resulting file path may resolve outside the intended registry root. If overwrite=True is used, the attacker can overwrite existing files or create new ones in any location writable by the application process. The malicious Prompt.name is persisted in index.json and reloaded by _load(), allowing the path to survive restarts and enabling persistent exploitation. Without mitigation, an attacker can write arbitrary data, including executable or configuration files, to the file system, potentially compromising application integrity or facilitating further attacks.

Affected Systems

Affected systems are installations of Banks by Masci running any version prior to 2.4.5. The vulnerability is located in the src/banks/registries/directory.py module and is fixed in the 2.4.5 release.

Risk and Exploitability

The CVSS score of 6 indicates moderate severity. EPSS information is not available, and the vulnerability is not listed in CISA KEV, suggesting no publicly known exploitation at this time. The likely attack vector involves providing attacker‑controlled Prompt.name and Prompt.version fields through any interface that forwards request data into these fields, such as an API endpoint or a web form. Successful exploitation requires the application process to have permission to write to the targeted file locations, making it a potential local or remote risk depending on how the input interface is exposed.

Generated by OpenCVE AI on August 20, 2026 at 20:49 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to banks version 2.4.5 or later, which removes the path traversal logic.
  • If an upgrade is not immediately possible, patch the source: modify DirectoryPromptRegistry.set to canonicalize the resulting Path, verify it remains within the registry root, and reject any path that falls outside this boundary; also disable or restrict the overwrite flag until the patch is deployed.
  • Restrict or sanitize any user input that populate Prompt.name or Prompt.version so that only safe, pre‑approved names and versions are accepted; alternatively, disable external input mechanisms that allow arbitrary prompt creation until the patch is applied.

Generated by OpenCVE AI on August 20, 2026 at 20:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 20 Aug 2026 18:15:00 +0000

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

Thu, 20 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Banks: Path traversal in `DirectoryPromptRegistry.set()` allows arbitrary file write outside the registry root
Weaknesses CWE-22
References
Metrics cvssV4_0

{'score': 6, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-20T17:11:10.125Z

Reserved: 2026-08-06T19:56:23.725Z

Link: CVE-2026-71492

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-20T17:19:40.930

Modified: 2026-08-20T17:19:40.930

Link: CVE-2026-71492

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T21:00:05Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')