T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:39- Finding
Overly Broad Read, Search, and Modification Access to Persistent Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:39-60, with supporting permission and modification instructions atSKILL.md:163-168andSKILL.md:176-180
Vulnerability Type:T05: Unauthorized Access and Privilege Escalation
Risk Level: MediumComplete Relevant Snippet
The following is an English translation of the relevant instructions in
SKILL.md:markdown ## Step 1 — Systematic Scan [Checklist Gate] A complete scan of the following three parts is mandatory. No steps may be skipped. **1.1 Scan the topics/ directory** For every `.md` file: 1. Read the frontmatter and extract `name`, `description`, `type`, and `mtime` 2. Read the complete file contents for content comparison 3. Record: `{ filename, type, mtime, content, description }` **1.2 Scan MEMORY.md** 1. Count lines and bytes 2. Parse every pointer and extract `topics/xxx.md` paths 3. Identify orphaned files: files present in topics/ but not indexed by MEMORY.md **1.3 Scan daily journals as timeline references** Scan `memory/*.md` and extract the latest conclusions to determine whether topic contents are obsolete.markdown **Authenticity validation:** Memories that reference specific files or paths must verify that the files still exist. If a file does not exist, propose deleting that memory. If a statement conflicts with current code or configuration, trust the current state and update or delete the obsolete memory.markdown ## Permission Requirements - `FileRead`: Read all memory files - `FileWrite` / `FileEdit`: Modify topics/, MEMORY.md, and daily files - `exec`: Perform global grep searches for duplicate and conflict detectionTechnical Analysis
The Skill requests systematic access to the complete persistent memory repository, including topic files, the central memory index, and daily journals. It also requests write and edit permissions over those records and comma ...[truncated 3492 chars]
- Remediation
View remediation
Remediation Suggestions
-
Constrain the filesystem scope
- Resolve a configured memory root to its canonical path before every operation.
- Permit access only to
MEMORY.md,topics/*.md, and explicitly configured daily journal files beneath that root. - Reject absolute paths,
..traversal, symbolic links, and any resolved path outside the approved root.
-
Replace unrestricted command execution
- Use bounded native file-search functionality instead of general-purpose
exec. - If
grepis unavoidable, construct arguments internally without shell interpolation, pass paths as separate arguments, include--, and provide only allowlisted canonical paths. - Do not describe the operation as a “global” search.
- Use bounded native file-search functionality instead of general-purpose
-
Reduce sensitive-data exposure
- Process comparisons locally where possible rather than reproducing complete files in model output.
- Detect and redact credentials, tokens, private keys, personal information, and other secrets before including excerpts in proposals or reports.
- Display only the minimum relevant excerpts needed to explain each finding.
-
Strengthen modification approval
- Produce an exact per-file diff before any write or deletion.
- Require explicit approval for each destructive operation, especially daily-journal modification or deletion.
- Treat general approval as insufficient for files containing detected secrets or high-sensitivity data.
-
Provide recovery controls
- Create timestamped backups before modifying persistent memory.
- Use atomic writes and verify both syntax and readability after each change.
- Provide a rollback command and retain the backup until the user confirms the result.
-
Limit deletion heuristics
- Do not delete a memory merely because a referenced path is absent.
- Distinguish between invalid claims, intentionally historical records, temporarily unavailable paths, and references ...[truncated 407 chars]
-
