T09 · Insecure Skill Coding Practices
Error
- Location
- tool/modelready.sh:42
- Finding
- Unauthenticated model API exposed on all network interfaces by default<![CDATA[ ## Vulnerability Details **File Location**: `tool/modelready.sh`, lines 42 and 151-180 **Vulnerability Type**: Unauthenticated network service exposure **Risk Level**: High ### Vulnerable Code ```bash DEFAULT_HOST="${DEFAULT_HOST:-0.0.0.0}" ``` ```bash # build args ARGS=(--model "$REPO" --host "$HOST" --port "$PORT" --tensor-parallel-size "$TP" --dtype "$DTYPE") if [[ -n "$NAME" ]]; then ARGS+=(--served-model-name "$NAME") fi if [[ -n "$MAX_NUM_SEQS" ]]; then ARGS+=(--max-num-seqs "$MAX_NUM_SEQS") fi if [[ "$AUTO_TOOL" == "1" ]]; then ARGS+=(--enable-auto-tool-choice) fi if [[ -n "$TOOL_PARSER" ]]; then ARGS+=(--tool-call-parser "$TOOL_PARSER") fi # OPTIONAL: passthrough extra="--foo bar --baz 1" EXTRA="${KV[extra]:-}" if [[ -n "$EXTRA" ]]; then # shellcheck disable=SC2206 EXTRA_ARR=($EXTRA) ARGS+=("${EXTRA_ARR[@]}") fi # start server nohup python3 -m vllm.entrypoints.openai.api_server \ "${ARGS[@]}" \ >"$LOG_FILE" 2>&1 & ``` ### Technical Analysis The default bind address is `0.0.0.0`, which causes vLLM to listen on every available network interface rather than only the loopback interface. The constructed server command does not configure an API key, authentication layer, TLS, or any client access restriction. Consequently, the documented `start` operation creates an OpenAI-compatible HTTP API that may be reachable by other systems on the local network and, depending on firewall and routing configuration, by external systems. This behavior conflicts with the documentation's characterization of the model as being served locally. The exposure does not require command injection or code execution within the shell script. An attacker only needs network connectivity to the configured port and can interact directly with vLLM's API. ### Attack Path 1. A user invokes the documented model start command without specifying a safer bind address. 2. `DEFAULT_HOST` resolves to `0.0.0.0`. 3. The script launches vLLM with `--host 0.0. ...[truncated 918 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Change the default bind address to loopback: ```bash DEFAULT_HOST="${DEFAULT_HOST:-127.0.0.1}" ``` 2. Require explicit user confirmation before allowing `0.0.0.0` or another non-loopback address. 3. When remote access is enabled, configure vLLM with a strong API key and ensure all clients authenticate. 4. Place remotely accessible deployments behind a TLS-enabled reverse proxy with authentication, request limits, and access logging. 5. Apply host firewall rules restricting access to trusted source addresses. 6. Display a prominent warning containing the effective bind address whenever a non-loopback server is started. 7. Update `SKILL.md` to distinguish loopback-only operation from deliberate network exposure. 8. Add startup validation that refuses unauthenticated non-loopback binding unless an explicit unsafe override is supplied. ]]>
