Back to skill

Security audit

Minimax Tools

Security checks for vulnerabilities and agentic risk

Overview

This MiniMax skill mostly does what it says, but it can send your API key to an arbitrary configured host and uploads local media to an external service with limited privacy warning.

Install only if you are comfortable sending prompts and local media, including voice recordings and reference images, to MiniMax. Use a dedicated, revocable MiniMax API key, verify `MINIMAX_BASE_URL` is the official HTTPS MiniMax endpoint before running commands, and avoid uploading voices or personal media without clear authorization.

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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/common.py:16
Finding

API Key Disclosure Through an Unrestricted Base URL Override

Content
View full analysis
str: key = os.environ.get(API_KEY_ENV) if not key: raise MiniMaxError(f"Missing {API_KEY_ENV} in environment") return key def headers(extra: Optional[Dict[str, str]] = None) -> Dict[str, str]: h = {"Authorization": f"Bearer {get_api_key()}"} if extra: h.update(extra) return h def request_json(method: str, path: str, *, params=None, json_body=None, timeout: int = 180) -> Dict[str, Any]: resp = requests.request( method, BASE_URL + path, headers=headers({"Content-Type": "application/json"}), params=params, json=json_body, timeout=timeout, ) ``` The same issue also affects multipart requests in `scripts/common.py:64-73`: ```python def request_multipart(path: str, *, data=None, files=None, timeout: int = 180) -> Dict[str, Any]: resp = requests.post( BASE_URL + path, headers={"Authorization": f"Bearer {get_api_key()}"}, data=data, files=files, timeout=timeout, ) ``` ### Technical Analysis The Skill legitimately requires `MINIMAX_API_KEY` and must transmit it to the MiniMax API for authentication. However, `MINIMAX_BASE_URL` is accepted directly from the environment without validating its scheme, hostname, port, or other URL components. Every authenticated API call attaches the bearer credential to the configured destination. Consequently, a value such as `http://attacker.example` causes the API key to be transmitted to an attacker-controlled server. An HTTP destination also exposes the credential to passive network interception and active man-in-the-middle attacks. The netw ...[truncated 1629 chars]
Remediation
View remediation
str: parsed = urlparse(value) if parsed.scheme != "https": raise MiniMaxError("MINIMAX_BASE_URL must use HTTPS") if parsed.username or parsed.password: raise MiniMaxError("Credentials are not allowed in MINIMAX_BASE_URL") return value.rstrip("/") ``` 2. Allowlist the official hostname by default: ```python ALLOWED_API_HOSTS = {"api.minimaxi.com"} if parsed.hostname not in ALLOWED_API_HOSTS: raise MiniMaxError("Untrusted MiniMax API host") ``` 3. If custom enterprise or proxy endpoints are a required feature, require an additional explicit opt-in such as `MINIMAX_ALLOW_CUSTOM_HOST=1` and clearly warn that the API key will be shared with that host. 4. Reject unexpected ports, fragments, query strings, and URL user-information unless they are explicitly required. 5. Construct endpoint URLs with a safe URL-joining mechanism rather than direct string concatenation. 6. Add tests confirming that plaintext HTTP, embedded credentials, malformed URLs, and untrusted hosts are rejected before the API key is read or transmitted. 7. Document the trust implications of custom endpoints and recommend narrowly scoped, revocable API keys where supported. ]]>

T08 · Insecure Dependencies

Note
Location
README.md:82
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
``` 3. Include and pin required transitive dependencies through a lock file generated by a tool such as `pip-tools`, Poetry, or uv. 4. Update the documentation to install from the reviewed manifest: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 5. Recommend installation in an isolated virtual environment rather than the system Python environment. 6. Use automated dependency monitoring and periodically review and update pinned versions to avoid leaving known vulnerabilities unresolved. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (22)

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

Critical
Category
Data Flow
Confidence
92% confidence
Finding

The request target is derived from MINIMAX_BASE_URL, an environment variable, and the code sends the Authorization bearer token to whatever host that value points to. If an attacker can influence the runtime environment, they can redirect requests to an attacker-controlled server and capture the API key or uploaded content, which is effectively SSRF plus credential exfiltration.

Content

Scanner excerpt · scripts/common.py (reported line 67)May include surrounding context.

python
def request_multipart(path: str, *, data=None, files=None, timeout: int = 180) -> Dict[str, Any]:
    resp = requests.post(
        BASE_URL + path,
        headers={"Authorization": f"Bearer {get_api_key()}"},
        data=data,

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

Critical
Category
Data Flow
Confidence
93% confidence
Finding

This download function also builds its destination from MINIMAX_BASE_URL and includes the Authorization header, so a manipulated environment can cause authenticated GET requests to an attacker-controlled endpoint. That can leak the API key, request metadata, and potentially enable internal network access if this runs in a privileged environment.

Content

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

python
def request_stream_download(path: str, params: Dict[str, Any], out_path: Path, timeout: int = 600) -> Path:
    out_path.parent.mkdir(parents=True, exist_ok=True)
    with requests.get(BASE_URL + path, headers=headers(), params=params, stream=True, timeout=timeout) as resp:
        if resp.status_code >= 400:
            try:
                j = resp.json()

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied code only implements voice-cloning-related commands: upload-clone, upload-prompt, clone, and clone-from-files. It interacts with file upload and /v1/voice_clone endpoints and can download a returned demo audio. There is no implementation here for text-to-speech synthesis, image generation, video generation, or music generation. Because the declared description presents the skill as a direct MiniMax integration for all of those capabilities, while this code chunk is limited to voice cloning, the description does not accurately represent what this specific chunk actually does.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/minimax.py (reported line 47)May include surrounding context.

python
print(f"Available: {', '.join(COMMAND_MAP)}", file=sys.stderr)
        return 2

    proc = subprocess.run([sys.executable, str(target), *argv[1:]], env=os.environ.copy())
    return proc.returncode

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README advertises workflows that upload audio, images, and video to a third-party API and download generated outputs to local storage, but it does not warn users that potentially sensitive media and prompts are transmitted off-host. In a skill intended for local automation, this omission can cause users to unknowingly expose private biometric voice samples, personal images, or confidential content to an external service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares powerful capabilities including environment access, file read/write, network, and shell execution, but does not constrain them with an explicit permissions or allowed-tools scope. In a skill that invokes local Python wrappers and sends data to an external API, this increases the chance of over-privileged execution and unintended access to local files, secrets, or network resources.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The overview states that the skill calls MiniMax APIs directly but does not prominently disclose that prompts, images, audio, video inputs, and generated media may be transmitted over the network to an external service. In a multimodal skill handling local files, this omission can lead to accidental exfiltration of sensitive content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The voice cloning section explains technical constraints but does not clearly warn that user audio will be uploaded to MiniMax, which may include biometric voice data and sensitive speech content. Users could unknowingly transmit personal or regulated data to a third-party service without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The notes explicitly document uploading source audio for voice cloning and saving generated outputs locally, but provide no warning about consent, sensitive biometric data handling, retention, or disclosure risks. In a skill that operationalizes voice cloning workflows, this omission can lead users to process third-party voice data without understanding privacy, legal, or security implications.

Content

No source excerpt is available for this finding.

Tainted flow: 'data' from requests.post (line 51, network input) → requests.post (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/common.py (reported line 67)May include surrounding context.

python
def request_multipart(path: str, *, data=None, files=None, timeout: int = 180) -> Dict[str, Any]:
    resp = requests.post(
        BASE_URL + path,
        headers={"Authorization": f"Bearer {get_api_key()}"},
        data=data,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/minimax.py (reported line 47)May include surrounding context.

python
print(f"Available: {', '.join(COMMAND_MAP)}", file=sys.stderr)
        return 2

    proc = subprocess.run([sys.executable, str(target), *argv[1:]], env=os.environ.copy())
    return proc.returncode

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script accepts local paths in --subject-reference, converts them to data URLs, and includes the image contents in the POST body to the remote MiniMax image_generation API. In a tool intended for agent use, this can cause unintentional exfiltration of local files the user may not realize are being uploaded, especially because the behavior is implicit and there is no explicit confirmation or warning at the upload point.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code reads arbitrary text from a user-supplied lyrics file and includes it in the request body sent to the remote /v1/music_generation endpoint. Within this file there is no confirmation prompt, print/log disclosure, or comment/docstring warning that local file contents will be uploaded to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code reads bytes from a local path, base64-encodes the file, and passes it through request_json as part of the video-generation request. Although the CLI help notes that a local image path is accepted, there is no explicit warning, prompt, or user-facing disclosure that local file contents will be uploaded to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This function sends the assembled request body to the video-generation API, which may include user prompts and image data. The file has no visible confirmation prompt or user-facing disclosure explaining that supplied content is transmitted to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The upload_file helper opens a local file and sends it via request_multipart to /v1/files/upload, which transmits user-provided audio off-system. In this file there is no confirmation prompt, warning print/log, or explanatory comment/docstring disclosing that file contents will be uploaded to a remote service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The clone command builds a request body containing file_id, optional text, prompt_text, and prompt_audio references, then posts it to /v1/voice_clone. Although remote cloning is the functional purpose of the script, this file does not visibly warn users that provided text and referenced uploaded audio will be transmitted to an external service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The note assigns fixed default voices by language, explicitly tying behavior to Chinese and English without stating that the user can choose or override locale/voice settings. SQP-3 applies to natural-language policy concerns when a skill appears to force a specific language or locale behavior without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script saves output images to local paths via download_url and save_base64_image, which affects the user's filesystem. Although writing output is part of an image-generation wrapper's purpose, this file itself provides no visible print, prompt, comment, or docstring warning that files will be created locally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill sets --voice-lang to zh by default, which imposes a specific language/locale choice when the user does not explicitly select one. The policy requires offering language choice or opt-in rather than forcing a locale implicitly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The function writes retrieved video content to a local output path, either user-specified or auto-generated, but provides no print/log/comment warning about the file write. While downloading implies output, this file does not include any disclosure of the write location or that a local file will be created.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

When --download-demo is used, the script writes the generated demo audio to a local output path via download_url. The file write is optional and user-triggered, but this source file lacks a visible warning or explanatory comment about creating local output files.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.