T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:20- Finding
Excessive Cross-Repository Memory Access
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20-26
Vulnerability Type: Violation of least-privilege access boundaries
Risk Level: MediumVulnerable Code
md ### Step 0: Multi-Repo Discovery - **Scan ALL memory bank locations:** - `~/.openclaw/workspace/memory-bank/` (workspace) - `~/.openclaw/workspace/code/*/memory-bank/` (project repos: timesarrow, mb-core, etc.) - **Identify active project:** Determine which repo the current work belongs to - **Prevent duplicates:** Check if task already exists in another repo's memory-bankTechnical Analysis
The skill explicitly instructs the agent to scan the global workspace memory bank and all project repositories under a wildcard path. This behavior is not restricted to the repository relevant to the current task.
Such broad discovery violates the principle of least privilege: a project-specific analysis generally requires access only to the active project's files. Loading unrelated memory banks into the agent's context may expose private task descriptions, implementation plans, session records, architectural information, or other cross-project metadata.
The approval requirement later in the skill applies to proposed modifications, but it does not require informed user approval before this broad read operation occurs. No network transmission or external exfiltration mechanism was identified.
Attack Path
- A user invokes the
mem-scanskill for an ordinary project-specific task. - The skill directs the agent to enumerate the global memory bank and every repository matching
~/.openclaw/workspace/code/*/memory-bank/. - The agent reads and correlates records belonging to projects unrelated to the active task.
- Sensitive cross-project information may enter the current analysis context.
- Details derived from unrelated repositories may subsequently appear in relevance matrices, recommendations, or summary reports.
This path depends on the agent already possessing ...[truncated 792 chars]
- A user invokes the
- Remediation
View remediation
Remediation Suggestions
- Restrict discovery to the active repository's
memory-bank/directory by default. - Remove wildcard scanning of
code/*/memory-bank/from the automatic workflow. - Require explicit, informed user approval before accessing the global memory bank or any additional repository.
- Present the exact paths to be scanned and allow the user to approve or reject each location.
- Implement a repository allowlist and reject paths outside the approved project scope.
- Apply canonical-path validation to prevent traversal or symbolic-link expansion beyond approved roots.
- Minimize loaded content by searching only metadata or filenames first, then requesting approval before reading matching documents.
- Redact credentials, personal data, and unrelated project details from analysis output.
- Record which repositories were accessed so users can verify that the scan remained within the authorized scope.
- Restrict discovery to the active repository's
