CVE-2026-71492
MEDIUM 6.0CVSS 4.0Banks: Path traversal in `DirectoryPromptRegistry.set()` allows arbitrary file write outside the registry root
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.
- Published
- 20 Aug 2026
- Last modified
- 18 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-22
- Also known as
- GHSA-x8wg-4xgc-vr54PYSEC-2026-3810
- Sources
- NVDJSONOSV GHSA-x8wg-4xgc-vr54JSONOSV PYSEC-2026-3810JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 6.0 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 | |
| OSV | PyPA | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | banks | < 2.4.5 | 2.4.5 |
References
- https://github.com/masci/banks/commit/a215f6d779966945c56e0af5abed1ae5916fd9d3 · WEB
- https://github.com/masci/banks/pull/77 · WEB
- https://github.com/masci/banks/releases/tag/v2.4.5 · WEB
- https://github.com/masci/banks/security/advisories/GHSA-x8wg-4xgc-vr54 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-71492 · ADVISORY
- https://github.com/masci/banks · PACKAGE
- https://pypi.org/project/banks · PACKAGE
- https://github.com/advisories/GHSA-x8wg-4xgc-vr54 · ADVISORY
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 20 Aug 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 10 Sep 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 2 Sep 2026)