Back to skill

Security audit

minimax-mcp

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent MiniMax search/image purpose, but it needs review because its executable dependency and credential/data handling are under-scoped and partly inconsistent.

Review before installing. Use a pinned and reviewed minimax-coding-plan-mcp version, keep the API key in environment variables or a secret manager rather than config.json, and avoid sending private screenshots, documents, internal URLs, or secrets through the image/search features. Only set MINIMAX_PYTHON to a trusted absolute Python executable path.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/minimax_mcp.js:32
Finding
Command Injection Through the MINIMAX_PYTHON Environment Variable<![CDATA[ ## Vulnerability Details **File Location**: `scripts/minimax_mcp.js`, lines 32–45 **Vulnerability Type**: OS command injection through an environment-controlled executable path **Risk Level**: High ### Vulnerable Code ```javascript const pythonExe = process.env.MINIMAX_PYTHON || defaultPy; const apiHost = process.env.MINIMAX_API_HOST || 'https://api.minimaxi.com'; function runMCP(messages) { const input = messages.map(m => JSON.stringify(m)).join('\n') + '\n'; const result = execSync(`"${pythonExe}" -m minimax_mcp.server`, { env: { ...process.env, MINIMAX_API_KEY: apiKey, MINIMAX_API_HOST: apiHost, FASTMCP_LOG_LEVEL: 'ERROR', REQUESTS_CA_BUNDLE: VENV_CERTIFI_CA }, input, maxBuffer: 10 * 1024 * 1024, timeout: 60000, shell: true, windowsHide: true }); ``` ### Technical Analysis The value of `MINIMAX_PYTHON` is read from the process environment and interpolated directly into a command string passed to `execSync`. The command is explicitly executed with `shell: true`. Wrapping the value in double quotes is not sufficient shell escaping. A malicious value containing a closing quote followed by shell metacharacters can terminate the intended executable token and append another command. The exact metacharacters required depend on the operating system shell. This issue is reachable whenever the wrapper runs an MCP operation, including the `search`, `image`, and `tools` commands. Exploitation requires the attacker to influence the environment inherited by the Node.js process, such as through an editable OpenClaw configuration, deployment configuration, wrapper script, or compromised parent process. ### Attack Path 1. The attacker obtains the ability to modify `MINIMAX_PYTHON` in the environment or OpenClaw configuration. 2. The attacker supplies a value that closes the quoted executable path and appends a shell command. 3. A user or agent invokes the skill using `search`, `image`, or `tools`. 4. `runMCP()` constructs a com ...[truncated 829 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Avoid constructing a shell command. Invoke the executable directly with a fixed argument array and disable shell processing: ```javascript const { execFileSync } = require('child_process'); const result = execFileSync(pythonExe, ['-m', 'minimax_mcp.server'], { env: { ...process.env, MINIMAX_API_KEY: apiKey, MINIMAX_API_HOST: apiHost, FASTMCP_LOG_LEVEL: 'ERROR', REQUESTS_CA_BUNDLE: VENV_CERTIFI_CA }, input, maxBuffer: 10 * 1024 * 1024, timeout: 60000, windowsHide: true, shell: false }); ``` Additionally: 1. Resolve the configured path to an absolute path. 2. Verify that it points to an existing regular executable file. 3. Where practical, restrict it to an administrator-approved virtual environment. 4. Reject control characters and unexpected path formats. 5. Protect configuration and environment-setting mechanisms from modification by untrusted users. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL_en.md:24
Finding
Unpinned Third-Party MCP Package Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL_en.md`, lines 24–27 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```powershell # Create venv (E: drive, no C: usage) python -m venv E:\.uv-venv # Install MCP package E:\.uv-venv\Scripts\pip.exe install minimax-coding-plan-mcp ``` The equivalent unpinned installation command also appears in `SKILL.md`. ### Technical Analysis The documented installation command retrieves the latest available release of `minimax-coding-plan-mcp` rather than a specifically reviewed version. This conflicts with the technical-details section, which identifies version `0.0.4`, because the actual command does not enforce that version. A future malicious or compromised release could therefore become part of the effective skill implementation without any change to the audited repository. The package is subsequently executed as a module by: ```javascript execSync(`"${pythonExe}" -m minimax_mcp.server`, { ``` The child process receives the MiniMax API key and other inherited environment variables. Consequently, compromise of the dependency can affect both local execution and credential confidentiality. ### Attack Path 1. The upstream package, maintainer account, distribution infrastructure, or a future package release is compromised. 2. A user follows the documented unpinned `pip install` command. 3. `pip` downloads and installs the then-current compromised release. 4. The user invokes any skill operation. 5. The wrapper executes `python -m minimax_mcp.server`. 6. Malicious package code runs locally with the user's privileges and receives the environment supplied by the wrapper, including `MINIMAX_API_KEY`. ### Impact Assessment A compromised dependency could execute arbitrary Python code with the same privileges as the user running the skill. It could access the MiniMax API key, read or alter accessible local files, make network requests, manipulate search or imag ...[truncated 258 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Pin the package to a reviewed version instead of installing an unconstrained latest release: ```powershell E:\.uv-venv\Scripts\pip.exe install minimax-coding-plan-mcp==0.0.4 ``` For stronger supply-chain protection: 1. Create a locked requirements file containing exact transitive dependency versions. 2. Record approved package hashes. 3. Install with `pip install --require-hashes -r requirements.txt`. 4. Use a trusted package index explicitly and disallow unexpected extra indexes. 5. Review dependency updates before changing the lock file. 6. Make the installation instructions in `SKILL.md` and `SKILL_en.md` consistent with the version claimed in the technical documentation. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
config.example.json:2
Finding
Configuration Template Encourages Plaintext API-Key Storage<![CDATA[ ## Vulnerability Details **File Location**: `config.example.json`, lines 2–4 **Vulnerability Type**: Insecure plaintext credential handling **Risk Level**: Medium ### Vulnerable Code ```json "_comment": "复制此文件为 config.json,填入你的 API Key", "MINIMAX_API_KEY": "", "MINIMAX_API_HOST": "https://api.minimaxi.com" ``` The comment translates to an instruction to copy the file to `config.json` and enter the user's API key. ### Technical Analysis The configuration template instructs users to store the MiniMax API key in a plaintext file inside the project directory. This contradicts the primary documentation, which states that credentials should be injected through environment variables and not written to files. The JavaScript implementation does not read `config.json`; it reads `process.env.MINIMAX_API_KEY`. As a result, the template both creates unnecessary credential exposure and may not configure the skill successfully. Plaintext project-local credentials are vulnerable to accidental source-control commits, project archives, backups, support bundles, overly broad filesystem permissions, and disclosure when the directory is shared. ### Attack Path 1. A user copies `config.example.json` to `config.json` as instructed. 2. The user places a valid MiniMax API key in the new file. 3. The project directory is committed, archived, backed up, uploaded, or shared. 4. An unauthorized party obtains the plaintext configuration file. 5. The party extracts the API key and uses it against the MiniMax service within the permissions and quota assigned to that credential. ### Impact Assessment Disclosure can allow unauthorized use of the affected MiniMax account or subscription quota and may expose activity associated with the compromised credential. The exact service permissions depend on the capabilities granted to the API key. This issue does not expose a bundled secret because the example value is empty. The risk arises from the explicit instruction to place a r ...[truncated 43 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `MINIMAX_API_KEY` and the instruction to copy a real key into a project-local JSON file. 2. Document only environment-variable or approved secret-manager configuration. 3. If local development requires a secret file, use a clearly named file such as `.env.local`, ensure it is excluded through `.gitignore`, and restrict its filesystem permissions. 4. Add secret-scanning checks to version-control and release workflows. 5. Ensure all documentation consistently states that credentials must not be stored in repository files. 6. Consider failing with a concise reference to secure environment setup rather than displaying examples that encourage plaintext storage. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (9)

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill documents sending either local image files or remote image URLs to an external image-understanding service, but it gives no warning that image contents may leave the local machine and be processed by a third party. This can lead users to unknowingly upload sensitive screenshots, documents, or personal data, especially because the examples normalize local-file analysis as a routine action.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding
uvx/uv tool run commands without ==version create a rug-pull risk.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding
uvx/uv tool run commands without ==version create a rug-pull risk.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding
uvx/uv tool run commands without ==version create a rug-pull risk.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding
uvx/uv tool run commands without ==version create a rug-pull risk.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill documents local-file and URL-based image analysis without warning that images may be transmitted to third-party services for processing. Users may unknowingly upload sensitive screenshots, documents, or intranet-accessible image URLs, creating confidentiality and privacy risks that are amplified by the skill's convenience-oriented framing.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The script sends user-provided search queries and image sources directly to the external MiniMax API through the MCP server, but at execution time it does not present any clear disclosure, confirmation, or consent prompt. This creates a real data-exposure risk because users may provide sensitive text, local file paths, or remote image URLs without realizing that the content will be transmitted to a third-party service.

Missing User Warnings

Low
Confidence
89% confidence
Finding
The fallback chain states that search may automatically switch to Brave Search or Qwen Chat, but it does not warn users that their queries may be transmitted to third-party services with different privacy and retention practices. This is dangerous because users may assume a single provider or local handling when in fact their prompts could be redirected externally during failure conditions.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The natural-language comment is written only in Chinese and provides setup instructions without offering any language choice or alternative. This can violate a language/locale policy when skills are expected to avoid forcing a specific language absent explicit justification or user opt-in.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/minimax_mcp.js:38