CVE-2026-71492
Received Received - Intake

Path Traversal in Banks Prompt Registry

Vulnerability report for CVE-2026-71492, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-20

Last updated on: 2026-08-20

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-20
Last Modified
2026-08-20
Generated
2026-08-20
AI Q&A
2026-08-20
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
banks directorypromptregistry to 2.4.5 (inc)
masci banks to 2.4.5 (exc)
masci banks 2.4.5

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability exists in the Banks library before version 2.4.5. It allows attackers to write files to arbitrary paths outside the intended registry directory by manipulating the Prompt.name and Prompt.version fields. The issue arises because the library does not properly validate or canonicalize these fields before using them to construct file paths.

Detection Guidance

Check for unexpected file writes or modifications in directories where Prompt.raw data is stored. Review index.json for suspicious paths containing ../ or absolute paths. Inspect application logs for DirectoryPromptRegistry.set() calls with unusual Prompt.name or Prompt.version values.

Impact Analysis

If you use the Banks library in an application that forwards user-controlled data into Prompt.name or Prompt.version, an attacker could write malicious files to sensitive locations on your system. This could lead to code execution, data theft, or system compromise, depending on the permissions of the application process.

Compliance Impact

This vulnerability could lead to unauthorized file writes outside intended directories, potentially exposing or modifying sensitive data. For GDPR, this may violate integrity and confidentiality principles (Article 5) if personal data is altered or accessed improperly. For HIPAA, it risks unauthorized access to protected health information if files containing such data are overwritten or exposed.

Mitigation Strategies

Upgrade to Banks version 2.4.5 or later. Validate and sanitize Prompt.name and Prompt.version inputs to prevent path traversal. Restrict file write permissions for the application process. Monitor for unauthorized file writes in registry directories.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-71492. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart