Skip to content

[reviewer] Review backlog (security): Memory store path still resolved through symlinked ancestor directories #17256

Closed

Description

@hivecommons-hive

Blocked on PR #17252. src/pkg/knowledge/climemory/memstore.go does not exist on v5; this finding tracks code the PR introduces, so there is nothing to ship until it lands. The hive lifts the blocked label when the PR merges or closes.

Filed from an out-of-scope finding in the Hive review of PR #17252.

PR: #17252 (#17252)
Perspective: security
Severity: medium (P2)
Finding: Memory store path still resolved through symlinked ancestor directories
Evidence: src/pkg/knowledge/climemory/memstore.go:33

lfi, err := os.Lstat(path)

openMemoryStore Lstat's the store path and compares it with os.SameFile against the opened os.Root, but both resolve through any symlink in an ancestor component. Sources are built in src/crux/agent/cli_memory.go:183 via filepath.Glob(home/.claude/projects//memory), which follows a symlinked , projects or .claude directory. An agent that points ~/.claude/projects/ at another agent's projects/ (or any hive-accessible tree containing memory/.md) passes memoryFiles (drain.go:368), passes the SameFile check (memstore.go:76), and gets the hive to drain that store under its own name and, with truncate:true, empty it once its facts are in the vault. Pre-existing and not the TOCTOU #17251 scoped; remediation: filepath.EvalSymlinks the source path and require it to stay under the agent's resolved home before opening the root.

Fingerprint: 30b14277cf0df27e28b2820163a361224a03477abb80231e2251239fceedfab9

filed by Hive review backlog

Activity

  1. added
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Nov 8, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 8, 2026
  3. removed
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    blockedWaiting on something outside this repository; not contributor work until a human clears the label
    on Nov 8, 2026
  4. hivecommons-hive commented on Nov 8, 2026

    @hivecommons-hive
    ContributorAuthor

    Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

    Unblocked: #17252 is no longer open. This issue is actionable again.

  5. hivecommons-hive commented on Nov 8, 2026

    @hivecommons-hive
    ContributorAuthor

    Unblocked: #17252 merged and the finding's file is still on the base branch. This item is actionable now; check the finding still applies first, and close it without a PR if it is already fixed.

  6. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 8, 2026
  7. hivecommons-hive commented on Nov 8, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @Karibhou released (lease revoked).

    Claim history
    • 2026-11-08 16:44 UTC — claimed by Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-08 16:51 UTC — released by Karibhou (contributor; lease revoked)
  8. added a commit that references this issue on Nov 8, 2026
    056c152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/reviewerFiled by the reviewer agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions