{"id":"CVE-2026-71492","published":"2026-08-20T16:13:55Z","modified":"2026-08-20T17:11:10Z","title":"Banks: Path traversal in `DirectoryPromptRegistry.set()` allows arbitrary file write outside the registry root","vendor":"masci","product":"banks","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6,"severity":"MEDIUM","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00474,"percentile":0.41893,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/masci/banks/security/advisories/GHSA-x8wg-4xgc-vr54","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/masci/banks/pull/77","tags":["x_refsource_MISC"]},{"url":"https://github.com/masci/banks/commit/a215f6d779966945c56e0af5abed1ae5916fd9d3","tags":["x_refsource_MISC"]},{"url":"https://github.com/masci/banks/releases/tag/v2.4.5","tags":["x_refsource_MISC"]}],"priority":{"score":12.6,"factors":[{"name":"EPSS percentile","points":8.38},{"name":"CVSS severity","points":4.2}]},"vendorSlug":"masci","affectedVersions":[{"vendor":"masci","product":"banks","versions":["< 2.4.5"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-08-20T17:10:39.955134Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"banks","vulnerableRanges":["<2.4.5"],"patched":["2.4.5"],"from":["GHSA-x8wg-4xgc-vr54","PYSEC-2026-3810"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-63414","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-masci-banks-cve-2026-71492","children":[{"from":"CVE-2026-71492","to":"CVE-2026-107716","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/banks/registries/directory.py"],"commits":["https://github.com/masci/banks/commit/23ed13e50b4e217693fa5f9c30943fac8a41582f","https://github.com/masci/banks/commit/a215f6d779966945c56e0af5abed1ae5916fd9d3"],"basis":"shared function","functions":["from_prompt_path"]}]}],"packageHistory":[{"cve":"CVE-2026-44209","published":"2026-05-26","fixed":"2.4.2","kev":false},{"cve":"CVE-2026-61536","published":"2026-07-30","fixed":"2.4.3","kev":false,"link":{"from":"CVE-2026-61536","to":"CVE-2026-71492","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:banks","fromFixed":"2.4.3","toFixed":"2.4.5","daysApart":21}]}},{"cve":"CVE-2026-71492","published":"2026-08-20","fixed":"2.4.5","kev":false},{"cve":"CVE-2026-107717","published":"2026-10-08","fixed":"2.5.0","kev":false,"link":{"from":"CVE-2026-71492","to":"CVE-2026-107717","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:banks","fromFixed":"2.4.5","toFixed":"2.5.0","daysApart":49}]}},{"cve":"CVE-2026-107716","published":"2026-10-08","fixed":"2.5.1","kev":false}],"package":"PyPI:banks"}}