Skip to content

memory_export/memory_import accept arbitrary paths outside the memory root #24

Closed

Description

@abogartz

Part of #83.

Found by the 2026-10-21 security review (SECURITY-REVIEW-2026-10-21.md, finding F8).

memory_export Bun.writes to any path the caller names (parent dirs auto-created) — e.g. file: "~/.zshrc" or ~/.gitconfig; memory_import reads any path. A steered model only needs the path: export content carries memory text (partially attacker-influenced), and import reflection (counts, blocked-row reasons, viewer visibility) is a slow read/exfil channel.

Fix direction (P1): resolve (realpath) and require export targets under <memoryRoot>/exports and import targets under memoryRoot(); reject otherwise with a message pointing at the default location. Same containment pattern as #21.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. added
    store-security
    on Oct 24, 2026
  3. self-assigned this
    on Oct 27, 2026
  4. abogartz-opencode-self-improvement commented on Oct 27, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.14.11 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugreleasedstore-security

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions