T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/extract_creator_context.py:84- Finding
Proactive collection and disclosure of private Agent memory and user-profile data
- Content
View full analysis
Vulnerability Details
File Location:
scripts/extract_creator_context.py:84-109
Vulnerability Type: Privacy-sensitive local file access and disclosure beyond strict data-minimization boundaries
Risk Level: MediumVulnerable Code
python args = parser.parse_args() workspace = Path(args.workspace) memory_md = read_text(workspace / "MEMORY.md") user_md = read_text(workspace / "USER.md") result = { "creator": { "name": extract_name(user_md), "role": "Founder / builder", "company": infer_company(memory_md), "platforms": infer_platforms(memory_md, user_md), "content_pattern": infer_content_pattern(memory_md), "current_problem": infer_current_problem(memory_md), "timezone": extract_timezone(user_md), }, "memory_summary": { "mission": bullets_under(memory_md, "Fischer 的使命"), "business": bullets_under(memory_md, "Fischer 的业务"), "background_advantages": bullets_under(memory_md, "Fischer 的背景优势"), } } text = json.dumps(result, ensure_ascii=False, indent=2) if args.output: Path(args.output).write_text(text) print(text)Related instructions in
SKILL.md:46-60andSKILL.md:194-203direct the Agent to proactively inspect memory and identifyMEMORY.mdandUSER.mdas data sources.Technical Analysis
The helper accepts an arbitrary workspace path and reads
MEMORY.mdandUSER.mdusing the invoking process's filesystem permissions. It loads both files before establishing which fields are necessary for the current content-planning request. It then extracts identity, timezone, company, platforms, mission, business information, and background details.The collected profile is always printed to standard output and can also be written to an arbitrary caller-selected output path. There is no explicit consent gate, approved-workspace enforcement, sensitive-field filtering, ou ...[truncated 1931 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user approval before accessing
MEMORY.mdorUSER.md, and state which fields will be read and why. - Replace complete-file ingestion with a narrow context interface that returns only decision-critical, user-approved fields.
- Enforce an approved workspace root by resolving the supplied path and verifying that it remains within the configured Agent workspace.
- Do not print personal profile information by default. Provide a redacted summary and require an explicit option for full output.
- Restrict output files to an approved directory and reject paths that resolve outside it.
- Add field-level allowlists and exclude secrets, credentials, contact details, unrelated memories, and other sensitive information.
- Add documentation covering data handling, logging exposure, retention, and downstream sharing.
- Remove hard-coded person-specific headings and assumptions so the extractor does not unnecessarily search for or expose a particular user's private profile.
- Update
references/implementation-notes.md, which states that direct memory ingestion is not implemented, to accurately disclose the existing helper and its privacy implications.
- Require explicit user approval before accessing
