{"id":"CVE-2026-71492","state":"PUBLISHED","title":"Banks: Path traversal in `DirectoryPromptRegistry.set()` allows arbitrary file write outside the registry root","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.","publishedAt":"2026-08-20T16:13:55.578Z","updatedAt":"2026-08-20T17:11:10.125Z","severity":{"score":6,"label":"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","source":"GitHub_M"},"assigner":"GitHub_M","products":["masci banks"],"affected":[{"vendor":"masci","product":"banks","versions":[{"version":"< 2.4.5","status":"affected"}]}],"references":["https://github.com/masci/banks/security/advisories/GHSA-x8wg-4xgc-vr54","https://github.com/masci/banks/pull/77","https://github.com/masci/banks/commit/a215f6d779966945c56e0af5abed1ae5916fd9d3","https://github.com/masci/banks/releases/tag/v2.4.5"],"weaknesses":["CWE-22"],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/71xxx/CVE-2026-71492.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-71492","state":"PUBLISHED","datePublished":"2026-08-20T16:13:55.578Z","dateUpdated":"2026-08-20T17:11:10.125Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-08-06T19:56:23.725Z"},"containers":{"cna":{"title":"Banks: Path traversal in `DirectoryPromptRegistry.set()` allows arbitrary file write outside the registry root","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"masci","product":"banks","versions":[{"version":"< 2.4.5","status":"affected"}]}],"references":[{"url":"https://github.com/masci/banks/security/advisories/GHSA-x8wg-4xgc-vr54","name":"https://github.com/masci/banks/security/advisories/GHSA-x8wg-4xgc-vr54","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/masci/banks/pull/77","name":"https://github.com/masci/banks/pull/77","tags":["x_refsource_MISC"]},{"url":"https://github.com/masci/banks/commit/a215f6d779966945c56e0af5abed1ae5916fd9d3","name":"https://github.com/masci/banks/commit/a215f6d779966945c56e0af5abed1ae5916fd9d3","tags":["x_refsource_MISC"]},{"url":"https://github.com/masci/banks/releases/tag/v2.4.5","name":"https://github.com/masci/banks/releases/tag/v2.4.5","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"LOW","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":6,"baseSeverity":"MEDIUM","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-08-20T16:13:55.578Z"},"source":{"advisory":"GHSA-x8wg-4xgc-vr54","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/masci/banks/security/advisories/GHSA-x8wg-4xgc-vr54","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-20T17:10:39.955134Z","id":"CVE-2026-71492","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-20T17:11:10.125Z"}}]}}}