T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:82- Finding
Overbroad Access to Persistent Agent Memory Files
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 82
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: MediumCode Snippet:
text 1. 读取用户记忆文件(`MEMORY.md`/`USER.md`)获取博客配置Technical Analysis
The skill instructs the agent to read the general-purpose persistent files
MEMORY.mdandUSER.mdto obtain a blog configuration. These files may contain unrelated user preferences, personal information, credentials, conversation-derived state, or configuration for other tasks.Reading entire persistent memory files is not necessary for the stated publishing workflow and violates least-privilege principles. The required blog path could instead be supplied explicitly or stored in a dedicated, narrowly scoped configuration file. The skill does not define field-level allowlisting, content minimization, or authorization checks before this access occurs.
The audit found no instruction to exfiltrate the retrieved information. The risk is unnecessary exposure of persistent user information to the active agent context, where it could be accidentally incorporated into generated content, logs, tool arguments, or subsequent operations.
Attack Path
- A user invokes the Hugo publishing skill.
- Following the documented workflow, the agent opens
MEMORY.mdorUSER.md. - The file contains both the desired blog path and unrelated sensitive information.
- The entire content becomes available in the active execution context.
- Unrelated information may then be accidentally disclosed through generated articles, command arguments, diagnostic output, or later context processing.
Impact Assessment
Exploitation could expose information stored in persistent agent or user-memory files to the current skill execution context. The scope is limited to files the executing agent can already read; the instruction does not itself grant operating-system privileges or bypass filesy ...[truncated 330 chars]
- Remediation
View remediation
Remediation Suggestions
- Require the blog path to be provided as an explicit skill argument.
- Alternatively, use a dedicated configuration file such as
.hugo-publisher.jsoncontaining only required fields. - Do not read
MEMORY.mdorUSER.mdby default. - If memory access is unavoidable, request explicit user confirmation and read only a specifically identified, allowlisted configuration field.
- Validate that the resolved blog path points to the intended Hugo repository before writing files or running Git commands.
- Ensure sensitive values are excluded from generated content, logs, command output, and Git commits.
