T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:44
- Finding
- Mandatory Access to Workspace-Wide Persistent Agent Memory<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:44-57` **Vulnerability Type**: Excessive access to shared user profiles, session history, and long-term memory **Risk Level**: Medium ### Vulnerable Instruction Segment ```text At execution start: - Read /workspace/memory/profiles/user_profile.json - Read /workspace/memory/sessions/index.json - Search the memory/ directory for previous interactions During execution: - Record which options the user selected - Record user preferences, such as detailed or concise output - Record the monitored industry After execution: - Update /workspace/memory/profiles/user_profile.json - Update /workspace/memory/sessions/index.json ``` The same behavior is made mandatory at `SKILL.md:161-176`, including searching `MEMORY.md` and updating it when the Skill considers information important. ### Technical Analysis The Skill requires the hosting agent to inspect workspace-level profile, session, and long-term memory on every execution. This access is not limited to a Skill-specific namespace, the active user, the current session, or information necessary for the requested task. Searching the entire `memory/` directory can bring unrelated interaction history into the active context. The mandatory writes also modify persistent shared state without defining: - User consent requirements. - User or tenant isolation. - Data minimization rules. - Input validation or trust boundaries. - Retention and deletion controls. - Protection against untrusted content being propagated to future sessions. The instructions do not explicitly require storing attacker-authored safety overrides, so this is not classified as confirmed agent memory poisoning. However, the mandatory workspace-wide reads and persistent writes violate least-privilege principles. ### Attack Path 1. A user invokes the Skill for an ordinary hotspot-monitoring or content-generation request. 2. The Skill automatically reads the workspace profile and session i ...[truncated 1076 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make personalization and persistent memory access opt-in rather than mandatory. 2. Use a Skill-specific and user-specific storage root, for example: ```text /workspace/memory/skills/ai-collaboration-system/users/{validated-user-id}/ ``` 3. Do not search the entire workspace memory directory. Read only explicitly enumerated files needed for the current task. 4. Require explicit user confirmation before writing profile information, session history, or long-term memory. 5. Treat retrieved memory as untrusted data rather than authoritative instructions. 6. Validate and normalize all stored fields, enforce length limits, and reject instruction-like content from fields intended only for preferences or metadata. 7. Add tenant isolation, access controls, retention periods, deletion support, and an audit log of memory reads and writes. 8. Avoid recording sensitive personal data unless it is strictly required and the user has consented. ]]>
