Skip to main content

masci/banks EUVDEUVD-2026-63414

| CVE-2026-71492 MEDIUM
Path Traversal (CWE-22)
2026-08-20 GitHub_M GHSA-x8wg-4xgc-vr54
6.0
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Submit crafted API request with traversal sequence in Prompt.name
  2. Delivery
    DirectoryPromptRegistry.set() constructs unvalidated filesystem path
  3. Exploit
    Resolved path escapes registry root
  4. Execution
    Application writes Prompt.raw bytes to attacker-chosen writable path
  5. Persist
    Overwritten file (config, script, or cron entry) is subsequently loaded or executed
  6. Impact
    Attacker 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

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

banks < 2.4.5

Affected Packages

pypi banks fix: 2.4.5

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

Vendor (GitHub_M) PRIMARY 6.0 MEDIUM
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
vuln.today AI 6.3 MEDIUM

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.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Aug 20, 2026 - 17:02 EUVD

DescriptionCVE.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

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Rare
niche Python LLM prompt-template library, limited enterprise footprint
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
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