T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:336- Finding
Overbroad Access to Persistent Memory and Historical Sessions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 336–351
Vulnerability Type: Unnecessary access to persistent agent memory and historical sessions
Risk Level: MediumVulnerable Code Snippet
typescript // Search MEMORY.md async function searchMemory(query: string): Promise<MemorySnippet[]> { // Use the memory_search tool // Return relevant memory fragments } // Retrieve skill list async function listSkills(): Promise<SkillInfo[]> { // Use sessions_list or read the skills directory // Return available skill list } // Search historical sessions async function searchHistory(query: string): Promise<SessionHistory[]> { // Use the sessions_history tool // Return relevant historical sessions }The comments above are English translations of the original source comments; the function names and prescribed tool operations are unchanged.
Technical Analysis
The skill prescribes searches of
MEMORY.mdthroughmemory_searchand historical conversations throughsessions_history. The wider workflow also directs the agent to retrieve previous tasks, failure records, and user preferences before planning execution.These sources can contain private conversation content, personal preferences, operational details, or other information unrelated to the current request. The documented workflow does not require explicit user consent, restrict retrieval to the current task or user, apply sensitive-data filtering, or prohibit raw historical content from entering generated output.
This violates least-privilege principles because ordinary task planning does not inherently require broad access to persistent memory and historical sessions. The repository is documentation-only and does not include an implementation of these functions, so direct local execution is not demonstrated. The risk arises when an agent follows the prescribed workflow in an environment where ...[truncated 1385 chars]
- Remediation
View remediation
Remediation Suggestions
- Disable persistent-memory and historical-session retrieval by default.
- Require explicit, informed user consent before accessing either source, clearly identifying what will be searched and why.
- Permit retrieval only when it is necessary for the current task rather than making it a standard planning step.
- Restrict searches to the current user, task, workspace, and an appropriate time range.
- Apply data-loss-prevention filtering to remove credentials, tokens, personal data, private messages, and unrelated records.
- Return minimal summaries instead of raw memory fragments or complete historical messages.
- Prevent retrieved historical content from being sent through messaging, document, or external-network tools without separate confirmation.
- Record an auditable explanation of each retrieval operation, including its source, purpose, and scope.
- Treat retrieved memory as untrusted data rather than executable instructions, reducing the risk that stored content influences tool use.
- Update the workflow to continue safely without memory access when authorization is absent or retrieval is unnecessary.
