T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:269- Finding
Unrestricted Access to an External Persistent Agent Memory File
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 269-275
Vulnerability Type: Hard-coded access to persistent Agent state outside the Skill workspace
Risk Level: MediumVulnerable Code Snippet
The following is an English rendering of the complete affected instruction block:
markdown ### Daily routine (09:35 automated task V2) 1. Read `c:\Users\a\WorkBuddy\20260406104955\.workbuddy\memory\MEMORY.md` to obtain the portfolio snapshot. 2. Query the latest estimated and official net asset values of eight funds. 3. Calculate daily return, cumulative return, and total asset changes. 4. Scan broad-market conditions, including the Shanghai Composite, ChiNext, trading volume, and northbound capital. 5. Check whether significant news or policy changes affect the holdings. 6. Generate and save a standardized report as `Daily_Monitoring_YYYYMMDD.md`.Technical Analysis
The Skill instructs the Agent to read a hard-coded persistent memory file located outside the project directory. Persistent Agent memory may contain unrelated conversation history, private user information, credentials, operational instructions, or state belonging to another workspace.
This violates least-privilege principles because portfolio analysis does not inherently require unrestricted access to global or cross-session Agent memory. The broad
Read,Write, andBashpermissions declared atSKILL.md:7increase the likelihood that the instruction can be carried out in an environment that does not enforce workspace isolation.No instruction to transmit the memory contents to an external destination was identified. The confirmed issue is unauthorized or unnecessarily broad local data access, not confirmed exfiltration.
Attack Path
- A user or automated process activates the Skill.
- The daily routine is invoked.
- The Agent follows the hard-coded instruction and opens the external
MEMORY.mdfile. - Info ...[truncated 766 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the hard-coded absolute path to persistent Agent memory.
- Require the user to select or provide a portfolio file explicitly for each workspace.
- Restrict file reads and writes to a dedicated Skill-owned directory.
- Request explicit user confirmation before accessing any persistent memory or file outside the project workspace.
- Validate the resolved file path against an allowlisted base directory and reject path traversal or symbolic-link escapes.
- Remove
Bashpermission unless a documented feature requires command execution. - Separate portfolio state from general Agent memory and store only the minimum fields required for analysis.
- Prevent generated reports from including unrelated memory content through strict field-level parsing and output filtering.
