T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:38
- Finding
- Overly Broad Cross-Session Memory Access and Persistent Retention<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 38–40 and 74–76 **Vulnerability Type**: Excessive access to shared memory and potentially sensitive historical records **Risk Level**: Medium ### Vulnerable Code ```markdown - Read `memory/tier1-public/` for all skill stats and public knowledge entries - Read `memory/concepts/` for concept files stored from previous sessions - Read recent daily notes: `memory/YYYY-MM-DD.md` (last 7 days) ``` ```markdown Use `complex-memory-manager` to store the summary: - T1: `memory/tier1-public/concepts-summary-YYYY-MM.md` (concept names, relationships, categories) - T2: `memory/tier2-internal/concepts-detail-YYYY-MM.md` (detailed notes, sources, encrypted if personal) ``` ### Technical Analysis The workflow directs the Agent to read entire shared-memory directories and seven days of daily notes without first limiting access to the current user, conversation, or requested topic. Daily notes and concept records may contain information unrelated to the immediate request, including personal or confidential context from previous interactions. The collected information is subsequently summarized and written to persistent Tier 1 and Tier 2 records. This creates a secondary copy of historical data and may cause private details to be retained or surfaced outside their original context. The instruction states that personal Tier 2 content should be encrypted, but the actual storage and encryption behavior is delegated to the external `complex-memory-manager` Skill. That dependency was not included in the audited project, so its access controls and encryption guarantees could not be verified. ### Attack Path 1. A user or other requester invokes the concept-summarization workflow. 2. The Agent reads all entries in `memory/tier1-public/`, `memory/concepts/`, and the previous seven days of daily notes. 3. The broad scan encounters information unrelated to the request or belonging to a different conversational ...[truncated 1038 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Require explicit user consent before reading daily notes or records from previous sessions. 2. Restrict memory reads by authenticated user, conversation identifier, requested date range, and topic. 3. Retrieve only relevant indexed records instead of scanning complete directories. 4. Treat daily notes and Tier 2 records as private by default and exclude them from public summaries. 5. Present a preview of extracted concepts and proposed storage destinations before persistence. 6. Apply data-minimization rules that remove credentials, personal identifiers, financial information, and unrelated private content. 7. Enforce authorization checks in the storage layer rather than relying only on natural-language Skill instructions. 8. Define retention periods and provide deletion mechanisms that remove both source records and derived summaries. 9. Pin and independently audit `complex-memory-manager`; verify that Tier 2 encryption is authenticated, uses securely managed keys, and is enforced rather than optional. 10. Record privacy-preserving audit logs identifying which records were read and written without recording their sensitive contents. ]]>
