Back to skill

Security audit

VMflow

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly for vending fleet management, but it gives an agent broad real-world device-control power with weak guardrails around secrets, disruptive commands, and MQTT transport safety.

Install only if you trust the VMflow service and the operator account, and treat this as a high-impact fleet-control tool. Use a dedicated low-privilege account, avoid passing passkeys on the command line, require human confirmation before credit, restart, OOS, buzzer, DEX, or OTA actions, and configure MQTT with TLS and broker authentication before using it on real devices.

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
tools/rpc.sh:57
Finding

MQTT Commands and Device Responses Use Plaintext, Unauthenticated Transport by Default

Content
View full analysis
.vmflow.xyz is the device topic, not a host TS="$(date +%s)" # UTC epoch — fresh (device enforces a 10s window) MSG="$CMD:$ARGS:$TS" SIG="$(printf '%s' "$MSG" | openssl dgst -sha256 -hmac "$PASSKEY" -hex | awk '{print $NF}')" PAYLOAD="$MSG:$SIG" REPLY_TOPIC="domain.vmflow.xyz/$SUB/rpc/$CMD" if [ "$WAIT" -eq 1 ]; then # Subscribe to the reply first so we don't miss it, then publish. mosquitto_sub -h "$HOST" -t "$REPLY_TOPIC" -C 1 -W 15 "${EXTRA[@]}" & SUB_PID=$! sleep 0.3 fi echo "-> $HOST $SUB.vmflow.xyz/rpc '$PAYLOAD'" >&2 mosquitto_pub -h "$HOST" -t "$SUB.vmflow.xyz/rpc" -m "$PAYLOAD" -q 1 "${EXTRA[@]}" if [ "$WAIT" -eq 1 ]; then echo "<- waiting on $REPLY_TOPIC (15s)" >&2 wait "$SUB_PID" fi ``` The documented direct usage has the same insecure default: ```bash MQTT_HOST="${MQTT_HOST:-mqtt.vmflow.xyz}" TS=$(date +%s) SIG=$(printf '%s' "info:-:$TS" | openssl dgst -sha256 -hmac "$PASSKEY" -hex | awk '{print $NF}') # publish; listen for reply on domain.vmflow.xyz/$SUB/rpc/info mosquitto_pub -h "$MQTT_HOST" -t "$SUB.vmflow.xyz/rpc" -m "info:-:$TS:$SIG" -q 1 ``` ### Technical Analysis The default `mosquitto_pub` and `mosquitto_sub` invocations specify neither a TLS port nor CA verification. They also provide no broker authentication by default. Although the command envelope contains an HMAC, that HMAC only authenticates the signed command contents. It does not provide transport confidentiality, hide device identifiers, authenticate the MQTT broker, or protect reply messages. The reply subscription accepts the first message received on the predictable topic `domain.vmflow.xyz/$SUB/rpc/$CMD`. The code does ...[truncated 2376 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
tools/rpc.sh:41
Finding

RPC Helper Signs and Publishes Arbitrary Command Names and Arguments

Content
View full analysis
&2; usage 1; } shift || true # Anything after the command (or after `--`) is passed straight to mosquitto. EXTRA=("$@") [ -n "$SUB" ] || { echo "error: set SUB or pass -s " >&2; exit 1; } [ -n "$PASSKEY" ] || { echo "error: set PASSKEY or pass -k " >&2; exit 1; } [ -n "$ARGS" ] || { echo "error: -a must be non-empty (use '-' for none)" >&2; exit 1; } HOST="${HOST:-mqtt.vmflow.xyz}" # broker host; .vmflow.xyz is the device topic, not a host TS="$(date +%s)" # UTC epoch — fresh (device enforces a 10s window) MSG="$CMD:$ARGS:$TS" SIG="$(printf '%s' "$MSG" | openssl dgst -sha256 -hmac "$PASSKEY" -hex | awk '{print $NF}')" PAYLOAD="$MSG:$SIG" REPLY_TOPIC="domain.vmflow.xyz/$SUB/rpc/$CMD" if [ "$WAIT" -eq 1 ]; then # Subscribe to the reply first so we don't miss it, then publish. mosquitto_sub -h "$HOST" -t "$REPLY_TOPIC" -C 1 -W 15 "${EXTRA[@]}" & SUB_PID=$! sleep 0.3 fi ``` ### Technical Analysis The documentation identifies a bounded set of expected commands, including `dex`, `info`, `oos`, `buzzer`, `echo`, `restart`, and `credit`, with `SKILL.md` additionally documenting `ota`. The helper does not enforce that set. Any non-empty value supplied as `CMD` is incorporated into an HMAC-authenticated envelope and sent using the legitimate per-device passkey. The command and argument fields are also not checked for protocol delimiters, control characters, expected types, or safe ranges. Because colons delimit fields in the RPC envelope, unvalidated colons can produce protocol ambiguity. Numeric operations such as credit should have strict amount and range checks, while disruptive operations such as restart or firmware update should requir ...[truncated 2060 chars]
Remediation
View remediation
&2; exit 1 ;; esac ``` 2. Apply command-specific argument validation: - Require `-` for commands without arguments. - Require credit amounts to be integers in the device's documented unit and within a conservative configured maximum. - Restrict OTA versions to a strict release-tag pattern. - Reject colons, line breaks, NUL-equivalent data, MQTT wildcards, and control characters. - Validate `SUB` as an expected numeric identifier. 3. Separate read-only and state-changing operations. Require explicit confirmation or a noninteractive authorization flag for `credit`, `restart`, `oos`, and `ota`. 4. Use different credentials or server-side authorization policies for read-only diagnostics and high-impact device control where the platform supports it. 5. Keep the client allowlist synchronized with the reviewed firmware RPC handler. Unknown commands must fail closed rather than being signed and transmitted. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · AGENTS.md (reported line 83)May include surrounding context.

2. Supabase REST — data & credits

Base: https://supabase.vmflow.xyz. All requests need apikey (anon) and a Bearer access token from the login step.

Anon key (public, safe to embed — gates only at the API edge; row access is enforced by RLS after login):

text

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The code is related to the declared domain of vending machine management over MQTT RPC, and it does support one declared function: sending credits, plus health/info-style querying via commands like info. However, the description claims broader functionality via both MQTT RPC and Supabase, including sales/inventory queries and firmware updates. This code chunk only sends signed MQTT commands and optionally listens for a reply; there is no Supabase interaction, no firmware update mechanism, and no explicit sales/inventory query implementation. It also exposes additional device-control commands not stated in the description. Because the implemented behavior is materially narrower and partly different from the declared purpose, this is a mismatch.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- RPC helper script: [`tools/rpc.sh`](./tools/rpc.sh)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · AGENTS.md (reported line 92)May include surrounding context.

Get a token

bash
curl -X POST 'https://supabase.vmflow.xyz/auth/v1/token?grant_type=password' \
  -H "apikey: <ANON_KEY>" -H "Content-Type: application/json" \
  -d '{"email":"you@domain.xyz","password":"..."}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The playbooks explicitly instruct an agent to trigger disruptive actions like oos and restart against physical vending devices without requiring operator confirmation, maintenance windows, or warning about service interruption. In an agent context, this increases the chance of accidental denial of service or inappropriate actuation of real-world systems.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- SUPABASE_PASSWORD
      bins:
        - openssl
        - curl
      anyBins:
        - mosquitto_pub
    envVars:

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

This request retrieves per-device passkey values from Supabase and exposes them to the agent/runtime before issuing MQTT RPC commands. Those passkeys are effectively device-shared secrets used to authenticate sensitive commands; if the agent session, logs, prompts, or tool outputs are exposed, an attacker could sign arbitrary control messages such as restart, OOS, or OTA for fleet devices.

Content

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

The agent retrieves them before issuing any RPC command.

bash
curl -s "$SUPABASE_URL/rest/v1/embedded?select=subdomain,passkey,status,status_at,machine_id" \
  -H "apikey: $SUPABASE_ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill documents disruptive commands such as restart, oos, and OTA operations without strong warnings, confirmation requirements, or guardrails. In an agent setting, this increases the chance of accidental service interruption, failed vending transactions, device downtime, or unintended firmware changes across physical machines.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script explicitly supports supplying the MQTT HMAC passkey via the -k command-line option, which can expose the secret through shell history, process listings, CI logs, and audit trails. In this skill's context, the passkey authorizes signed RPC commands to vending devices, so disclosure could let an attacker send valid control actions such as credits, restarts, or firmware-related commands.

Content

No source excerpt is available for this finding.