Back to skill

Security audit

Comfyui anfrage

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims, but it can send ComfyUI credentials and workflow contents over unencrypted HTTP, so users should review it before installing.

Install only if you trust the configured ComfyUI network path, preferably on localhost or an isolated private network. Avoid setting COMFYUI_USER and COMFYUI_PASS unless the service is protected by a trusted TLS proxy or the skill is updated to support HTTPS and reject plaintext authenticated requests.

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

Error
Location
bin/cli.js:91
Finding
Basic Authentication Credentials and Workflow Data Transmitted Over Plaintext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `bin/cli.js:6-9`, `bin/cli.js:39-45`, `bin/cli.js:91-98`, and `bin/cli.js:130` **Vulnerability Type**: Plaintext transmission of sensitive data **Risk Level**: High ### Vulnerable Code ```js const host = getEnv("COMFYUI_HOST", "192.168.179.111"); const port = getEnv("COMFYUI_PORT", "28188"); const user = getEnv("COMFYUI_USER", ""); const pass = getEnv("COMFYUI_PASS", ""); ``` ```js function authHeaders() { const headers = { "content-type": "application/json" }; if (user && pass) { const tok = Buffer.from(user + ":" + pass).toString("base64"); headers["authorization"] = "Basic " + tok; } return headers; } ``` ```js const base = "http://" + host + ":" + port; const submitUrl = base + "/prompt"; const payload = { prompt: workflow, client_id }; const { res: sres, data: sdata } = await httpJson(submitUrl, { method: "POST", headers: authHeaders(), body: JSON.stringify(payload), }); ``` ```js const { res: hres, data: hdata, txt } = await httpJson(histUrl, { method: "GET", headers: authHeaders() }); ``` ### Technical Analysis The server base URL is unconditionally constructed with the `http://` scheme. When `COMFYUI_USER` and `COMFYUI_PASS` are configured, the application places those credentials in an HTTP Basic Authentication header. Basic Authentication only Base64-encodes the username and password; it does not encrypt them. Consequently, every submission and polling request exposes the encoded credentials to anyone capable of observing plaintext network traffic. The submitted workflow, prompt identifier, execution history, output metadata, and server responses are also sent without transport confidentiality or integrity protection. Because HTTPS cannot be selected through the current host and port configuration, users cannot securely enable Basic Authentication without modifying the source or placing the service behind another trusted transport mechanism. ### Attack Path 1. A u ...[truncated 1533 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the separate host and port configuration with a validated full base URL, such as `COMFYUI_BASE_URL`, and default to an `https://` endpoint. 2. Reject `http://` endpoints whenever authentication credentials are configured. If plaintext transport is required for isolated development environments, require an explicit opt-in flag and emit a prominent warning. 3. Configure the ComfyUI service or a trusted reverse proxy with TLS and validate certificates using the normal Node.js trust chain. Do not disable certificate verification. 4. Prefer scoped, revocable bearer tokens over reusable username and password credentials if the target service supports them. 5. Ensure credentials are loaded only from protected environment or secret-management facilities and are never included in output or diagnostic messages. 6. Minimize response data returned on failures, especially raw history responses that may contain sensitive workflow or infrastructure details. 7. Update `SKILL.md` to document the actual `/prompt`, `/history/{prompt_id}`, and `/view` interactions and the requirement for encrypted transport. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill uses network access and environment-derived configuration but does not declare an explicit tool scope such as permissions or allowed-tools. That omission weakens security boundaries and reviewability, because consumers cannot easily tell that the skill can make outbound requests and consume secrets from the environment, increasing the chance of unintended access to internal services or credential misuse.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The CLI submits arbitrary workflow JSON and may include Basic Auth credentials over plain HTTP to a configurable host without any transport security or user disclosure. In this skill context, workflows can contain sensitive prompts, paths, or embedded data, and Basic Auth over HTTP exposes credentials and request contents to interception or modification by anyone on the network path.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
bin/cli.js:5