Back to skill

Security audit

comfyui-imagegen

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real ComfyUI image generator, but its arbitrary HTTP host override and automatic sending of metadata-bearing JPGs warrant review before installation.

Install only if you are comfortable with the agent running this script against a trusted ComfyUI endpoint. Keep --host on localhost unless you explicitly trust the remote server and network path, and treat generated JPGs as potentially containing the prompt and workflow metadata before sharing them.

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

Warning
Location
scripts/generate.py:15
Finding

Unrestricted ComfyUI Host Allows Arbitrary Network Requests

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/generate.py:37
Finding

Unbounded HTTP Requests and Completion Polling Permit Denial of Service

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill invokes a local HTTP API on localhost:8188 and therefore has network capability, but the manifest does not declare any tool scope or allowed-tools restriction. Undeclared network access weakens policy enforcement and reviewability, making it easier for a skill to perform unintended requests or be repointed to non-local hosts via the documented --host override.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly says generated JPGs should always be sent immediately to the user, while the changelog and workflow notes state the output embeds prompt/info metadata. That creates a privacy leak path where prompts, parameters, or other embedded generation details may be disclosed to recipients without user awareness or consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/generate.py (reported line 40)May include surrounding context.

python
# Submit prompt
    url = f'http://{args.host}/prompt'
    resp = requests.post(url, json={'prompt': workflow})
    resp.raise_for_status()
    prompt_id = resp.json()['prompt_id']
    print(f'Submitted prompt_id: {prompt_id} (seed: {seed})')

Tainted flow: 'history_url' from requests.post (line 46, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/generate.py (reported line 49)May include surrounding context.

python
history_url = f'http://{args.host}/history/{prompt_id}'
    while True:
        time.sleep(1)
        hist_resp = requests.get(history_url)
        hist_resp.raise_for_status()
        history = hist_resp.json()
        if prompt_id in history and history[prompt_id]['outputs']:

Tainted flow: 'view_url' from requests.post (line 66, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/generate.py (reported line 67)May include surrounding context.

python
# Download image
    subfolder_path = img_info.get('subfolder', '')
    view_url = f'http://{args.host}/view?filename={filename}&type=output&subfolder={subfolder_path}'
    img_resp = requests.get(view_url)
    img_resp.raise_for_status()

    out_path = args.output or f'./gen-{seed}.jpg'