Back to skill

Security audit

mimo-tts-wav

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently provides MiMo text-to-speech generation with optional Feishu voice-message delivery, but users should treat voice samples, generated audio, and chat delivery as sensitive remote-service operations.

Install only if you are comfortable sending TTS text, style context, and any voice-cloning samples to Xiaomi MiMo, and sending generated audio plus recipient identifiers to Feishu when that optional script is used. Use voice cloning only with consent from the voice owner, keep API keys scoped, and avoid passing untrusted Feishu receiver values until the script validates and JSON-encodes them safely.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Note
Location
SKILL.md:46
Finding
Unpinned Python Dependency Installation## Vulnerability Details **File Location**: `SKILL.md:46`, `scripts/mimo_tts.py:8`, `scripts/mimo_tts_voiceclone.py:8`, `scripts/mimo_tts_voicedesign.py:8` **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Low **Vulnerable code snippets:** ```markdown | `openai` | `pip install openai` | Yes | ``` ```python # Present in each Python script: Requires: pip install openai export MIMO_API_KEY=... ``` ### Technical Analysis The installation instructions request the latest available `openai` package without pinning a reviewed version or verifying package hashes. The Skill does not include a lock file or hash-validated requirements file. Package installation can execute package-controlled build and installation logic. Consequently, the code installed in the future may differ from the dependency version reviewed alongside this Skill. This creates exposure to compromised releases, malicious transitive dependencies, and unexpected compatibility or security regressions. The instruction is documentation rather than automatic package installation, and it uses the expected package name rather than an evident typosquat. Therefore, this is a supply-chain hardening weakness rather than evidence that the project intentionally installs a malicious dependency. ### Attack Path 1. An attacker compromises a future release of the referenced package or one of its unpinned transitive dependencies. 2. A user follows the documented `pip install openai` instruction. 3. The package manager resolves and downloads the compromised version because no approved version or hash is enforced. 4. Malicious installation or runtime code executes with the privileges of the user running `pip`. 5. That code may access data available to the process, potentially including `MIMO_API_KEY`, generated audio, and other user-accessible files. ### Impact Assessment Successful exploitation would execute dependency-controlled cod ...[truncated 278 chars]
Remediation
## Remediation Suggestions 1. Add a reviewed dependency file with an exact version, for example: ```text openai==<reviewed-version> ``` 2. Generate and enforce cryptographic hashes for the package and all transitive dependencies, such as with `pip-tools` and: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Use a dedicated virtual environment rather than installing into a system or privileged Python environment. 4. Document the supported Python and dependency versions. 5. Periodically update the pinned version through a controlled review and vulnerability-scanning process. 6. Avoid running package installation as `root` or with `sudo`.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/feishu_send_audio.sh:56
Finding
Unvalidated Values Interpolated into Authenticated Feishu Requests## Vulnerability Details **File Location**: `scripts/feishu_send_audio.sh:56-58`, `scripts/feishu_send_audio.sh:79-81` **Vulnerability Type**: Unsafe JSON and URL query construction **Risk Level**: Medium **Vulnerable code snippets:** ```bash TOKEN=$(curl -s -X POST 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' \ -H 'Content-Type: application/json' \ -d "{\"app_id\":\"$FEISHU_APP_ID\",\"app_secret\":\"$FEISHU_APP_SECRET\"}" \ | python3 -c "import sys,json; print(json.load(sys.stdin)['tenant_access_token'])") ``` ```bash RESULT=$(curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=$RECEIVE_ID_TYPE" \ -H "Authorization: Bearer $TOKEN" \ -H 'Content-Type: application/json' \ -d "{\"receive_id\":\"$FEISHU_RECEIVE_ID\",\"msg_type\":\"audio\",\"content\":\"{\\\"file_key\\\":\\\"$FILE_KEY\\\"}\"}") echo "$RESULT" ``` ### Technical Analysis The script inserts environment variables and command-line arguments directly into JSON strings without JSON encoding. It also inserts `RECEIVE_ID_TYPE` directly into a URL query without URL encoding or enforcement of the documented `open_id` and `chat_id` allowlist. Values containing quotation marks, backslashes, control characters, or URL delimiters can corrupt the intended request structure. A crafted receiver ID can introduce additional JSON properties or duplicate properties, with the resulting behavior depending on Feishu's JSON parser. A crafted receiver-type value containing characters such as `&` can introduce additional query parameters. This issue does not provide local shell-command injection because shell metacharacters introduced through ordinary variable expansion are not reparsed as shell syntax. The security risk is instead manipulation of authenticated API requests and denial of service through malformed request data. The Feishu network operations are necessary for the declared optional message-deli ...[truncated 1754 chars]
Remediation
## Remediation Suggestions 1. Restrict the receiver-ID type to the two supported values: ```bash case "$RECEIVE_ID_TYPE" in open_id|chat_id) ;; *) echo "Error: receive_id_type must be open_id or chat_id" >&2 exit 1 ;; esac ``` 2. Build JSON with a structured serializer instead of shell string concatenation. For example, use Python: ```bash TOKEN_BODY=$(python3 -c ' import json, os print(json.dumps({ "app_id": os.environ["FEISHU_APP_ID"], "app_secret": os.environ["FEISHU_APP_SECRET"], })) ') ``` 3. Construct the message body with `json.dumps`, passing the receiver ID and file key as arguments or environment values. 4. Use `curl --get --data-urlencode` for query parameters rather than concatenating them into the URL. 5. Add format and length validation for receiver IDs according to Feishu's documented identifier rules. 6. Use `curl --fail-with-body --show-error` and check the exit status of `ffmpeg`, `ffprobe`, token retrieval, upload, and message delivery. 7. Verify Feishu response status fields before continuing, and avoid printing responses if they may contain sensitive operational details. 8. Grant the Feishu application only the API permissions required to upload audio and send messages to intended recipients.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description is for a TTS generation skill focused on converting text into spoken audio with advanced voice-control features. The provided code does not synthesize speech from text at all. Instead, it operates on an already existing WAV file, transcodes it to Opus, authenticates to Feishu with app credentials, uploads the file, and sends it as a voice message. This is a materially different primary purpose and includes undeclared external messaging behavior and credentialed API access.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The code clearly performs text-to-speech synthesis with preset voices via the MiMo V2.5 TTS API, which aligns with part of the description. However, the description claims broader functionality: preset voices, voice design, voice cloning, director mode, and tag-based control for emotion/dialect. The supplied code only accepts a fixed list of preset voices, optional free-form context text, and outputs a WAV file. There is no implementation for voice design, voice cloning, director mode, or explicit structured style-tag handling. Because the declared description materially overstates supported capabilities compared with the provided code chunk, this is a mismatch.

Missing User Warnings

High
Confidence
96% confidence
Finding
The skill supports voice cloning and external transmission of generated audio/messages, but the user-facing description does not prominently warn about those privacy-sensitive actions. This is particularly risky because voice samples, synthesized speech, and chat delivery involve biometric-like data, personal content, and third-party processing, raising consent and data-leak concerns.

External Script Fetching

High
Category
Supply Chain
Content
# ── Step 2: 获取 tenant_access_token ─────────────────────

TOKEN=$(curl -s -X POST 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' \
  -H 'Content-Type: application/json' \
  -d "{\"app_id\":\"$FEISHU_APP_ID\",\"app_secret\":\"$FEISHU_APP_SECRET\"}" \
  | python3 -c "import sys,json; print(json.load(sys.stdin)['tenant_access_token'])")
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
DURATION_MS=$(ffprobe -v quiet -show_entries format=duration -of csv=p=0 "$OPUS_FILE" \
  | python3 -c "import sys; print(int(float(sys.stdin.read().strip())*1000))")

FILE_KEY=$(curl -s -X POST 'https://open.feishu.cn/open-apis/im/v1/files' \
  -H "Authorization: Bearer $TOKEN" \
  -F "file_type=opus" -F "file_name=voice.opus" -F "duration=$DURATION_MS" \
  -F "file=@$OPUS_FILE" \
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill declares shell, environment-variable, and file read/write capabilities implicitly through its documented commands, but it does not constrain them with an explicit tool scope. That creates unnecessary authority for a skill that can access secrets (API keys), write temporary audio files, and invoke external commands, making misuse or accidental overreach harder to contain.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The activation text uses broad triggers like 'say it out loud' and 'voice reply,' which can cause the skill to run in many ordinary conversations without strong user intent. In this skill's context, accidental activation is more dangerous because it can invoke external APIs, synthesize user content, and potentially transmit audio to third-party services such as Feishu.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
This shell script performs network operations that upload a local audio file and send a message to an external service, which can affect user data and privacy. Although the header documents the flow, it does not clearly warn the user that the specified audio file and recipient ID will be transmitted to Feishu.

External Transmission

Medium
Category
Data Exfiltration
Content
# ── Step 2: 获取 tenant_access_token ─────────────────────

TOKEN=$(curl -s -X POST 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' \
  -H 'Content-Type: application/json' \
  -d "{\"app_id\":\"$FEISHU_APP_ID\",\"app_secret\":\"$FEISHU_APP_SECRET\"}" \
  | python3 -c "import sys,json; print(json.load(sys.stdin)['tenant_access_token'])")
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# ── Step 4: 发送语音消息 ─────────────────────────────────

RESULT=$(curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=$RECEIVE_ID_TYPE" \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d "{\"receive_id\":\"$FEISHU_RECEIVE_ID\",\"msg_type\":\"audio\",\"content\":\"{\\\"file_key\\\":\\\"$FILE_KEY\\\"}\"}")
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The script sends user-provided text and optional style/context instructions to a third-party API for synthesis without any explicit disclosure, confirmation, or privacy warning at runtime. In a TTS skill, this matters because users may include sensitive message content, names, or other private data, and the context field can carry additional sensitive instructions that are silently transmitted off-device.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The script base64-encodes a user-provided voice sample and sends it to a third-party API for voice cloning without any explicit consent prompt, warning, or notice at the point of use. Voice samples are highly sensitive biometric data, and transmitting them off-device can create privacy, compliance, and impersonation risks if the user is unaware or has not authorized sharing.

External Transmission

Medium
Category
Data Exfiltration
Content
if not api_key:
        print("❌ MIMO_API_KEY 未设置 / is not set", file=sys.stderr)
        sys.exit(1)
    return OpenAI(api_key=api_key, base_url="https://api.xiaomimimo.com/v1")


def main() -> None:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
if not api_key:
        print("❌ MIMO_API_KEY 未设置 / is not set", file=sys.stderr)
        sys.exit(1)
    return OpenAI(api_key=api_key, base_url="https://api.xiaomimimo.com/v1")


def main() -> None:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
if not api_key:
        print("❌ MIMO_API_KEY 未设置 / is not set", file=sys.stderr)
        sys.exit(1)
    return OpenAI(api_key=api_key, base_url="https://api.xiaomimimo.com/v1")


def main() -> None:
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This code makes a network request to an external service using `args.text` and `args.context`, which may contain user data, but the script provides no explicit disclosure at the point of transmission beyond the generic module docstring. For code files, outbound transmission of user or system data should have some visible warning, logging, prompt, or documented disclosure.

Static analysis

No suspicious patterns detected.