Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain influence over prompt registry directory
-
DeliveryPlant symlink as index.json or .jinja file
-
ExploitApplication invokes registry scan/get/set
-
ExecutionLink followed outside registry root
-
ImpactDisclose or overwrite external file
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 an attacker can influence the contents of the DirectoryPromptRegistry directory - specifically the ability to place a symbolic link in the registry (as index.json or a *.jinja prompt file) or to control files extracted into that directory (e.g., an untrusted uploaded/extracted archive). This is NOT a default-configuration remote flaw: the attacker must have write/placement influence over the prompt directory, and the application must use the DirectoryPromptRegistry and expose that directory to untrusted input. Exploitation is further limited to pre-2.5.1 versions; file-overwrite paths additionally depend on platforms where the symlink-following behavior occurs (the fix uses O_NOFOLLOW where available and falls back to explicit is_symlink checks on platforms like Windows that lack it). The required local placement of a symlink is reflected in the AV:L and AT:P metrics. |
| Impact | This is a locally-exploitable symlink-based path traversal (CWE-22) in the Banks DirectoryPromptRegistry, carrying a vendor CVSS 4.0 base score of 7.3 (AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:L). The signals are internally consistent and point to a moderate, conditional risk rather than a drop-everything priority. The attack vector is Local (AV:L), not network, so there is no remote mass-exploitation surface; the AT:P (attack requirements present) metric and the description's explicit caveat - 'requires attacker influence over the registry directory or its extracted contents' - both confirm that exploitation is gated behind a non-default precondition. Impact is genuine where the precondition holds: high confidentiality and integrity (arbitrary file disclosure via a symlink followed by _scan()/get(), and arbitrary file overwrite via set()/_save()/_load()), with low availability impact. No EPSS score, KEV listing, or public POC was provided in the input, so there is no evidence of active exploitation or weaponization. Note a nuance for consumers of this record: the vendor rated AV:L, yet in a hosted/multi-tenant LLM service where untrusted users can upload prompt archives that are extracted into a shared registry directory, the practical reachability can be closer to remote - verify against your own deployment model. Overall: a real, fixable bug worth patching promptly in affected deployments, but not a widespread internet-facing emergency. |
| Exploit ScenarioDerived | In an application that lets untrusted users supply or influence the contents of a Banks prompt registry directory (for example by extracting a user-supplied archive into it), an attacker plants a symbolic link named like an index.json or *.jinja prompt file that points to a sensitive file outside the registry root. When the application calls DirectoryPromptRegistry._scan()/get(), the link is followed and the external file's contents are disclosed; via set()/_save()/_load() the attacker can instead overwrite the external link target. No public exploit code was identified in the provided data, but the fix commit and advisory describe the mechanism in detail. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
Banks, a Python library for generating LLM prompts from a simple template language, ships a DirectoryPromptRegistry that prior to version 2.5.1 fails to reject symbolic links for its index.json file and for discovered or existing .jinja prompt files. An attacker who can influence the contents of the registry directory - for example by planting a symlink or by controlling files extracted from an untrusted archive into that directory - can cause _scan() and get() to follow a link outside the registry root and disclose arbitrary files, while set(), _save() and _load() can read or overwrite an external link target, giving high confidentiality and integrity impact with limited availability impact. Exploitation requires local placement influence over the prompt directory and applies only to deployments that use DirectoryPromptRegistry and expose that directory to untrusted input, which is why the vendor CVSS 4.0 base score is 7.3 (AV:L/AC:L/AT:P/PR:L/UI:N) and the assessed CVSS 3.1 vector is AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L; no public exploit code and no confirmed active exploitation (CISA KEV) were identified at time of analysis. The issue is fixed in version 2.5.1.
RemediationAI
Upgrade the Banks package to version 2.5.1 or later (for example pip install --upgrade 'banks>=2.5.1'); this is the vendor-released patch and the only complete fix, and it is documented in the GitHub security advisory GHSA-556j-vv39-8rqv and the v2.5.1 release notes. If an immediate upgrade is not possible, the effective compensating control is to deny untrusted write access to the DirectoryPromptRegistry root: run the process under an account that cannot create files or symlinks in that directory, ensure its parent directories are not generically writable, and mount the registry directory read-only where the application only reads prompts, noting that this breaks any legitimate workflow that adds or updates prompts at runtime. Do not extract untrusted archives directly into the registry root; extract them into a staging directory, validate entries for symlink membership (e.g., reject archive members whose type is a link), and only copy regular files into the registry, accepting the operational overhead of the extra validation step. On Windows and other platforms without O_NOFOLLOW, treat the registry directory as highly privileged, since the pre-2.5.1 write path has no kernel-level link protection; also avoid running the registry as a privileged user so that any followed link cannot overwrite sensitive files. Finally, monitor the registry directory for unexpected symbolic links or index.json changes and review application code for any path where user-supplied directory names, names, or versions reach DirectoryPromptRegistry._scan(), get(), set(), _save() or _load().
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
The affected component is the DirectoryPromptRegistry class in the Banks Python package (src/banks/registries/directory.py), which discovers prompt templates by globbing/rglobging *.jinja files under a registry root and maintains a JSON index (index.json) of prompt names, versions and file paths. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - Path Traversal), specifically symlink-following: the pre-2.5.1 code called Path.resolve() on candidate paths and opened files without first checking whether the path itself was a symlink, so a link placed inside the registry (or created by extracting an attacker-controlled archive) could resolve to a target outside the registry root. The upstream fix (PR #79, commit 23ed13e, release v2.5.1) introduces _resolve_prompt_file() with an explicit candidate.is_symlink() rejection plus a resolved.is_relative_to(root) containment check, a _validate_index_path() guard for index.json, a _write_file_no_follow() helper that opens files with os.O_WRONLY|os.O_CREAT|os.O_TRUNC|O_NOFOLLOW so writes refuse to follow links (falling back to explicit is_symlink checks on platforms such as Windows that lack O_NOFOLLOW), and a rewritten _scan() that walks *.jinja files with rglob, skips non-files, rejects symlinked prompt files, validates containment, supports relative subdirectory names, and delegates index persistence to _save(). The package metadata is cpe:2.3:a:masci:banks:*:*:*:*:*:*:*:*, confirming all versions before 2.5.1 are in scope; the change to accept str | Path for directory_path and the added typing-extensions dependency for Python < 3.11 are incidental to the security fix.
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:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
Local placement of a symlink by a low-privileged actor with directory influence (AV:L/PR:L); the directory-influence precondition has no 3.1 equivalent so it is noted rather than scored as AC:H; arbitrary read/overwrite give C:H/I:H and limited A:L.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Banks generates meaningful LLM prompts using a simple template language. Prior to 2.5.1, Banks DirectoryPromptRegistry does not reject symbolic links for index.json or discovered and existing .jinja prompt files. In an application where untrusted users can influence a prompt directory, DirectoryPromptRegistry._scan() and DirectoryPromptRegistry.get() can follow a link outside the registry root and disclose a file, while DirectoryPromptRegistry.set(), DirectoryPromptRegistry._save(), and DirectoryPromptRegistry._load() can read or overwrite an external link target. The issue requires attacker influence over the registry directory or its extracted contents. This issue is fixed in version 2.5.1.
Blast Radius
ecosystem impact- 1,415 pypi packages depend on banks (6 direct, 1,413 indirect)
Ecosystem-wide dependent count for version 2.5.1.
Technical POC Analysis
CWE-22 (the advisory also tags CWE-59; the CVE record uses CWE-22).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Banks, the Python library used to compose LLM prompts from template files, mishandles symbolic links in its DirectoryPromptRegistry before version 2.5.1, allowing an attacker who can place or influence files in the registry directory to read files outside that directory and to overwrite an external link target. Affected are teams running LLM applications that load prompts through DirectoryPromptRegistry from a directory that less-trusted users or untrusted archives can write to; because prompt files steer AI behavior and the same flaw exposes arbitrary files, the exposure combines data disclosure with potential tampering of AI output. Leadership should care because the confidentiality and integrity impact is high for those deployments, though exploitation requires local placement influence over the prompt directory and is not possible remotely or without that access.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict write access to the DirectoryPromptRegistry root so only the trusted prompt-owning service account can modify it; scan for and remove symbolic links and reject links during any archive extraction into that directory; extract untrusted archives to a quarantine path and copy only validated index.json and .jinja files; run the LLM application under a least-privilege account with the registry root outside sensitive data paths; disable DirectoryPromptRegistry or replace it with an in-code or database-backed prompt source until a remediated Banks release is confirmed; monitor and alert on symlink creation and unexpected writes in the registry directory.
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
Arbitrary file disclosure in the Banks Python prompt-templating library (masci/banks) before 2.4.4 lets attackers who co
Prompt-structure injection in the Banks LLM prompt-templating library (masci/banks) before 2.5.0 allows attacker-control
EUVD-2026-95340
GHSA-556j-vv39-8rqv
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB