<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-30T17:44:20.200446+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://db.gcve.eu/vuln/cve-2026-71492</id>
    <title>CVE-2026-71492 — Banks: Path traversal in `DirectoryPromptRegistry.set()` allows arbitrary file write outside the registry root</title>
    <updated>2026-09-30T17:44:20.238229+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> masci banks</p>
<p>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.</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/cve-2026-71492"/>
  </entry>
  <entry>
    <id>https://db.gcve.eu/vuln/ghsa-x8wg-4xgc-vr54</id>
    <title>GHSA-x8wg-4xgc-vr54 — Banks: Path traversal in `DirectoryPromptRegistry.set()` allows arbitrary file write outside the registry root</title>
    <updated>2026-09-30T17:44:20.238347+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: banks</p>
<p>## Summary</p>
<p>`DirectoryPromptRegistry.set()` interpolates the attacker-controllable `Prompt.name` into a `Path` expression with no canonicalization. An application that derives the prompt name from request data lets a caller write attacker-controlled bytes outside the configured registry directory.</p>
<p>## Details</p>
<p>`src/banks/registries/directory.py:44`</p>
<p>```python
prompt_file = path / f"{prompt.name}.{prompt.version}.jinja"
prompt_file.write_text(prompt.raw)
```</p>
<p>Two failure modes:</p>
<p>1. **Relative traversal.** `name="../victim/foo"` resolves to `&lt;registry&gt;/../victim/foo.0.jinja` — outside the configured root.
2. **Absolute-path bypass.** `pathlib` documents that `Path("/a") / Path("/b")` returns `Path("/b")`. So `name="/abs/path"` discards the registry root entirely; the registry is never consulted.</p>
<p>The poisoned `name` is then persisted to `index.json`, so the out-of-root path keeps reconstructing on later `_load()` calls (`directory.py:135-141`). With `overwrite=True`, existing files at the target path are replaced.</p>
<p>## Proof of Concept</p>
<p>```python
import tempfile
from pathlib import Path
from banks import Prompt
from banks.registries import DirectoryPromptRegistry</p>
<p>work = Path(tempfile.mkdtemp())
registry = work / "registry"; registry.mkdir()
victim   = work / "victim";   victim.mkdir()</p>
<p>reg = DirectoryPromptRegistry(str(registry))</p>
<p># (1) Relative traversal
reg.set(prompt=Prompt("pwn", name="../victim/pwned", version="0"))
print((victim / "pwned.0.jinja").read_text())…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-x8wg-4xgc-vr54"/>
  </entry>
</feed>
