T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:26
- Finding
- Overbroad Access to Persistent User and Agent Context<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 26–34 **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: Medium ### Vulnerable Code ```markdown ### 2. Check Intention Sources (priority order) 1. **User profile goals** — declared priorities (USER.md or equivalent) 2. **Active topic context** — what domain they're working in 3. **Recent memory** — last 2-3 days of decisions and conversation 4. **Project/task state** — what's in progress, blocked, or overdue 5. **Conversational momentum** — what they've been circling around Cross-reference at least 2 sources before inferring intention. Don't infer from a single data point. ``` ### Technical Analysis The skill instructs the agent to consult persistent user profiles, recent memory, conversational history, and project state for every non-trivial request. Because the skill is marked `user-invocable: false`, this contextual access may occur automatically rather than following an explicit invocation or consent decision. Mandatory cross-referencing of at least two sources can cause the agent to retrieve information beyond what is necessary for the current task. This conflicts with least-privilege and data-minimization principles: a clear request may not require access to `USER.md`, unrelated recent conversations, or broader project state. The reviewed files do not contain code that independently bypasses operating-system permissions. Exploitation therefore depends on the host agent already having access to these context sources. The weakness is an instruction-level expansion of access scope rather than an OS-level privilege-escalation primitive. ### Attack Path 1. The host loads the non-user-invocable skill automatically. 2. A user submits a non-trivial request, including one that is already sufficiently clear. 3. The skill directs the agent to inspect at least two contextual sources. 4. The agent reads persistent profile data, recent memory, conve ...[truncated 1048 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Require explicit user consent before accessing persistent profiles, long-term memory, or unrelated project state. 2. Replace mandatory cross-referencing with a relevance-based rule that uses additional sources only when the immediate request is materially ambiguous. 3. Prefer current-request and active-topic context before consulting persistent data. 4. Apply data minimization by retrieving only the specific fields needed to resolve the identified ambiguity. 5. Prohibit including sensitive contextual details in output unless they are necessary and the user has authorized their use. 6. Document which context sources the skill may access and provide a configuration option to disable profile or memory access. 7. Add a guard such as: “Do not read persistent memory or user-profile files when the request is already clear or when those sources are not directly relevant.” ]]>
