Back to skill

Security audit

vwu.ai Veo Models

Security checks for vulnerabilities and agentic risk

Overview

This skill is a simple vwu.ai chat helper, but it can send the user's API key and prompt to an environment-controlled endpoint without validation.

Review this before installing. Use it only in an environment where VWU_BASE_URL cannot be set by untrusted wrappers, shell profiles, CI variables, or other users, and avoid sending sensitive prompts unless you trust the destination. The maintainer should pin or validate the API host, require HTTPS, and build JSON with a proper encoder such as jq.

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:7
Finding
Unvalidated API Endpoint Override Can Expose Credentials and Prompts<![CDATA[ ## Vulnerability Details **File Location**: `vwu-chat.sh`, lines 7 and 31–39 **Vulnerability Type**: Unvalidated sensitive-data destination **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 obtains `VWU_BASE_URL` directly from the process environment and uses it as the destination for a request containing both the bearer API key and the user's prompt. It does not validate the URL scheme or destination host. Consequently, a party capable of controlling the environment in which the script is launched can redirect the request to an arbitrary server. An `http://` URL can additionally cause the credential and prompt to be transmitted without transport encryption. The URL is quoted, so this issue does not establish shell command injection. The vulnerability is the unauthorized disclosure of sensitive request data to an untrusted network destination. ### Attack Path 1. An attacker gains control over the launch environment, wrapper script, service configuration, CI job, or shell profile used to invoke the skill. 2. The attacker sets `VWU_BASE_URL` to an endpoint under their control, such as `https://attacker.example`. 3. The user invokes `vwu-chat.sh` with a legitimate API key and prompt. 4. The script sends an HTTP request to `https://attacker.example/v1/chat/completions`. 5. The attacker receives the `Authorization: Bearer ...` header, selected model, and complete user prompt. 6. The stolen key may then be used against the legitimate service within the permissions and quota assigned to that key. ### Impact Assessment An attacker can obtain the configured VWU API key ...[truncated 460 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin the endpoint to the intended service if endpoint customization is unnecessary: ```zsh readonly VWU_BASE_URL="https://vwu.ai" ``` - If overrides are operationally required, parse and validate the URL before sending credentials: - Require the `https` scheme. - Permit only an explicit allowlist of trusted hostnames. - Reject embedded credentials, unexpected ports, fragments, and malformed URLs. - Do not rely on substring or suffix matching for hostname validation. - Restrict `curl` to HTTPS and fail safely: ```zsh curl --fail-with-body --silent --show-error \ --proto '=https' \ --connect-timeout 10 \ --max-time 120 \ ... ``` - Run the script in a controlled environment and prevent untrusted wrappers, shell profiles, CI variables, or service definitions from setting security-sensitive configuration. - Rotate the API key if the script may already have been run with an untrusted endpoint. - Avoid displaying even partial API-key material in error output where logs may be shared. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
vwu-chat.sh:35
Finding
Unescaped Arguments Permit JSON Request-Body Injection<![CDATA[ ## Vulnerability Details **File Location**: `vwu-chat.sh`, lines 35–38 **Vulnerability Type**: Improper construction of JSON from untrusted input **Risk Level**: Medium ### Vulnerable Code ```zsh -d "{ \"model\": \"$MODEL\", \"messages\": [{\"role\": \"user\", \"content\": \"$PROMPT\"}], \"stream\": false }" ``` ### Technical Analysis The script inserts the positional `MODEL` and `PROMPT` values directly into a JSON string without JSON encoding them. Quotes, backslashes, newlines, and other JSON control characters in either value can therefore produce malformed JSON or terminate the intended string and inject additional JSON syntax. This flaw can alter the semantic structure of the outgoing request. Depending on how the remote API handles duplicate or unexpected properties, a crafted argument may override fields, add messages, change request options, or cause request rejection. Shell metacharacters contained in these variables are not re-evaluated as shell syntax during parameter expansion, so the evidence does not support local shell command execution. The confirmed issue is JSON-level injection and request corruption. ### Attack Path 1. An attacker controls or influences a model or prompt passed to the script, such as through an automated wrapper that forwards untrusted input. 2. The attacker supplies JSON-sensitive content containing a quotation mark followed by crafted JSON syntax. 3. The script interpolates that content directly into the request body without escaping it. 4. The resulting body is either invalid JSON, causing a denial of service, or valid JSON with attacker-injected fields or message structures. 5. The API parses and acts on the manipulated request according to its duplicate-field and schema-handling behavior. For example, even a normal prompt containing quotes or literal control characters may unintentionally produce an invalid request, while deliberately structured input may attempt to modify the request obj ...[truncated 561 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Construct the request with a JSON-aware encoder instead of string interpolation. For example: ```zsh payload=$( jq -n \ --arg model "$MODEL" \ --arg prompt "$PROMPT" \ '{ model: $model, messages: [ { role: "user", content: $prompt } ], stream: false }' ) response=$( curl --fail-with-body --silent --show-error \ --proto '=https' \ "$VWU_BASE_URL/v1/chat/completions" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $VWU_API_KEY" \ --data-binary "$payload" ) ``` Additional hardening should include: - Validate `MODEL` against the entries in `models.txt` or another explicit allowlist. - Preserve prompts as single opaque string values and let `jq --arg` perform all required escaping. - Check that `jq` and `curl` are available before processing sensitive input. - Handle HTTP failures and malformed API responses explicitly rather than relying only on the presence of an `.error` field. - Add tests covering quotation marks, backslashes, multiline prompts, tabs, Unicode, and deliberately crafted JSON fragments. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (3)

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The natural-language content of the skill is presented exclusively in Chinese, including setup and usage instructions. This can violate a language/locale policy when users are not given an explicit choice of language and no region-specific justification is provided.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The script's comments and all user-facing messages are in Chinese, including usage and error guidance. Because the file does not indicate that the skill is intended only for Chinese-speaking users or provide any language opt-in, this creates a natural-language locale policy concern.

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
94% confidence
Finding
The script transmits user-supplied prompt data and an API bearer token to an external service defined by VWU_BASE_URL, which can be overridden via environment variable. This creates a real data exfiltration risk if sensitive prompts are passed, and a token exposure risk if the base URL is redirected to an untrusted endpoint; additionally, the JSON body is built by direct string interpolation, which can cause malformed requests or content injection into the outbound payload.

Static analysis

No suspicious patterns detected.