CVE-2026-71492: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in masci banks
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 v4.0
Score 6.0medium
Affected software
masci
banks
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
In masci banks versions before 2.4.5, the DirectoryPromptRegistry.set() method in src/banks/registries/directory.py improperly handles Prompt.name and Prompt.version values by directly interpolating them into filesystem paths without validating or canonicalizing the path. This allows relative path traversal sequences (e.g., ../victim/foo) or absolute paths to escape the configured registry root directory. When overwrite=True is set, existing files can be replaced. The malicious path is persisted in index.json and reloaded later, allowing the out-of-root path to survive across registry loads. This vulnerability enables an attacker who can influence Prompt.name or Prompt.version to write arbitrary bytes to attacker-chosen writable paths on the filesystem accessible by the application process. The vulnerability is resolved in version 2.4.5.
Potential Impact
An attacker with the ability to control Prompt.name or Prompt.version can exploit this vulnerability to write arbitrary files to locations outside the intended directory. This could lead to overwriting critical files, potentially causing denial of service or enabling further attacks depending on the application context. The vulnerability requires some level of privileges (low privileges) and partial attacker interaction, and it does not require user interaction. The CVSS 4.0 score is 6.0 (medium severity).
Mitigation Recommendations
This vulnerability is fixed in masci banks version 2.4.5. Users should upgrade to version 2.4.5 or later to remediate this issue. No official patch link is provided in the advisory, but upgrading to the fixed version is the recommended action. Until upgrading, avoid forwarding untrusted input into Prompt.name or Prompt.version fields to mitigate exploitation risk.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-06T19:56:23.725Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a8729e3acd9273b49d93232
Added to database: 08/20/2026, 16:22:59 UTC
Last enriched: 08/20/2026, 16:37:35 UTC
Last updated: 10/04/2026, 18:53:18 UTC
Views: 71
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.