Back to skill

Security audit

MiniMax TTS for FeiShu

Security checks for vulnerabilities and agentic risk

Overview

This TTS skill is mostly transparent about MiniMax and Feishu use, but its chat-trigger flow can read and forward message content with weak scoping controls.

Install only if you control the Feishu app and trust the callers who can invoke the trigger. Use minimal Feishu permissions, restrict who can call chat-trigger commands, avoid shared hosts for this version, and verify the recipient Open ID before use.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/tts.py:83
Finding

Predictable shared temporary files expose conversation data and permit symlink attacks

Content
View full analysis
str: """Get the last message sent by the assistant.""" try: if os.path.exists(LAST_MSG_FILE): with open(LAST_MSG_FILE, "r", encoding="utf-8") as f: return f.read().strip() except Exception: pass return "" def save_last_message(text: str): """Save the last message.""" try: with open(LAST_MSG_FILE, "w", encoding="utf-8") as f: f.write(text) except Exception: pass ``` ### Technical Analysis The Skill stores generated audio and cached conversation text under fixed, globally predictable names in `/tmp`. Standard calls to `open()` follow symbolic links, and these writes neither use exclusive file creation nor explicitly enforce owner-only permissions. An attacker with local access can create one of these paths before the Skill runs, replace it between operations, or make it a symbolic link to another filesystem object. If the Skill runs with greater privileges than the attacker, writing through such a link can truncate or overwrite a file accessible to the Skill. The single audio path and single message-cache path are also shared by every invocation. Concurrent requests can overwrite one another, resulting in one user's audio or cached text being read or sent duri ...[truncated 1513 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/tts_from_chat.py:85
Finding

Caller-controlled source and recipient identifiers can redirect cached or fetched message content

Content
View full analysis
dict: """ Main function: detect a trigger, extract text, and generate speech. """ if not is_triggered(user_text): return {"triggered": False} text_to_speak = "" # First preference: retrieve the replied-to message if reply_message_id: token = get_feishu_token() content = get_message_content(reply_message_id, token) if content: text_to_speak = content print(f"Using replied message {reply_message_id}: {content[:50]}...", file=sys.stderr) # Second preference: use the last assistant message if not text_to_speak: text_to_speak = get_last_message() if text_to_speak: print(f"Using last message: {text_to_speak[:50]}...", file=sys.stderr) if not text_to_speak: return {"triggered": True, "error": "No text was found for speech conversion"} # Generate and send speech from tts import tts_and_send result = tts_and_send(text_to_speak, user_open_id=user_open_id) return {"triggered": True, "text": text_to_speak, "result": result} ``` ```python # scripts/tts_from_chat.py:128-134 elif cmd == "trigger" and len(sys.argv) >= 3: user_text = sys.argv[2] user_open_id = sys.argv[3] if len(sys.argv) > 3 else None reply_message_id = sys.argv[4] if len(sys.argv) > 4 else None result = extract_and_speak(user_text, user_open_id, reply_message_id) print(result) ``` ```python # scripts/tts.py:124-146 def send_audio_message(file_key: str, user_open_id: str = None) -> dict: """Send an audio message to Feishu. Args: file_key ...[truncated 3560 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (61)

Tainted flow: 'headers' from os.environ.get (line 29, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/list_voices.py (reported line 34)May include surrounding context.

python
"Authorization": f"Bearer {API_KEY}"
    }
    
    response = requests.post(url, json=payload, headers=headers, timeout=15)
    result = response.json()
    
    voices = result.get(category, [])

Tainted flow: 'headers' from os.environ.get (line 65, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/tts.py (reported line 70)May include surrounding context.

python
"Authorization": f"Bearer {API_KEY}"
    }
    
    response = requests.post(TTS_URL, json=payload, headers=headers, timeout=30)
    
    if response.status_code != 200:
        raise Exception(f"TTS API error: {response.status_code} - {response.text}")

Tainted flow: 'FEISHU_APP_ID' from os.environ.get (line 12, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/tts.py (reported line 91)May include surrounding context.

python
def _get_feishu_token() -> str:
    """获取飞书 access token"""
    req = requests.post(
        "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",
        json={"app_id": FEISHU_APP_ID, "app_secret": FEISHU_APP_SECRET},
        timeout=10

Tainted flow: 'user_open_id' from os.environ.get (line 131, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/tts.py (reported line 135)May include surrounding context.

python
token = _get_feishu_token()
    
    msg_req = requests.post(
        "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id",
        headers={
            "Authorization": f"Bearer {token}",

Tainted flow: 'FEISHU_APP_ID' from os.environ.get (line 17, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/tts_from_chat.py (reported line 36)May include surrounding context.

python
def get_feishu_token():
    """获取飞书 access token"""
    import requests
    r = requests.post(
        "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",
        json={"app_id": FEISHU_APP_ID, "app_secret": FEISHU_APP_SECRET},
        timeout=10

Tainted flow: 'headers' from os.environ.get (line 20, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/update_voices_map.py (reported line 24)May include surrounding context.

python
"Content-Type": "application/json",
        "Authorization": f"Bearer {API_KEY}"
    }
    response = requests.post(url, json=payload, headers=headers, timeout=15)
    result = response.json()
    voices = result.get("system_voice", [])
    return voices

Tainted flow: 'headers' from os.environ.get (line 29, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/voice_design.py (reported line 34)May include surrounding context.

python
"Authorization": f"Bearer {API_KEY}"
    }
    
    response = requests.post(VOICE_DESIGN_URL, json=payload, headers=headers, timeout=60)
    data = response.json()
    
    if data.get("base_resp", {}).get("status_code") != 0:

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Custom voice design, audio upload to Feishu, and sending audio messages are materially broader actions than the headline description suggests, especially when combined with unsupported claims about other features. The mismatch makes the skill more dangerous in context because it is chat-integrated and can move user-derived content across service boundaries without clear upfront disclosure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Custom voice design, audio upload to Feishu, and sending audio messages are materially broader actions than the headline description suggests, especially when combined with unsupported claims about other features. The mismatch makes the skill more dangerous in context because it is chat-integrated and can move user-derived content across service boundaries without clear upfront disclosure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Custom voice design, audio upload to Feishu, and sending audio messages are materially broader actions than the headline description suggests, especially when combined with unsupported claims about other features. The mismatch makes the skill more dangerous in context because it is chat-integrated and can move user-derived content across service boundaries without clear upfront disclosure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Custom voice design, audio upload to Feishu, and sending audio messages are materially broader actions than the headline description suggests, especially when combined with unsupported claims about other features. The mismatch makes the skill more dangerous in context because it is chat-integrated and can move user-derived content across service boundaries without clear upfront disclosure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Custom voice design, audio upload to Feishu, and sending audio messages are materially broader actions than the headline description suggests, especially when combined with unsupported claims about other features. The mismatch makes the skill more dangerous in context because it is chat-integrated and can move user-derived content across service boundaries without clear upfront disclosure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Custom voice design, audio upload to Feishu, and sending audio messages are materially broader actions than the headline description suggests, especially when combined with unsupported claims about other features. The mismatch makes the skill more dangerous in context because it is chat-integrated and can move user-derived content across service boundaries without clear upfront disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation does not clearly warn users that the skill may read their most recent or replied-to message and send the extracted text to external services. This is a direct privacy and consent problem because users may believe they are converting only visible input while the skill actually accesses conversation history and transmits it beyond the local environment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata describes only text-to-speech, but the code also uploads generated audio to Feishu and sends a chat message. This hidden secondary capability materially changes the data flow and can cause users to disclose content to an external messaging platform without informed consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Feishu messaging is not necessary for a basic TTS skill and expands the capability from conversion to outbound communication. In this context, that makes the skill more dangerous because text provided for speech generation can be silently turned into a message delivery action to a recipient controlled by configuration.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/tts.py (reported line 90)May include surrounding context.

python
def get_feishu_token():
    """获取飞书 access token"""
    import requests
    r = requests.post(
        "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/tts_from_chat.py (reported line 34)May include surrounding context.

python
def get_feishu_token():
    """获取飞书 access token"""
    import requests
    r = requests.post(
        "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documented conversational trigger of users saying 转语音 is broad and does not describe authentication, authorization, or strict activation boundaries. In a chat-integrated skill that sends generated audio to Feishu and can act on recent messages, an ambiguous trigger can cause unintended activation, message conversion, or abuse by other participants in the conversation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The README instructs users to run npx clawhub install minimax-tts-feishu without pinning a specific version of the package or tool. This creates a supply-chain risk: a later malicious or compromised release of clawhub or its resolution path could execute attacker-controlled code during installation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The trigger <user_text> <open_id> command description says it triggers TTS from chat context but does not define activation scope, trust boundaries, or whether the provided open_id is validated. In this skill context, ambiguity is more dangerous because the feature can transform prior chat content and deliver it to a Feishu recipient, creating opportunities for unauthorized or misdirected output.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The Chinese documentation repeats the broad phrase-based trigger 转语音 without disambiguation or explicit safety constraints. In a messaging skill, such vague natural-language activation can be triggered accidentally or by unauthorized users, causing unexpected conversion of chat content into audio and delivery to a configured recipient.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The Chinese installation section repeats the same unpinned npx clawhub install minimax-tts-feishu command, exposing users to the same supply-chain execution risk. Because npx may fetch and run the latest available package, a compromised upstream package could lead to arbitrary code execution on the user's machine.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The Chinese trigger <用户消息> <用户OpenID> command documentation lacks precision about whose context is used, how the target OpenID is authorized, and what protections exist against misuse. Given the skill's ability to send audio to Feishu, unclear trigger scope can enable privacy leaks, spam, or delivery of transformed content to unintended recipients.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documentation declares no explicit tool scope or permissions even though the described behavior requires environment variable access, local file read/write, and outbound network calls. This is dangerous because users and reviewers cannot accurately assess what data the skill can access or exfiltrate, especially since it interacts with chat content and external APIs.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
index.js:19