Back to skill

Security audit

CosyVoice3 macOS

Security checks for vulnerabilities and agentic risk

Overview

This TTS skill is mostly purpose-aligned, but its installer runs mutable third-party code and downloads unverified components, so users should review it before installing.

Install only if you are comfortable trusting Anaconda, GitHub CosyVoice code and submodules, PyPI/PyTorch packages, and ModelScope model artifacts at install time. Prefer reviewing or pinning versions and hashes first, running it as an unprivileged user, and using voice cloning only with consent from the speaker whose audio is provided.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/install.sh:16
Finding
Mutable and Unverified Third-Party Components Are Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install.sh:16-18`, `scripts/install.sh:35-38`, `scripts/install.sh:58-65`, `scripts/install.sh:72-80`, `scripts/download_models.py:11-15`, `scripts/download_models.py:65-70`, `scripts/tts.py:11-16`, `scripts/tts.py:70-76` **Vulnerability Type**: Unverified remote code retrieval and insecure dependency management **Risk Level**: High ### Vulnerable Code From `scripts/install.sh:16-18`: ```bash echo "❌ Conda not found. Installing Miniconda..." curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh bash Miniconda3-latest-MacOSX-arm64.sh -b -p $HOME/miniconda3 ``` From `scripts/install.sh:35-38`: ```bash cd "$WORKSPACE" git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git cosyvoice3-repo cd "$COSYVOICE_REPO" git submodule update --init --recursive ``` From `scripts/install.sh:58-65`: ```bash pip install torch==2.3.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cpu # Install core dependencies echo "📦 Installing dependencies..." pip install transformers==4.51.3 modelscope onnxruntime soundfile librosa numpy==1.26.4 pip install conformer==0.3.2 diffusers==0.29.0 fastapi==0.115.6 gradio==5.4.0 pip install hydra-core==1.3.2 HyperPyYAML==1.2.2 inflect==7.3.1 lightning==2.2.4 pip install matplotlib==3.7.5 networkx==3.1 omegaconf==2.3.0 onnx==1.16.0 pip install protobuf==4.25 pydantic==2.7.0 pyworld==0.3.4 rich==13.7.1 pip install tensorboard==2.14.0 x-transformers==2.11.24 wetext==0.0.4 wget==3.2 ``` From `scripts/install.sh:72-80`: ```python try: from modelscope import snapshot_download model_dir = '/Users/lhz/.openclaw/workspace/cosyvoice3-repo/pretrained_models/Fun-CosyVoice3-0.5B' if os.path.exists(model_dir): print(" Model already downloaded") else: print(" Downloading Fun-CosyVoice3-0.5B...") snapshot_download('FunAudioLLM/Fun-CosyVoice3-0.5B-2512', local_dir=model_dir) ``` From `scripts/down ...[truncated 4457 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Pin and verify Miniconda** - Replace the `latest` URL with a fixed, reviewed Miniconda release. - Store the expected SHA-256 digest in the installation script or a signed manifest. - Verify the digest before invoking the installer. - Abort installation if verification fails. 2. **Pin repository and submodule revisions** - Clone without immediately trusting the remote default branch. - Check out a specific reviewed CosyVoice commit. - Pin every submodule to its expected commit and verify that the checked-out revisions match a maintained allowlist. - Consider distributing a signed source archive with a verified digest. 3. **Lock Python dependencies** - Move dependencies into a lock file generated from reviewed package versions. - Pin every direct and transitive dependency. - Use hashes and install with a command such as `pip install --require-hashes -r requirements.lock`. - Use an approved package index or internal artifact mirror where possible. - Add automated dependency vulnerability and provenance scanning. 4. **Pin and validate models** - Specify immutable ModelScope revisions where supported. - Maintain trusted checksums for downloaded model files. - Reject unexpected files and unsafe serialization formats. - Prefer formats that do not permit arbitrary object deserialization. 5. **Reduce import trust** - Do not insert an unverified external repository at the beginning of `sys.path`. - Package and install reviewed CosyVoice code into the isolated environment after integrity validation. - Validate the repository revision before every import if an editable source tree is required. 6. **Harden execution** - Run installation and inference as an unprivileged account. - Never recommend running the installer with `sudo`. - Restrict filesystem and network access during installation and model inference where feasible. - Record resolved versions, commit h ...[truncated 76 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill is presented as a local offline TTS capability, but the documented behavior includes downloading remote model artifacts and managing local workspace/model paths that are not clearly disclosed in the core description. This mismatch can mislead operators about network access, supply-chain exposure, and actual functionality, causing them to approve or run the skill under false assumptions.

Tp4

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding
The skill is presented as a local offline TTS capability, but the documented behavior includes downloading remote model artifacts and managing local workspace/model paths that are not clearly disclosed in the core description. This mismatch can mislead operators about network access, supply-chain exposure, and actual functionality, causing them to approve or run the skill under false assumptions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill instructs users to run shell commands and installation scripts, but it declares no tool scope or allowed-tools metadata. That creates an authorization and review gap: an agent or user may execute shell-capable behavior that is not explicitly disclosed or constrained, increasing the chance of unintended command execution or unsafe environment changes.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill prominently enables zero-shot voice cloning without any warning about consent, impersonation risk, or safe handling of reference audio. In context, this is more dangerous because the skill is explicitly designed to clone voices from short samples, which can facilitate social engineering, fraud, or unauthorized biometric-style voice replication.

External Transmission

Medium
Category
Data Exfiltration
Content
source "$HOME/miniconda3/etc/profile.d/conda.sh"
    else
        echo "❌ Conda not found. Installing Miniconda..."
        curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh
        bash Miniconda3-latest-MacOSX-arm64.sh -b -p $HOME/miniconda3
        export PATH="$HOME/miniconda3/bin:$PATH"
        source "$HOME/miniconda3/etc/profile.d/conda.sh"
Confidence
94% confidence
Finding
The command fetches a remote installer and then runs it locally, giving the downloaded content full execution on the host. Even if the source is reputable, compromise of the distribution channel, DNS/TLS interception, or upstream tampering could lead to arbitrary code execution during installation.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The installer bootstraps a full local runtime by downloading and installing Miniconda, then later clones a remote repository and installs many packages. While this is common for ML setup scripts, it materially expands the trust boundary beyond a simple local TTS skill and introduces supply-chain risk if any upstream artifact is compromised or unexpectedly changed.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The script downloads a shell installer from the internet and immediately executes it, which is a classic remote code execution and supply-chain exposure pattern. In addition, it clones external code recursively, allowing arbitrary upstream code and submodules to influence the local environment without integrity verification.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The synthesis function defaults `lang='zh'`, making Chinese the implicit language unless the user explicitly overrides it. This is a natural-language policy concern because the skill imposes a specific locale by default rather than asking the user or remaining neutral.

Static analysis

No suspicious patterns detected.