Back to skill

Security audit

Comfyui V8

Security checks for vulnerabilities and agentic risk

Overview

This ComfyUI helper is mostly purpose-aligned, but it can launch local executables from a configurable path and gives unsafe troubleshooting advice such as running as administrator or disabling antivirus.

Install only if you intend to use it with a trusted local ComfyUI Aki bundle. Before using startup or repair actions, verify the ComfyUI directory and files yourself, avoid running the launcher as administrator, and do not disable antivirus based solely on this skill's advice.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/comfyui_skill.py:65
Finding

Unsafe Guidance to Elevate Privileges and Disable Antivirus Protection

Content
View full analysis

Vulnerability Details

File Location: scripts/comfyui_skill.py:65, scripts/comfyui_skill.py:254, and SKILL.md:89
Vulnerability Type: Least-privilege violation and unsafe security-control guidance
Risk Level: Medium

Vulnerable Code

scripts/comfyui_skill.py:65:

python
result.append("💡 修复:安装.NET框架、以管理员运行、检查路径无中文/空格")

scripts/comfyui_skill.py:254:

python
"启动闪退": ["安装 .NET Framework 4.8+", "以管理员身份运行", "检查路径不包含中文/空格", "关闭杀毒软件误报"],

SKILL.md:89:

markdown
| 启动闪退 | 安装 .NET Framework 4.8+、以管理员运行、检查路径无中文/空格 |

Technical Analysis

The troubleshooting instructions recommend running ComfyUI components as an administrator and, in the script, disabling antivirus protection. These recommendations are presented without first determining whether elevated privileges are required, verifying the provenance of the selected ComfyUI bundle, or limiting the elevation to a specific trusted operation.

The skill accepts a configurable ComfyUI installation path and launches executables or batch files from that directory. Although the skill does not programmatically elevate privileges or disable antivirus, its guidance can persuade a user to apply those actions to an untrusted or compromised bundle. Running such components as an administrator breaks the principle of least privilege, while disabling antivirus weakens a security boundary that might otherwise detect malicious executables, plugins, or scripts.

Attack Path

  1. An attacker distributes or modifies a ComfyUI bundle containing a malicious launcher, startup batch file, executable, or plugin.
  2. The victim configures the skill to use that bundle or places it at the expected path.
  3. The malicious or incompatible component causes startup to fail, or deliberately displays symptoms resembling a startup crash.
  4. The skill recommends running the bundle as an administrator and may recommend disabling antivirus protection.

...[truncated 1268 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove blanket recommendations to run ComfyUI as an administrator or disable antivirus protection.
  2. Keep ComfyUI and its launcher running under a standard user account by default.
  3. Diagnose the actual failure before suggesting permission changes, including checking file permissions, dependency availability, logs, path validity, and whether the executable is blocked.
  4. If a narrowly scoped operation genuinely requires elevation, identify that exact operation and explain why it requires additional privileges. Do not elevate the entire launcher or plugin ecosystem.
  5. Require users to verify the source, signature, checksum, and integrity of the ComfyUI bundle before executing its components.
  6. Never recommend disabling antivirus globally. For a verified false positive, direct users to submit the file for analysis and, only when necessary, create the narrowest possible file-specific exclusion for a verified artifact.
  7. Add an explicit warning that launchers, batch files, custom nodes, and plugins are executable code and must not be elevated unless their provenance has been independently verified.
  8. Replace the affected troubleshooting text with safe guidance such as reviewing launcher logs, restoring quarantined files only after verification, and correcting directory permissions without granting unnecessary system-wide privileges.
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The skill description understates or blurs behavior that can launch external executables and write files into the local ComfyUI installation. Behavior-description mismatch is risky because users may invoke a seemingly informational assistant without realizing it can modify the host system, start processes, or affect installed plugins, models, and workflows.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

This finding is substantively the same unsafe behavior: spawning a batch file with shell=True. If an attacker can place or replace 启动ComfyUI.bat in the chosen directory, the skill will execute arbitrary commands, making this a real code-execution risk rather than a theoretical style issue.

Content

Scanner excerpt · scripts/comfyui_skill.py (reported line 59)May include surrounding context.

python
subprocess.Popen([self.launcher_exe], cwd=self.comfy_path)
            else:
                result.append("✅ 启动ComfyUI核心服务")
                subprocess.Popen([self.start_bat], cwd=self.comfy_path, shell=True)
            time.sleep(3)
            result.append("✅ 启动成功!浏览器访问:http://127.0.0.1:8188")
            result.append("ℹ️ 绘世启动器可管理内核、插件、模型、一键更新")

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

This finding is substantively the same unsafe behavior: spawning a batch file with shell=True. If an attacker can place or replace 启动ComfyUI.bat in the chosen directory, the skill will execute arbitrary commands, making this a real code-execution risk rather than a theoretical style issue.

Content

Scanner excerpt · scripts/comfyui_skill.py (reported line 59)May include surrounding context.

python
subprocess.Popen([self.launcher_exe], cwd=self.comfy_path)
            else:
                result.append("✅ 启动ComfyUI核心服务")
                subprocess.Popen([self.start_bat], cwd=self.comfy_path, shell=True)
            time.sleep(3)
            result.append("✅ 启动成功!浏览器访问:http://127.0.0.1:8188")
            result.append("ℹ️ 绘世启动器可管理内核、插件、模型、一键更新")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The README presents the skill as a Chinese-only assistant (“秋叶中文版助手”) and all user-facing descriptions are in Chinese, with no indication that other languages are supported or that the user can opt into a preferred language. This can violate language/locale policy when the skill imposes a specific language without user choice.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README provides very broad invocation phrases such as '启动ComfyUI' and 'ComfyUI故障排查' without defining scope, trigger conditions, or exclusions. In an agent setting, generic phrases can cause unintended activation or execution in contexts where the user is only discussing ComfyUI rather than explicitly requesting the skill, which may lead to unexpected actions like launching software or initiating workflows.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises capabilities that imply file reads/writes and shell execution, but it does not declare any explicit tool scope or permission boundaries. This is dangerous because an agent or reviewer cannot easily determine what local-system actions are authorized, increasing the chance of unintended command execution or filesystem modification when handling ordinary ComfyUI requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill promotes startup, update, and plugin-management style actions but does not warn that these operations can change the local system, install components, or launch binaries/scripts. In this context, omission of these warnings is more dangerous because the skill is positioned as an all-in-one assistant for a local desktop bundle, where system-modifying actions are plausible and expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill description does not warn that generated workflows and output images may be written to local storage paths under the ComfyUI directory. This omission matters because users may provide sensitive prompts, input images, or face-reference assets without realizing those artifacts can persist on disk and be left in predictable locations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list contains very broad phrases such as generic ComfyUI terms and common workflow words, making accidental activation more likely during normal conversation. In a skill that may start services, write workflow files, or manage models, overly broad triggers materially raise the risk of unintentional privileged actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The comment explicitly labels the skill as '中文专用' (Chinese-only), and the rest of the script hardcodes Chinese-language descriptions and outputs. This imposes a language restriction without any user opt-in or documented justification that the skill is region-specific or compliance-bound.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/comfyui_skill.py (reported line 56)May include surrounding context.

python
try:
            if use_launcher and os.path.exists(self.launcher_exe):
                result.append("✅ 启动绘世启动器(秋叶专用)")
                subprocess.Popen([self.launcher_exe], cwd=self.comfy_path)
            else:
                result.append("✅ 启动ComfyUI核心服务")
                subprocess.Popen([self.start_bat], cwd=self.comfy_path, shell=True)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

This call invokes a batch file using shell=True, which increases the risk of command execution through shell interpretation. Because comfy_path is user-controllable and the code executes a .bat file from that location, an attacker who can influence the directory contents or selected path could cause arbitrary code execution under the user's privileges.

Content

Scanner excerpt · scripts/comfyui_skill.py (reported line 59)May include surrounding context.

python
subprocess.Popen([self.launcher_exe], cwd=self.comfy_path)
            else:
                result.append("✅ 启动ComfyUI核心服务")
                subprocess.Popen([self.start_bat], cwd=self.comfy_path, shell=True)
            time.sleep(3)
            result.append("✅ 启动成功!浏览器访问:http://127.0.0.1:8188")
            result.append("ℹ️ 绘世启动器可管理内核、插件、模型、一键更新")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code creates directories and writes workflow JSON files under the user's ComfyUI path, which modifies local user data. Although the return message reports the saved path after the fact, there is no prior warning, confirmation, or docstring disclosure that invoking this function will write files to disk.

Content

No source excerpt is available for this finding.