T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:19- Finding
Automatic Propagation of Persistent User Memory to Spawned Subagents
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 4, 19-26, and 45-51
Vulnerability Type: Excessive access to persistent memory and propagation across agent boundaries
Risk Level: MediumRelevant Code Snippets
SKILL.md:4:yaml metadata: {"openclaw":{"requires":["sessions_spawn","read","memory_search"]}}SKILL.md:19-26(English translation of the audited instructions):text Step 1: Collect parent context Context to inject: 1. Current task goals and constraints 2. Relevant file paths and key code snippets 3. Decisions already made and their reasons 4. User preferences extracted from MEMORY.md 5. Project structure summarySKILL.md:45-51:yaml sessions_spawn: runtime: "subagent" mode: "run" task: "{Fork Prompt}" streamTo: "parent"Technical Analysis
The skill declares
readandmemory_searchcapabilities and instructs the parent agent to extract user preferences from persistentMEMORY.mddata. It then places the collected information into a fork prompt supplied tosessions_spawn.This behavior does not enforce task-specific necessity, explicit user consent, field-level filtering, or secret redaction before information crosses from the parent context into a separate subagent context. Persistent memory can contain preferences, identifiers, prior-session details, or other information unrelated to the delegated task.
The issue represents a least-privilege violation because ordinary subagent delegation does not inherently require access to persistent user memory. The audited file does not contain executable code that independently bypasses access controls; exploitation depends on an agent loading and following these instructions while the declared tools are available.
Attack Path
- The skill is activated for a task involving a spawned subagent.
- The parent agent receives access to
read,memory_search, and `sessio ...[truncated 1077 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove automatic extraction of preferences from
MEMORY.md. - Require explicit user authorization before persistent memory is accessed or shared with a subagent.
- Grant
memory_searchandreadonly when a specific delegated task demonstrably requires them. - Construct subagent prompts from a strict allowlist of task-essential fields rather than copying broad parent-session context.
- Add mandatory redaction for credentials, authentication tokens, personal identifiers, private conversation content, and unrelated project data.
- Present the proposed context to the user for approval when it may contain persistent or sensitive information.
- Document a default rule prohibiting memory propagation; permit exceptions only when necessity and scope are explicitly stated.
- Add tests verifying that unrelated memory entries are not included in spawned-agent prompts.
- Remove automatic extraction of preferences from
