Back to skill

Security audit

MiniMax Search & VLM

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward MiniMax API helper, but users should understand that searches and images are sent to MiniMax and one example uses an unsafe temporary-file pattern.

Install only if you are comfortable using MiniMax as a third-party service for search and image analysis. Do not send confidential queries, credentials, private documents, or sensitive images. If using the remote-image example, replace the fixed /tmp/tmp_img.jpg path with a securely created temporary file and clean it up afterward.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:116
Finding

Predictable Temporary File Enables Symlink-Based File Overwrite

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 116-124
Vulnerability Type: Predictable temporary file and unsafe file creation
Risk Level: Medium

Vulnerable Code

bash
source ~/.openclaw/config/minimax-api.env
curl -s "https://example.com/image.jpg" -o /tmp/tmp_img.jpg
curl -s "https://api.minimaxi.com/v1/coding_plan/vlm" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"prompt\":\"描述这张图片\",\"image_url\":\"data:image/jpeg;base64,$(base64 -w0 /tmp/tmp_img.jpg)\"}"

Technical Analysis

The documented command stores downloaded content at the fixed, globally predictable path /tmp/tmp_img.jpg. It does not create the file atomically, verify that the path is a regular file, restrict access to a private temporary directory, or remove the file after use.

On systems where /tmp is shared by multiple users or processes, an attacker can create /tmp/tmp_img.jpg before the command runs. In particular, the attacker may create a symbolic link at that path. Because curl -o follows symbolic links when opening its output destination, the download can truncate and overwrite the symlink target with the privileges of the user running the Skill command.

There is also a time-of-check/time-of-use exposure between the download and the subsequent base64 operation. Manipulation of the predictable path may cause content other than the intended image to be encoded and transmitted to the MiniMax API.

Attack Path

  1. An attacker with local access predicts that the victim will use /tmp/tmp_img.jpg.
  2. Before the command runs, the attacker creates that path as a symbolic link to a file writable by the victim:
    bash
    ln -s /home/victim/.config/example.conf /tmp/tmp_img.jpg
    
  3. The victim executes the documented image-analysis command.
  4. curl follows the symbolic link and writes the downloaded image into the target file.
  5. The ...[truncated 1040 chars]
Remediation
View remediation

Remediation Suggestions

Replace the fixed path with a securely and atomically created temporary file. Quote all path expansions, fail on HTTP errors, restrict the file permissions, validate the downloaded object, and guarantee cleanup:

bash
source ~/.openclaw/config/minimax-api.env

umask 077
IMG_PATH="$(mktemp "${TMPDIR:-/tmp}/minimax-image.XXXXXX")" || exit 1
trap 'rm -f -- "$IMG_PATH"' EXIT HUP INT TERM

curl --fail --silent --show-error \
  --output "$IMG_PATH" \
  -- "https://example.com/image.jpg"

test -f "$IMG_PATH" && test ! -L "$IMG_PATH" || exit 1

IMAGE_DATA="$(base64 -w0 -- "$IMG_PATH")" || exit 1
curl --fail --silent --show-error \
  "https://api.minimaxi.com/v1/coding_plan/vlm" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"prompt\":\"Describe this image\",\"image_url\":\"data:image/jpeg;base64,$IMAGE_DATA\"}"

For stronger isolation, create a private temporary directory with mktemp -d, store the image inside it, and remove the entire directory on exit. The instructions should also recommend validating the response content type and enforcing the documented maximum file size before transmitting the image.

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
  • Rogue AgentSelf-Modification, Session Persistence
Findings (14)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

md
source ~/.openclaw/config/minimax-api.env

# 搜索示例
curl -s "https://api.minimaxi.com/v1/coding_plan/search" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"今天科技新闻"}'

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

md
source ~/.openclaw/config/minimax-api.env

# 搜索示例
curl -s "https://api.minimaxi.com/v1/coding_plan/search" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"今天科技新闻"}'

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file forces a specific language/locale for all user-facing descriptions and usage instructions. Under the policy, a skill should not impose a language without giving users an explicit choice or documenting a justified locale constraint.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
"label": "配置 MiniMax API Key",
            "steps": [
              "创建配置文件: echo 'MINIMAX_API_KEY=你的API密钥' > ~/.openclaw/config/minimax-api.env",
              "设置权限: chmod 600 ~/.openclaw/config/minimax-api.env"
            ]
          }
        ]

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

bash
# 创建配置目录(如不存在)
mkdir -p ~/.openclaw/config

# 添加 API Key(替换为你自己的 key)
echo 'MINIMAX_API_KEY=你的API密钥' > ~/.openclaw/config/minimax-api.env

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

bash
# 创建配置目录(如不存在)
mkdir -p ~/.openclaw/config

# 添加 API Key(替换为你自己的 key)
echo 'MINIMAX_API_KEY=你的API密钥' > ~/.openclaw/config/minimax-api.env

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

echo 'MINIMAX_API_KEY=你的API密钥' > ~/.openclaw/config/minimax-api.env

设置安全权限

chmod 600 ~/.openclaw/config/minimax-api.env

text

> API Key 需要从 MiniMax 开发者平台获取:https://platform.minimaxi.com

External Transmission

Medium
Category
Data Exfiltration
Confidence
76% confidence
Finding

The documented API call transmits data to api.minimaxi.com, which is expected functionality for this skill but still represents external data exposure. If users unknowingly include sensitive information, that data leaves the local environment and is subject to third-party handling.

Content

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

md
source ~/.openclaw/config/minimax-api.env

# 搜索示例
curl -s "https://api.minimaxi.com/v1/coding_plan/search" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"今天科技新闻"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
76% confidence
Finding

The documented API call transmits data to api.minimaxi.com, which is expected functionality for this skill but still represents external data exposure. If users unknowingly include sensitive information, that data leaves the local environment and is subject to third-party handling.

Content

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

md
source ~/.openclaw/config/minimax-api.env

# 搜索示例
curl -s "https://api.minimaxi.com/v1/coding_plan/search" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"今天科技新闻"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The image-understanding example base64-encodes a local file and transmits it to an external service, which can exfiltrate sensitive local content if the path is misused or user intent is unclear. Because the feature explicitly supports local files, the context makes privacy risk higher than ordinary web search.

Content

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

md
# 分析本地图片
IMG_PATH="/path/to/image.jpg"
curl -s "https://api.minimaxi.com/v1/coding_plan/vlm" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"prompt\":\"描述这张图片\",\"image_url\":\"data:image/jpeg;base64,$(base64 -w0 $IMG_PATH)\"}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

This search example sends query content to a third-party API and pipes results into local processing. While ordinary for a search integration, it still exposes prompt contents externally and may normalize sending arbitrary user text off-platform without adequate warning.

Content

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

bash
source ~/.openclaw/config/minimax-api.env
curl -s "https://api.minimaxi.com/v1/coding_plan/search" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"关键词"}' | python3 -c "

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill includes instructions to download an arbitrary remote image to /tmp before sending it onward for analysis, which expands its capability beyond simple search/VLM invocation into general remote file retrieval. This can enable SSRF-like misuse, retrieval of attacker-controlled content, and accidental handling of untrusted files without validation or provenance checks.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The workflow downloads a remote image and then transmits its contents to MiniMax, causing two external data flows: retrieval from an arbitrary site and upload to a third party. This increases privacy and supply-chain risk because attacker-controlled content can be introduced and local processing may occur on untrusted files.

Content

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

bash
source ~/.openclaw/config/minimax-api.env
curl -s "https://example.com/image.jpg" -o /tmp/tmp_img.jpg
curl -s "https://api.minimaxi.com/v1/coding_plan/vlm" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This example uploads the contents of a downloaded image to MiniMax after first retrieving it from the internet, creating a chained untrusted-input-to-third-party-transfer path. The combination increases risk of privacy leakage, unsafe content handling, and user confusion about what data is being transmitted.

Content

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

bash
source ~/.openclaw/config/minimax-api.env
curl -s "https://example.com/image.jpg" -o /tmp/tmp_img.jpg
curl -s "https://api.minimaxi.com/v1/coding_plan/vlm" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"prompt\":\"描述这张图片\",\"image_url\":\"data:image/jpeg;base64,$(base64 -w0 /tmp/tmp_img.jpg)\"}"

Static analysis

No suspicious patterns detected.