Back to skill

Security audit

voice-minimax

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but its default Feishu delivery target and unsafe command patterns create real risk of leaking or mishandling user content.

Review this skill carefully before installing. Only use it for non-sensitive text, replace the Feishu recipient with an explicitly chosen destination, confirm the recipient before each send, keep the MiniMax key out of command strings, and prefer a reviewed script using secure temporary files and cleanup.

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 (4)

other

Error
Location
SKILL.md:7
Finding

Generated Voice Content Is Sent to a Preconfigured External Recipient

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 7-9 and 42-46
Vulnerability Type: Unauthorized external data transmission
Risk Level: High

Vulnerable Code

text
发布前需替换以下占位符:
- `你的MiniMax API Key` → 你的 MiniMax API Key
- `飞书用户ID` → 飞书用户 open_id(默认:ou_c1e599d5838a3f2ab8c4dbc40b709cf2)
bash
lark-cli --as bot im +messages-send \
  --user-id 飞书用户ID \
  --msg-type audio \
  --audio ./voice.opus

Technical Analysis

The skill defines a specific Feishu open_id as the default recipient and instructs the agent to send generated audio through lark-cli. The default behavior for a generic voice-generation request includes external delivery rather than limiting the operation to local file generation.

The project contains no mechanism that verifies the recipient belongs to the requesting user, obtains explicit approval for the destination, or displays the resolved recipient before transmission. Consequently, user-provided text, once converted to speech, can be delivered to an unrelated or unauthorized Feishu account.

The source text is also transmitted to the MiniMax API as part of the TTS process. That external processing is functionally required for this implementation, but it should still be disclosed and explicitly authorized where the input may be sensitive.

Attack Path

  1. The skill is configured without replacing the documented default Feishu recipient, or the placeholder is replaced with that default.
  2. A user asks the agent to generate speech from confidential or sensitive text.
  3. The workflow submits the text to MiniMax and writes the resulting audio locally.
  4. The skill invokes lark-cli --as bot im +messages-send.
  5. The generated audio is delivered to the preconfigured Feishu account without destination verification or per-send confirmation.

Impact Assessment

Successful exploitation or accidental activation can disclose all narrated content to th ...[truncated 390 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the embedded default Feishu open_id.
  • Make local audio-file generation the default behavior.
  • Require the user to provide or select the destination explicitly.
  • Display the resolved recipient and obtain confirmation immediately before every external send.
  • Validate the recipient against an administrator-controlled allowlist.
  • Clearly disclose that source text is sent to MiniMax for processing.
  • Do not transmit sensitive content unless the user has explicitly authorized both the TTS provider and the final destination.
  • Record recipient confirmation in an auditable manner without logging sensitive source text or credentials.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:15
Finding

User-Controlled Text May Be Interpolated into Executable Python Source

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 15-25
Vulnerability Type: Code injection through unsafe source-code interpolation
Risk Level: High

Vulnerable Code

bash
python3 -c "
import urllib.request, json

MINIMAX_KEY = '你的MiniMax API Key'

data = json.dumps({
    'model': 'speech-2.8-hd',
    'text': '文字内容',
    'stream': False,
    'voice_setting': {'voice_id': 'male-qn-qingse', 'speed': 1},

Technical Analysis

The workflow places the narration text placeholder inside a Python string literal embedded in a python3 -c command. If an agent implements the documented workflow by directly replacing 文字内容 with user-controlled text, quotation marks and crafted Python syntax can terminate the string literal and introduce additional executable statements.

There are two parsing contexts: the surrounding shell double-quoted argument and the inner Python single-quoted string. Direct textual substitution without context-aware serialization can therefore cause Python code injection or shell parsing problems. Merely validating that the input is text does not neutralize syntax significant to either parser.

Attack Path

  1. An attacker submits narration text containing a single quote followed by valid Python statements and syntax that repairs or comments out the remainder of the original expression.
  2. The agent directly replaces the 文字内容 placeholder with the supplied value.
  3. The replacement closes the intended Python string literal.
  4. Attacker-controlled Python statements become part of the python3 -c program.
  5. Python executes those statements with the same operating-system identity and permissions as the agent process.

The exact payload would depend on how the agent performs substitution and how shell quoting is preserved, but the dangerous primitive is the construction of executable source code from untrusted input.

Impact Assessment

Successful exploitation ...[truncated 524 chars]

Remediation
View remediation

Remediation Suggestions

  • Never generate Python source code by interpolating user-controlled text.
  • Move the implementation into a standalone, reviewed Python script.
  • Supply narration through standard input or a data file opened as data rather than code.
  • If a command-line argument is necessary, invoke the process through an argument-array API without a shell.
  • Serialize the request body exclusively through json.dumps after the text has already been received as a runtime value.
  • Apply reasonable input-size limits and reject invalid encoding, but do not treat filtering as a substitute for separating code from data.
  • Add tests containing quotes, backslashes, line breaks, shell metacharacters, and Python syntax to verify that all input remains inert data.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:15
Finding

MiniMax API Key Is Embedded in a Process Command Argument

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 15-18
Vulnerability Type: Insecure credential handling
Risk Level: Medium

Vulnerable Code

bash
python3 -c "
import urllib.request, json

MINIMAX_KEY = '你的MiniMax API Key'

The key is subsequently placed into the authorization header:

python
headers={'Authorization': f'Bearer {MINIMAX_KEY}', 'Content-Type': 'application/json'}

Technical Analysis

The instructions require replacing a placeholder with the MiniMax API key inside the source passed to python3 -c. Because the complete program is supplied as a command-line argument, the credential becomes part of the process invocation.

Depending on operating-system configuration and the execution environment, command arguments may be visible through process-inspection interfaces, agent execution logs, telemetry, debugging output, shell history, or job metadata. Embedding the credential in reusable skill content can also cause it to be committed or shared accidentally.

Attack Path

  1. An operator replaces the placeholder with a valid MiniMax API key.
  2. The agent starts python3 -c with the complete program, including the plaintext key, in its argument vector.
  3. A local process monitor, another authorized user, execution logger, or retained job record captures the command arguments.
  4. The observer extracts the bearer credential.
  5. The stolen key is used to make unauthorized MiniMax API requests until it is revoked or expires.

Impact Assessment

Exposure can allow unauthorized use of the associated MiniMax account and consumption of its API quota. It may cause financial loss, service disruption through quota exhaustion, and activity attributed to the legitimate account.

The credential grants only the permissions associated with the MiniMax key; this issue alone does not provide operating-system privilege escalation.

Remediation
View remediation

Remediation Suggestions

  • Retrieve the API key from an approved secret manager at runtime.
  • If environment-based injection is unavoidable, use a narrowly scoped environment variable and ensure it is excluded from logs and diagnostic dumps.
  • Do not place credentials in command arguments, source files, documentation substitutions, generated scripts, or version control.
  • Use a standalone Python program that reads the secret at runtime.
  • Restrict the API key to the minimum required services, quota, and account scope.
  • Rotate any credential that has previously been inserted into this command.
  • Redact authorization headers and secret-bearing environment values from execution logs and error reports.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:37
Finding

Predictable Shared Temporary File Paths Permit Symlink and File-Clobbering Attacks

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 37-42 and 54-55
Vulnerability Type: Unsafe temporary-file handling
Risk Level: Medium

Vulnerable Code

python
audio_hex = result['data']['audio']
audio_bytes = bytes.fromhex(audio_hex)
with open('/tmp/voice.mp3', 'wb') as f:
    f.write(audio_bytes)
bash
ffmpeg -i /tmp/voice.mp3 -c:a libopus -ar 16000 -ac 1 -b:a 64k -vbr off -map_metadata -1 -bitexact /tmp/voice.opus -y
bash
cp /tmp/voice.mp3 ./voice.mp3

Technical Analysis

The workflow repeatedly uses the globally predictable paths /tmp/voice.mp3 and /tmp/voice.opus. Shared temporary directories are generally writable by other local users. The Python open(..., 'wb') call follows symbolic links and truncates an existing target. FFmpeg is also invoked with -y, which permits overwriting its output without confirmation.

An attacker with local access can pre-create one of these paths as a symbolic link or otherwise race the workflow. Whether a protected target can be overwritten depends on the skill runner's permissions and platform symlink protections. Even when protected targets are unavailable, concurrent runs can overwrite each other's files and cause one user's audio to be copied or sent by another run.

Temporary files are not removed after use, increasing the period during which generated content can be accessed by other processes if permissions permit.

Attack Path

  1. A local attacker predicts that the skill will use /tmp/voice.mp3 or /tmp/voice.opus.
  2. The attacker creates a symbolic link at one of those paths to a file writable by the skill runner, or races a concurrent skill invocation.
  3. The workflow opens or overwrites the predictable path.
  4. Generated bytes are written to the linked target, or another invocation's audio replaces the expected content.
  5. The corrupted or cross-session file can then be copied into the project or se ...[truncated 485 chars]
Remediation
View remediation

Remediation Suggestions

  • Create a unique private temporary directory for each invocation using a secure facility such as Python's tempfile.TemporaryDirectory.
  • Set restrictive permissions so only the skill runner can access generated files.
  • Create files atomically and exclusively, and do not follow symbolic links where supported.
  • Pass unique absolute paths directly between Python, FFmpeg, and lark-cli.
  • Avoid fixed output names in the project directory when concurrent runs are possible.
  • Remove temporary audio in a guaranteed cleanup block after successful or failed execution.
  • Configure the runtime so separate users or jobs cannot inspect one another's temporary directories.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description does not adequately warn users that provided text is sent to an external TTS provider, written to local files, and then transmitted onward through lark-cli to Feishu. This lack of transparency can lead users to submit sensitive content without realizing it leaves the local environment and persists temporarily on disk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The default trigger phrase "生成语音" is very broad and likely to overlap with ordinary conversational requests, increasing the chance that the skill activates unintentionally. Because activation leads to external API calls, local file creation in /tmp and the working directory, and message delivery to a Feishu user, an accidental trigger can cause unintended data transmission and actions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This code sends user-provided text and an API bearer token to an external service at api.minimaxi.com to generate speech, which is a genuine external transmission boundary. In context, the transmission is functionally necessary for cloud TTS, but it is still security-relevant because any sensitive input text is disclosed to a third party and the skill then creates local output files for further distribution.

Content

Scanner excerpt · SKILL.md (reported line 31)May include surrounding context.

md
}).encode()

req = urllib.request.Request(
    'https://api.minimaxi.com/v1/t2a_v2',
    data=data,
    headers={'Authorization': f'Bearer {MINIMAX_KEY}', 'Content-Type': 'application/json'}
)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 73)May include surrounding context.

md
| 参数 | 值 |
|------|-----|
| MiniMax API | https://api.minimaxi.com/v1/t2a_v2 |
| Model | speech-2.8-hd(不是 speech-01-turbo)|
| Voice ID | male-qn-qingse |
| OPUS 采样率 | 16000 Hz |