Back to skill

Security audit

Audio Editor

Security checks for vulnerabilities and agentic risk

Overview

This audio-editing skill includes an under-disclosed shell execution path that can run arbitrary commands instead of only audio operations.

Review before installing. This skill should not be used as-is unless the command execution path is removed, unsupported requests fail closed, ffmpeg arguments are passed safely without eval, and overwrite behavior is made explicit and user-controlled.

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

Error
Location
scripts/audio_run.sh:35
Finding

Arbitrary Shell Command Execution Through Unsafe eval

Content
View full analysis
/tmp/pwned' ``` 2. The input does not match the supported Chinese audio-command patterns. 3. The fallback branch emits `id > /tmp/pwned` unchanged. 4. Command substitution assigns that text to `AUDIO_CMD`. 5. `eval "$AUDIO_CMD"` parses and executes the payload. 6. The output of `id` is written to `/tmp/pwned`, demonstrating arbitrary command execution. A malicious output argument can also inject commands into a recognized operation because the output is concatenated into an FFmpeg command string and subsequently evaluat ...[truncated 783 chars]
Remediation
View remediation
&2 return 1 fi ``` 3. Invoke FFmpeg directly using separately quoted arguments: ```bash ffmpeg -y -i "$input" -vn -acodec mp3 "$output" ``` 4. Represent commands as Bash arrays if commands must be assembled dynamically: ```bash args=(ffmpeg -y -i "$input" -vn -acodec mp3 "$output") "${args[@]}" ``` 5. Validate all inputs: - Require input files to use explicitly supported media extensions. - Resolve and restrict paths to approved directories where appropriate. - Reject missing files and non-regular files. - Validate volume as a numeric value within an explicitly permitted range. - Reject output paths containing control characters and enforce an approved destination policy. 6. Use `set -euo pipefail` and quote every variable expansion, while recognizing that quoting alone does not make `eval` safe. 7. Add regression tests using command separators, substitutions, redirections, and crafted output paths to ensure they are treated as data rather than executable syntax. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script converts natural-language input into a shell command string and then executes it with eval. For unmatched input, parse_natural_language returns the raw user input unchanged, so an attacker can supply arbitrary shell commands unrelated to audio processing and achieve command execution with the user's privileges.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill description does not warn users that audio operations may modify files, create outputs in attacker- or user-specified locations, or overwrite existing content. Missing warnings increase the chance of unsafe use, especially when combined with broad natural-language editing and optional output paths that could affect sensitive files or produce unexpected filesystem changes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The edit_audio command is activated by a very broad natural-language description ('自然语言执行音频处理') without constraints on permitted operations, target files, or safety checks. In a skill that can modify files and invoke ffmpeg-style processing, this can lead to unintended destructive edits, overwriting outputs, or execution of risky transformations from ambiguous user prompts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Comments, trigger parsing, and user-facing log messages are all written for Chinese-language use, and the natural-language parser only recognizes Chinese phrases such as '提取音频' and '调整音量'. This imposes a specific language requirement without opt-in or documentation of a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The function is presented as natural-language parsing for audio actions, but when parsing fails it returns the original text for execution by the shell. This mismatch is dangerous because users may believe only audio-related intents are accepted, while arbitrary shell payloads can be smuggled through the 'unmatched' path.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script immediately executes the generated command and uses ffmpeg -y, which overwrites output files without prompting. In combination with user-supplied command text and a default output path, this can cause unintended file modification or destructive behavior without any confirmation step.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language descriptions, command explanations, and parameter notes are entirely in Chinese, which can impose a language requirement on users without opt-in. Under the policy, forced language or locale constraints should either offer user choice or be explicitly justified and documented.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.