T09 · Insecure Skill Coding Practices
- Location
SKILL.md:72- Finding
ComfyUI Service Exposed on All Network Interfaces
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 72 and 225
Vulnerability Type: Unnecessary network exposure of a local service
Risk Level: HighVulnerable Code Snippet:
bash # Start the ComfyUI service cd ComfyUI python main.py --listen 0.0.0.0 --port 8188The same unsafe command is repeated later:
bash # Start ComfyUI python main.py --listen 0.0.0.0 --port 8188 # Generate the first image python generate.py --prompt "a cat sitting on a windowsill" --output ./output/cat.pngTechnical Analysis
The Skill instructs users to bind ComfyUI to
0.0.0.0, causing TCP port 8188 to listen on every available network interface. This is unnecessary for the documented workflow because the included Python example communicates withhttp://localhost:8188.The instructions do not configure API authentication, TLS, reverse-proxy access controls, or host firewall restrictions. Therefore, when the host network and firewall permit access, other systems may directly interact with the ComfyUI HTTP API. The exact capabilities available to an attacker depend on the installed ComfyUI version and custom nodes.
Attack Path
- A user or Agent follows the documented startup command.
- ComfyUI binds port 8188 to all network interfaces.
- An attacker on a reachable network discovers the exposed port.
- The attacker connects directly to the ComfyUI API without passing an authentication layer.
- The attacker submits unauthorized workflows or other requests supported by the installed ComfyUI instance and extensions.
- The attacker consumes CPU, GPU, memory, and storage resources or accesses API-visible workflow data.
Impact Assessment
A reachable attacker may invoke image-generation workloads and cause resource exhaustion, denial of service, unwanted output creation, and storage consumption. The exposure may also reveal API-accessible workflow or generation data. If vulnera ...[truncated 258 chars]
- Remediation
View remediation
Remediation Suggestions
Bind the service to the loopback interface for the documented local-only workflow:
bash python main.py --listen 127.0.0.1 --port 8188Additionally:
- Block port 8188 from untrusted networks with a host or network firewall.
- If remote access is required, place ComfyUI behind an authenticated reverse proxy with TLS.
- Restrict access using explicit source-address allowlists.
- Run ComfyUI under a dedicated, unprivileged operating-system account.
- Review custom nodes before installation and limit their filesystem and process permissions.
- Add a warning that
0.0.0.0must not be used without deliberate access controls.
