{"answers":{"affected":"3 open source packages ship an affected version, including banks.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-71492 exists.","fix":"Upgrade banks to 2.4.5 or later.","what":"CVE-2026-71492 is a medium-severity path traversal vulnerability in masci banks, published on 20 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-71492 and fix it if it is affected.\n\nWhat it is: CVE-2026-71492 is a medium-severity path traversal vulnerability in masci banks, published on 20 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-71492 exists.\n\nAffected packages and fixed versions:\n- banks (PyPI): affected all versions; fixed in 2.4.5\n- banks (PyPI): affected all versions; fixed in 2.4.5\n- banks (PyPI): affected all versions; fixed in 2.4.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-71492/ (Markdown: https://insights.sbomify.com/CVE-2026-71492/index.md)","id":"CVE-2026-71492","markdown":"https://insights.sbomify.com/CVE-2026-71492/index.md","name":"CVE-2026-71492","record":{"aliases":["GHSA-x8wg-4xgc-vr54","PYSEC-2026-3810"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Python LLM prompt library","requires_auth":"low_privilege","summary":"Attackers can write arbitrary files outside the registry root via path traversal in DirectoryPromptRegistry.set(), potentially compromising the application process.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6,"severity":"medium","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Banks: Path traversal in `DirectoryPromptRegistry.set()` allows arbitrary file write outside the registry root","id":"CVE-2026-71492","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":4,"next":{"headline":"Infracost: Arbitrary file read via config-template readFile symlink traversal","id":"CVE-2026-71493"},"packages":[{"ecosystem":"PyPI","fixed":["2.4.5"],"introduced":["0"],"last_affected":[],"package":"banks","purl":null,"source":"GHSA-x8wg-4xgc-vr54"},{"ecosystem":"PyPI","fixed":["2.4.5"],"introduced":["0"],"last_affected":[],"package":"banks","purl":"pkg:pypi/banks","source":"GHSA-x8wg-4xgc-vr54"},{"ecosystem":"PyPI","fixed":["2.4.5"],"introduced":["0"],"last_affected":[],"package":"banks","purl":"pkg:pypi/banks","source":"PYSEC-2026-3810"}],"prev":{"headline":"sqlparse: Quadratic O(n²) DoS in group_comments","id":"CVE-2026-71491"},"products":["banks"],"published":"2026-08-20","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-08-20","vendors":["masci"]},"summary":"Attackers can write arbitrary files outside the registry root via path traversal in DirectoryPromptRegistry.set(), potentially compromising the application process.","url":"https://insights.sbomify.com/CVE-2026-71492/"}