[BUG] Unmaintained pybars3 dependency affected by CVE-2026-119716
Bug Description
Basic Memory depends on pybars3>=0.9.7, affected by CVE-2026-119716 / GHSA-xvx4-89q3-mchg: code injection when an attacker controls template source. The upstream maintainer confirmed the project is unsupported.
Steps To Reproduce
- Inspect Basic Memory’s
pyproject.toml: it declarespybars3>=0.9.7. - Package it with nixpkgs revision
d7fd575ad7d219b001faaa8234a153d8a96443a4, which markspybars3-0.9.7insecure due to this CVE. - An explicit insecure-package exception is required to allow that dependency. These steps demonstrate the packaging issue, not exploitation of Basic Memory.
Expected Behavior
Basic Memory can be installed without allowing a dependency with a known, unresolved vulnerability.
Actual Behavior
Our Nix configuration requires permittedInsecurePackages = [ "python3.14-pybars3-0.9.7" ]; to permit this dependency.
Environment
- OS: macOS
- Python dependency set: Python 3.14 (Nix)
- Installation method: NUR package via nix-darwin
Additional Context
The inspected prompt endpoints compile two fixed built-in templates, passing user input as context rather than template source. This report does not establish an exploitable RCE in Basic Memory.
Usage appears limited to api/template_loader.py, its calls in api/v2/routers/prompt_router.py, and templates/prompts/{continue_conversation,search}.hbs. Related: #1731 documents pybars/pymeta import overhead.
Possible Solution
Replace the two templates with Jinja2 (declared as a direct dependency), or small Python formatting functions as already used by the MCP search and continuation prompts. Preserve existing prompt output and remove pybars3 from the dependency graph.
Switching to pybars4 alone is not a verified fix: its version 0.9.13 is also affected according to the linked advisory.