T09 · Insecure Skill Coding Practices
- Location
SKILL.md:50- Finding
Vault Records Exposed Through Terminal Capture
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 50–55
Vulnerability Type: Sensitive data exposure through terminal output capture
Risk Level: HighVulnerable Code:
bash tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'bw list items --search github' Enter # Capture output tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200Technical Analysis
The authenticated
bw list items --search githubcommand can return complete matching Bitwarden item objects rather than a minimal access-status result. Such records may contain passwords, usernames, authentication data, secure notes, URIs, and custom fields.The subsequent
tmux capture-panecommand extracts up to 200 lines of terminal history. In an agent-driven environment, this captured output may be returned through tool responses and consequently retained in chat transcripts, application logs, telemetry, or other execution traces.This behavior conflicts with the skill's own guardrail prohibiting secrets from being pasted into logs, chat, or code. Although capture is not inherently malicious, capturing unrestricted output from an authenticated password-vault command creates a direct sensitive-data disclosure risk.
Attack Path
- A user or agent follows the documented workflow and unlocks the Bitwarden vault.
- The resulting
BW_SESSIONgrants the tmux shell authenticated vault access. - The skill runs
bw list items --search github. - Bitwarden prints matching vault records into the tmux pane.
tmux capture-panecollects the terminal output, including any sensitive fields.- The captured data is returned to the invoking agent or tool infrastructure.
- Vault data may then persist in chat history, logs, telemetry, or downstream processing systems accessible to parties that do not have direct vault authorization.
Impact Assessment
Exploitation does not grant additional operating-system privileges, ...[truncated 515 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not capture terminal panes containing output from commands that return secrets or complete vault records.
- Replace the access test with a non-secret operation such as
bw status, or another command whose output cannot contain vault content. - If record retrieval is explicitly requested, obtain only the minimum necessary field and avoid returning it through chat, logs, or tool traces.
- Do not use
bw list itemsas a generic authentication check. - Separate secret-producing commands from diagnostic output that may be captured.
- Clear pane history before diagnostic capture and terminate the tmux session immediately after use.
- Apply output redaction at the tool boundary as defense in depth, while recognizing that redaction should not replace minimizing secret output.
- Require explicit user authorization before retrieving passwords, TOTP values, secure notes, or complete vault items.
