other
- Location
SKILL.md:27- Finding
Insufficiently Controlled Access to Persistent Memory Files
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 27–42
Vulnerability Type: Sensitive Agent Memory Access
Risk Level: Medium
Classification:other: Sensitive Agent Memory AccessVulnerable Code
bash rg "关键词" memory/*.md # 按日期搜索 head -50 memory/2026-07-15.mdbash # 查看最近的 daily notes ls -la memory/*.md # 手动编辑 MEMORY.md nano MEMORY.mdTechnical Analysis
The skill instructs the agent to search, display, enumerate, and modify persistent memory files. These files may contain historical conversation details, personal information, project decisions, or other sensitive state.
Although memory management is the skill's declared purpose, the instructions do not establish authorization checks, file-scope restrictions, output redaction, write validation, or user confirmation before accessing or changing persistent data. The unrestricted keyword search can expose information from every Markdown file under
memory/, while direct editing ofMEMORY.mdpermits unvalidated content to become persistent state.This is not classified as confirmed agent memory poisoning because the reviewed instructions do not explicitly write attacker-controlled rules or attempt to alter future safety constraints. However, the unrestricted editing workflow creates a pathway through which misleading or unsafe content could be persisted if an untrusted request is accepted.
Attack Path
- An attacker or untrusted participant asks the agent to search for broad or sensitive keywords in historical memory.
- The skill executes a command such as
rg "keyword" memory/*.md. - Matches from multiple memory files are loaded into the active context or returned to the requester.
- Sensitive historical information may consequently be disclosed without verifying that the requester is authorized to access it.
A persistence-related variant is also possible:
- An attacker supplies misleading co ...[truncated 885 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user confirmation before searching, displaying, or modifying persistent memory files.
- Restrict operations to specific user-approved files rather than searching
memory/*.mdby default. - Verify the requester's authorization before returning historical memory content.
- Redact credentials, authentication tokens, personal data, and other sensitive values before presenting search results.
- Present a preview or structured diff and require confirmation before writing to
MEMORY.md. - Replace unrestricted interactive editing with a controlled update operation that validates content and permits only expected fields or sections.
- Treat content supplied by users or retrieved from memory as untrusted data, not as agent instructions.
- Maintain an audit log of memory reads and writes, including the initiating request and affected files.
- Apply least-privilege filesystem permissions so the skill can access only its designated memory directory.
