T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:12- Finding
Overbroad Discovery and Access of Claude Code Transcripts
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 12-14 and 24
Vulnerability Type: Sensitive transcript discovery and access beyond a precisely selected conversation
Risk Level: MediumRelevant Code Snippet:
markdown Prefer `--latest`; it reads the latest Q&A from the Claude Code transcript so long answers are not repeated in tool input. `--latest` discovers transcripts from `~/.claude/projects` using the current working directory. If discovery fails or captures the wrong turn, retry with `SAVE_NOTE_CWD="PROJECT_PATH"` or `--transcript PATH` before falling back to explicit content input.bash ~/.claude/skills/save-claude-notes/scripts/save-claude-notes.sh --latestTechnical Analysis
The skill directs the agent to run an external script that searches the user-wide
~/.claude/projectslocation and reads conversation transcripts. Selection is inferred from the current working directory rather than requiring the user to identify and approve a specific transcript and turn.The document explicitly acknowledges that discovery can capture the wrong turn. Consequently, invoking the ordinary
--latestworkflow may access unrelated or unintended conversation content. Such transcripts can contain private prompts, generated source code, credentials, proprietary information, or context belonging to another project.The referenced
scripts/save-claude-notes.shimplementation is not included in the audited project. Therefore, the audit could not verify its transcript-selection logic, path containment, secret detection, redaction, symbolic-link handling, or output-file validation. No network transmission or deliberate exfiltration instruction was identified in the submitted file.Attack Path
- A user invokes
/save-claude-noteswhile the agent is operating in a project directory. - The skill instructs the agent to execute
save-claude-notes.sh --latest. - The external script ...[truncated 1345 chars]
- A user invokes
- Remediation
View remediation
Remediation Suggestions
- Require explicit user confirmation of the resolved transcript path, project, timestamp, and conversation turn before reading or saving content.
- Restrict automatic discovery to the active project's canonical transcript directory and reject candidates outside that directory.
- Resolve and validate canonical paths before access, including checks against path traversal and symbolic-link redirection.
- Default to explicit transcript and turn selection when discovery is ambiguous rather than silently selecting the latest candidate.
- Display a redacted preview or metadata-only summary before committing the note.
- Apply secret detection and redaction by default. Any bypass should require confirmation tied to the specific content and destination.
- Restrict output files to user-approved note directories unless the user explicitly confirms an alternative canonical path.
- Include
scripts/save-claude-notes.shin the audited package so its transcript parsing, input validation, file permissions, and output handling can be reviewed. - Create note files with restrictive permissions and warn users when the destination is located in a shared or automatically synchronized directory.
