Back to skill

Security audit

qwen-asr

Security checks for vulnerabilities and agentic risk

Overview

The skill does local transcription as described, but its wrapper can delete a user's original WAV file and its installer runs an unverified latest remote binary.

Install only if you accept a persistent local binary from GitHub Releases and a large model stored in your home directory. Avoid using the wrapper on original WAV files until the cleanup bug is fixed, or use a copy/stdin/direct qwen-asr invocation to prevent accidental deletion.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/transcribe.sh:9
Finding

Original WAV Input Is Unconditionally Deleted After Transcription

Content
View full analysis
/dev/null; then echo "Error: ffmpeg is required for non-WAV files. Install it with:" >&2 echo " macOS: brew install ffmpeg" >&2 echo " Linux: sudo apt install ffmpeg" >&2 exit 1 fi local tmp tmp="$(mktemp /tmp/qwen-asr-XXXXXX.wav)" ffmpeg -y -i "$input" -ar 16000 -ac 1 -f wav "$tmp" -loglevel error echo "$tmp" ;; esac } ... elif [ -n "${1:-}" ]; then INPUT="$(to_wav "$1")" trap 'rm -f "$INPUT"' EXIT 2>/dev/null || true qwen-asr -d "$MODEL_DIR" -i "$INPUT" --silent "${@:2}" ``` ### Technical Analysis The `to_wav` function returns two different types of paths through the same output channel: 1. For non-WAV input, it returns the path of a newly created temporary WAV file. 2. For WAV input, it returns the original caller-supplied path without creating a temporary file. The caller does not distinguish between these cases. It stores either result in `INPUT` and registers an unconditional `EXIT` trap that runs: ```bash rm -f "$INPUT" ``` Consequently, when the supplied input already has a `.wav` or `.WAV` extension, the cleanup handler deletes the original user file. The trap runs whenever the shell exits after registration, including when transcription succeeds, when `qwen-asr` fails, or when the script is interrupted by a trapped exit condition. Quoting prevents shell injection through the path, but it does not prevent destructive deletion of the selected file. ### Attack Path 1. A user or calling agent invokes the wrapper with a writable WAV file: ```bash bash scripts/transcribe.sh /home/user/recordings/meeting.wav ``` 2. `to_wav` i ...[truncated 1100 chars]
Remediation
View remediation
/dev/null 2>&1; then echo "Error: ffmpeg is required for non-WAV files." >&2 exit 1 fi TEMP_WAV="$(mktemp "${TMPDIR:-/tmp}/qwen-asr-XXXXXX.wav")" ffmpeg -y -i "$input" -ar 16000 -ac 1 -f wav \ "$TEMP_WAV" -loglevel error printf '%s\n' "$TEMP_WAV" ;; esac } ``` Because command substitution runs a function in a subshell in Bash, a more robust design would have `to_wav` assign the result to a caller-visible variable or perform conversion directly in the main shell. Additional hardening should include: - Validate that the input exists and is a regular readable file. - Use `rm -f -- "$TEMP_WAV"` to terminate option parsing explicitly. - Register cleanup immediately after creating the temporary file. - Add regression tests proving that original WAV inputs still exist after successful and failed transcription. - Document temporary-file behavior and data-retention expectations. ]]>

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/install.sh:25
Finding

Mutable Remote Binary Is Installed and Executed Without Integrity Verification

Content
View full analysis
Remediation
View remediation
&2 exit 1 fi ``` On macOS, use an available compatible hashing tool such as `shasum -a 256`. Prefer a signed release process and verify the signature against a pinned maintainer or project public key. Additional hardening should include: 1. List and validate every archive member before extraction. 2. Reject absolute paths, `..` traversal components, symlinks, hard links, and unexpected filenames. 3. Extract into a separate temporary directory rather than directly into `~/.local/bin`. 4. Verify that exactly one expected regular executable was produced. 5. Install the validated file atomically with restrictive permissions. 6. Invoke the installed program by its absolute path, such as `${INSTALL_DIR}/qwen-asr`, after verification. 7. Pin and integrity-check model artifacts where the upstream tooling supports it. 8. Document the pinned version and provide a deliberate review process for updating its checksum or signature. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill clearly instructs the agent to execute shell commands (bash .../install.sh and bash .../transcribe.sh) but does not declare any tool scope such as permissions or allowed-tools. This creates an authorization gap where the agent may invoke shell capabilities without explicit least-privilege constraints, increasing the risk of unintended command execution if the skill is triggered in broader contexts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The invocation guidance uses broad triggers like 'user asks to transcribe audio' or 'speech-to-text is needed,' which are common phrases that may match many benign conversations. Overbroad routing can cause this shell-capable skill to activate unnecessarily, exposing local command execution and file-processing behavior in situations where a narrower or safer skill selection policy should apply.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/install.sh (reported line 28)May include surrounding context.

sh
# Get latest qwen-asr-cli release tag
  echo "Fetching latest release..."
  TAG=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases" \
    | grep -o '"tag_name": *"qwen-asr-cli-v[^"]*"' \
    | head -1 \
    | sed 's/"tag_name": *"//;s/"//')

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This shell script performs safety-relevant actions by fetching a release archive from GitHub and extracting an executable into ~/.local/bin. Although it prints progress messages, it does not clearly warn the user in advance that it will install or overwrite a local command on disk.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/transcribe.sh (reported line 15)May include surrounding context.

sh
if ! command -v ffmpeg &>/dev/null; then
        echo "Error: ffmpeg is required for non-WAV files. Install it with:" >&2
        echo "  macOS:  brew install ffmpeg" >&2
        echo "  Linux:  sudo apt install ffmpeg" >&2
        exit 1
      fi
      local tmp

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script creates directories and downloads model artifacts into ~/.openclaw/tools/qwen-asr/qwen3-asr-0.6b. While status messages announce the download, they do not clearly disclose beforehand that the script will write persistent data into the user's home directory.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.