Path Traversal in banks (CVE-2026-107716)
Summary
Path traversal in banks (CVE-2026-107716). Risk of unauthorized operations or information disclosure. Exploitable via banks.registries.DirectoryPromptRegistry. Mitigation: upgrade to 2.5.1 or later.
Original description
The description as published by the source.
Summary
In banks.registries.DirectoryPromptRegistry, prompt file paths and the index file (index.json) do not refuse symbolic links. When a prompt directory contains or accepts untrusted files (e.g. unpacked archives, shared repositories, or multi-tenant folders), symbolic links pointing outside the registry root can be used to disclose arbitrary files via _scan() / get() or overwrite arbitrary files via set() / _save().
Details
Following PR #77, DirectoryPromptRegistry validates path resolution for prompt names. However:
self._index_path(index.json) is not checked for symbolic links. A symlink pointing to an external target (e.g. a configuration file) will be overwritten by_save()uponreg.set(), or read via_load().- In
_scan(), discovered.jinjafiles are opened and indexed without checking ifpath.is_symlink()or if the resolved path escapes the registry root. A symlink pointing to a sensitive file outside the root is read and indexed. - In
set(),prompt_file.write_text(...)is called without checking ifprompt_fileis an existing symbolic link pointing outside the root.
Impact
Arbitrary file disclosure (CWE-59 / CWE-200) and arbitrary file overwrite (CWE-59) in applications where prompt directories can be influenced by untrusted users or extracted from archives.
Proof of Concept
import os
from pathlib import Path
from banks.registries.directory import DirectoryPromptRegistry, DEFAULT_INDEX_NAME
from…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-107716 has been found in banks.
Attackers can target a specific entry point like banks.registries.DirectoryPromptRegistry over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade banks to 2.5.1 or later.
If unsure, ask your IT team or search "banks CVE-2026-107716" on the vendor's site.
CVE-2026-107716 (banks) — CWE-22
Attack surface: banks.registries.DirectoryPromptRegistry / DirectoryPromptRegistry / self._index_path / prompt_file
Patched: 2.5.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Path traversal (CWE-22) exists in banks. Attackers reach the vulnerable code path via banks.registries.DirectoryPromptRegistry.
Check the vendor advisory for the affected versions of banks. Attack surface: banks.registries.DirectoryPromptRegistry / DirectoryPromptRegistry / self._index_path / prompt_file.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 2.5.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'banks' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'banks' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
banksを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade banks to 2.5.1ステージング環境で 2.5.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。