Skip to main content

Banks DirectoryPromptRegistry CVE-2026-107716

| EUVDEUVD-2026-95340 HIGH
Path Traversal (CWE-22)
2026-10-08 GitHub_M GHSA-556j-vv39-8rqv
7.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain influence over prompt registry directory
  2. Delivery
    Plant symlink as index.json or .jinja file
  3. Exploit
    Application invokes registry scan/get/set
  4. Execution
    Link followed outside registry root
  5. Impact
    Disclose 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

banks < 2.5.1

Affected Packages

pypi banks fix: 2.5.1

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

Vendor (GitHub_M) PRIMARY 7.3 HIGH
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
vuln.today AI 7.3 HIGH

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.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L
4.0 AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
Red Hat 7.3 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 08, 2026 - 23:02 EUVD
CVE Published
Oct 08, 2026 - 21:33 cve.org
HIGH 7.3

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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

Why It Matters

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.

Business Impact: Medium
Compensating Controls

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

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Low
niche open-source Python LLM prompt-templating library, limited production footprint
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
Medium
Technical Impact
Partial

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy