Back to skill

Security audit

voice-extract

Security checks for vulnerabilities and agentic risk

Overview

This writing-style skill has a coherent goal, but it stores personal writing samples and profiles on disk while under-disclosing privacy, retention, and path-safety risks.

Review before installing. Use only your own non-sensitive writing samples, choose simple profile names using letters, numbers, hyphens, or underscores, inspect and delete ~/.claude/voice-profiles when done, and avoid using the generated profiles to impersonate others or bypass authorship or AI-disclosure rules.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
modules/sample-intake.md:17
Finding

Path Traversal Through Unsanitized Profile Name Enables Filesystem Writes Outside the Profile Root

Content
View full analysis

Vulnerability Details

File Location: modules/sample-intake.md, lines 17-30
Vulnerability Type: Path traversal and unrestricted filesystem write
Risk Level: Medium

bash
PROFILE_NAME="$1"
SAMPLE_DIR="$2"
PROFILE_DIR="$HOME/.claude/voice-profiles/$PROFILE_NAME"

mkdir -p "$PROFILE_DIR/samples"
mkdir -p "$PROFILE_DIR/registers"
mkdir -p "$PROFILE_DIR/learning/snapshots"

# Copy and anonymize samples
counter=1
for f in "$SAMPLE_DIR"/*.{md,txt} 2>/dev/null; do
  [ -f "$f" ] || continue
  padded=$(printf "%02d" $counter)
  cp "$f" "$PROFILE_DIR/samples/sample-${padded}.md"

Technical Analysis

The user-controlled PROFILE_NAME value is directly concatenated into PROFILE_DIR without an allowlist, canonicalization, or containment check. Shell quoting protects against ordinary shell metacharacter injection, but it does not prevent filesystem traversal sequences such as ../.

A profile name containing traversal components can cause PROFILE_DIR to resolve outside $HOME/.claude/voice-profiles. The subsequent mkdir -p and cp operations then create directories and write files at the escaped location.

The destination filename is constrained to samples/sample-NN.md, so this is not a completely arbitrary filename write. Nevertheless, an attacker can choose the parent destination through traversal and may overwrite an existing file with that predictable name because cp is used without no-clobber protection.

Attack Path

  1. An attacker or untrusted caller supplies a profile name containing traversal components, such as ../../target.
  2. The skill constructs a path equivalent to: $HOME/.claude/voice-profiles/../../target.
  3. The operating system resolves the traversal components, moving the destination outside the intended voice-profile root.
  4. mkdir -p creates samples, registers, and learning/snapshots directories at the escaped location.
  5. Files controlled th ...[truncated 841 chars]
Remediation
View remediation

Remediation Suggestions

  1. Validate profile names with a strict allowlist before using them in paths. For example, permit only letters, numbers, underscores, and hyphens:

    bash
    case "$PROFILE_NAME" in
      (*[!A-Za-z0-9_-]*|'')
        printf '%s\n' "Invalid profile name" >&2
        exit 1
        ;;
    esac
    
  2. Explicitly reject path separators, . and .. traversal components, control characters, and empty values.

  3. Resolve the profile root and candidate destination to canonical absolute paths, then verify that the destination remains beneath the canonical profile root before creating directories or copying files.

  4. Use safer overwrite behavior, such as cp -n, or require explicit user confirmation before replacing an existing destination file.

  5. Validate that SAMPLE_DIR is an expected readable directory and impose reasonable limits on the number and size of copied files.

  6. Fail closed if path validation or canonicalization cannot be completed; do not continue with partially validated paths.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger list includes broad terms like 'voice', 'writing', and 'extraction' that are common in normal conversations. This can cause accidental activation of the skill in contexts unrelated to voice profiling, increasing the chance that users' text is processed or stored unexpectedly.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 55)May include surrounding context.

md
descriptions, especially for registers where subtle tonal
   shifts matter.

## Required TodoWrite Items

1. `voice-extract:samples-collected` - Writing samples gathered
2. `voice-extract:samples-anonymized` - Labels stripped, numbered

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs the agent to create persistent local directories and copy user writing samples into them, but it does not instruct the agent to warn the user or obtain consent for storage. Because writing samples may contain sensitive personal information, silent persistence creates privacy and retention risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The profile-writing section explicitly frames the output as 'Detection-Neutral' and states that the techniques do not increase AI detectability. That goes beyond benign voice extraction and provides guidance that can facilitate evasion of AI-detection systems in academic, fraud, or policy-restricted contexts.

Content

No source excerpt is available for this finding.

Ssd 2

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instructions explicitly position style-transfer output as reducing or avoiding AI detectability through paraphrased wording. Even if phrased indirectly, this materially assists concealment of machine-generated text and increases misuse risk beyond ordinary writing assistance.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

This module establishes session persistence by creating reusable voice profile registers from prior extraction output and storing them for later use. Persisting behavioral/profile data across sessions is security-relevant because it can retain sensitive user-derived content, influence future outputs without fresh consent, and broaden the impact of prompt/data poisoning if the stored profile is manipulated.

Content

Scanner excerpt · modules/register-creation.md (reported line 10)May include surrounding context.

md
# Register Creation Module

Create voice registers from extraction output.

## Default Register

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module instructs the agent to write a file into the user's home directory (~/.claude/...) and later also supports project-root overrides, but it provides no disclosure, confirmation step, or safety boundary around those writes. Silent persistence on disk can surprise users, modify local state across sessions, and create unintended configuration influence over future generations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module writes user-provided writing samples to a persistent path under the user's home directory without any explicit notice, consent flow, or retention guidance. For a voice-extraction skill that handles potentially sensitive authored text, undisclosed local storage increases privacy risk and may leave recoverable personal data on disk longer than users expect.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module explicitly promises anonymization, but the implemented directory-mode logic only copies user files into a persistent profile directory. This creates a mismatch between documented privacy protections and actual behavior, which can cause users to submit sensitive writing under the false belief that identifying content will be stripped before storage or downstream processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The interactive flow solicits pasted writing samples but does not warn users not to include sensitive, confidential, or identifying material. Because writing samples used for voice profiling often contain personal details or proprietary text, the absence of a privacy warning can lead to inadvertent disclosure and long-term storage of sensitive content.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.