Banks
Banks: Symlink traversal and arbitrary file disclosure/overwrite in DirectoryPromptRegistry
Banks generates meaningful LLM prompts using a simple template language. Prior to 2.5.1, Banks DirectoryPromptRegistry does not reject symbolic links for index.json or discovered and existing .jinja prompt files. In an application where untrusted users can influence a prompt directory, DirectoryPromptRegistry._scan() and DirectoryPromptRegistry.get() can follow a link outside the registry root and disclose a file, while DirectoryPromptRegistry.set(), DirectoryPromptRegistry._save(), and DirectoryPromptRegistry._load() can read or overwrite an external link target. The issue requires attacker influence over the registry directory or its extracted contents. This issue is fixed in version 2.5.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.5.1
Fixed in 2.5.1
Mitigation
Upgrade banks to 2.5.1 or later.
References
- Vendor advisory github.com/masci/banks/security/advisories/GHS…
- Patch github.com/masci/banks/pull/79
- Patch github.com/masci/banks/commit/23ed13e50b4e2176…
1 more
- Release notes github.com/masci/banks/releases/tag/v2.5.1
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.