Back to skill

Security audit

vwu.ai MiniMax Models

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small vwu.ai chat wrapper, but it can send prompts and an API key to an undocumented, environment-controlled endpoint.

Review before installing. Only use this with a vwu.ai API key you are comfortable using for model calls, avoid placing secrets or regulated data in prompts, and make sure VWU_BASE_URL is unset or explicitly trusted. The script should ideally validate HTTPS vwu.ai endpoints and JSON-encode prompt/model values before broad use.

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

T09 · Insecure Skill Coding Practices

Error
Location
vwu-chat.sh:6
Finding
Attacker-Controlled API Endpoint Can Receive Credentials and Prompts<![CDATA[ ## Vulnerability Details **File Location**: `vwu-chat.sh`, lines 6 and 29–36 **Vulnerability Type**: Unvalidated destination configuration and credential disclosure **Risk Level**: High ### Vulnerable Code ```zsh VWU_BASE_URL="${VWU_BASE_URL:-https://vwu.ai}" ``` ```zsh response=$(curl -s "$VWU_BASE_URL/v1/chat/completions" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $VWU_API_KEY" \ -d "{ \"model\": \"$MODEL\", \"messages\": [{\"role\": \"user\", \"content\": \"$PROMPT\"}], \"stream\": false }") ``` ### Technical Analysis The script permits the `VWU_BASE_URL` environment variable to determine the complete destination of the API request. It does not validate the URL scheme, hostname, port, or presence of embedded credentials before attaching the `VWU_API_KEY` bearer token. Environment variables can cross a trust boundary when the script is launched by another process, automation framework, shell profile, or attacker-influenced wrapper. If `VWU_BASE_URL` is changed to an attacker-controlled endpoint, `curl` sends both the authorization credential and the user's prompt to that endpoint. The variable can also specify a cleartext HTTP URL, allowing network observers to intercept this information. The endpoint override is not documented in `SKILL.md`, making it less likely that users will recognize it as a security-sensitive configuration option. ### Attack Path 1. An attacker gains influence over the environment used to invoke the Skill, such as through a wrapper script, compromised automation configuration, or manipulated shell environment. 2. The attacker sets `VWU_BASE_URL` to an endpoint under their control, potentially using cleartext HTTP. 3. The user or Agent invokes `vwu-chat.sh` with a valid `VWU_API_KEY` and a prompt. 4. The script constructs the request URL from the attacker-controlled value. 5. `curl` transmits `Authorization: Bearer $VWU_API_KEY` and the prompt to the attack ...[truncated 849 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `VWU_BASE_URL` configurability if alternate endpoints are not a required feature. 2. If endpoint configuration is necessary, parse and validate the URL before making a request. 3. Require the `https` scheme and reject cleartext HTTP. 4. Enforce an explicit allowlist of trusted hostnames, such as `vwu.ai`. 5. Reject unexpected ports, embedded URL credentials, fragments, and malformed hostnames. 6. Keep TLS certificate verification enabled and do not introduce insecure `curl` options such as `-k`. 7. Document the endpoint override as a security-sensitive setting. 8. Consider using a separate credential for development or alternate endpoints rather than sending the production key to configurable destinations. Example restrictive validation: ```zsh VWU_BASE_URL="${VWU_BASE_URL:-https://vwu.ai}" if [ "$VWU_BASE_URL" != "https://vwu.ai" ]; then echo "Error: unsupported API endpoint" >&2 exit 1 fi ``` If multiple endpoints are legitimate, compare parsed schemes and hostnames against a fixed allowlist rather than relying on string prefixes. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
vwu-chat.sh:29
Finding
Unescaped User Input Permits JSON Request Manipulation<![CDATA[ ## Vulnerability Details **File Location**: `vwu-chat.sh`, lines 29–36 **Vulnerability Type**: JSON injection and malformed request generation **Risk Level**: Medium ### Vulnerable Code ```zsh response=$(curl -s "$VWU_BASE_URL/v1/chat/completions" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $VWU_API_KEY" \ -d "{ \"model\": \"$MODEL\", \"messages\": [{\"role\": \"user\", \"content\": \"$PROMPT\"}], \"stream\": false }") ``` ### Technical Analysis The `MODEL` and `PROMPT` values are inserted directly into a JSON string without JSON encoding. Characters with special meaning in JSON—including quotation marks, backslashes, newlines, tabs, and other control characters—are not escaped. A normal prompt containing quotes or line breaks can therefore produce invalid JSON. A deliberately crafted value can terminate the intended string and introduce additional JSON properties, objects, or messages. The exact result depends on how the remote API handles duplicate properties and attacker-created request structures. This is JSON injection rather than shell command injection. The variable expansions remain inside a quoted shell argument, so the reviewed code does not cause prompt text to be evaluated as a local shell command. Nevertheless, the boundary between untrusted input and the structured API request is not preserved. ### Attack Path 1. An attacker supplies or influences the model name or prompt passed to `vwu-chat.sh`. 2. The input contains JSON delimiters such as quotation marks, braces, brackets, or escaped content. 3. The script inserts the input directly into the JSON request body. 4. The supplied delimiters terminate or alter the intended JSON value. 5. The remote API either rejects the malformed request or interprets attacker-created fields or messages according to its JSON parser behavior. 6. The resulting request may differ from the single user-message request intended by the script. ...[truncated 850 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Construct the request body with a JSON-aware encoder instead of interpolating variables into JSON text. The script already depends on `jq`, so it can safely encode both values: ```zsh request_body=$(jq -n \ --arg model "$MODEL" \ --arg prompt "$PROMPT" \ '{ model: $model, messages: [ { role: "user", content: $prompt } ], stream: false }') response=$(curl -s "$VWU_BASE_URL/v1/chat/completions" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $VWU_API_KEY" \ --data-binary "$request_body") ``` Additional hardening should include: 1. Validate `MODEL` against the exact values in `models.txt` if arbitrary model identifiers are not required. 2. Fail explicitly if `jq` cannot construct the request. 3. Use `curl --fail-with-body` and handle transport failures separately from API errors. 4. Apply reasonable prompt-size limits to reduce accidental or malicious resource consumption. 5. Preserve arbitrary prompt text as data and never evaluate it through `eval`, a shell, or a dynamically generated command. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

External Model or Provider Selection

High
Category
Excessive Agency
Content
```bash
# 调用模型
vwu-chat --model MiniMax-Hailuo-02 "你的问题"
```

## API 兼容性
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill instructs users to set an API key and send prompts to vwu.ai, but it does not disclose that user inputs will be transmitted to an external third-party service. This creates a real privacy and data-governance risk because users may unknowingly submit sensitive prompts, credentials, or proprietary data to a remote provider.

External Transmission

Medium
Category
Data Exfiltration
Content
fi

# 调用 API
response=$(curl -s "$VWU_BASE_URL/v1/chat/completions" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $VWU_API_KEY" \
    -d "{
Confidence
77% confidence
Finding
The script transmits both user-supplied prompt content and the bearer token to an externally configurable endpoint via VWU_BASE_URL, with no validation that the host is trusted. If an attacker can influence the environment variable or persuade a user to point it at a malicious server, prompts and credentials could be exfiltrated to an attacker-controlled endpoint.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This code transmits the user-supplied prompt to a remote service and includes an Authorization bearer token, which is a safety-relevant network operation. While the script has error messages, it does not provide any prior disclosure, confirmation, or explanatory comment warning that prompt content will be sent to an external API.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
SQP-3 applies to natural-language policy issues in all file types, including markdown. The content appears to force a specific language for instructions and warnings, which may violate a language-choice policy when no opt-in or justification is provided.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The script's comments, usage text, and error messages are written in Chinese throughout, which imposes a specific language on all users. There is no opt-in, fallback, or documentation that this skill is intentionally limited to Chinese-speaking users or a Chinese-only environment.

Static analysis

No suspicious patterns detected.