Read the docs
TI-2026-40856 Aliases CVE-2026-56672

ComfyUI: Stored XSS via /userdata/{file} due to Missing Content-Type Sanitization

Priority LOW 36CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
High · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-79.

Summary

ComfyUI is a node-based diffusion model GUI, API, and backend. Prior to 0.28.0, GET /userdata/{file} served user-controlled HTML and SVG files with extension-derived content types, allowing stored cross-site scripting in the ComfyUI origin and access to browser-stored API tokens, settings, workflows, and authenticated-equivalent API calls. The handler used web.FileResponse(path), so an uploaded .html/.svg was served as text/html/image/svg+xml. POST /userdata stores arbitrary request bodies (confined to the user's userdata directory). When a victim navigated to the file URL, the embedded script executed same-origin. The /view endpoint already forced dangerous MIME types to download; that protection had never been applied to /userdata. This issue is fixed in version 0.28.0.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00397 34th percentileScored 2026-11-07
Fix Fixed ComfyUI (Comfy-Org): 0.28.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
Comfy-OrgComfyUIbefore 0.28.00.28.0Patch availableCNA
  • ComfyUI VendorComfy-Org Affected before 0.28.0 Fixed in 0.28.0 Patch available CNA

Remediation

  • Fix · CNA ComfyUI (Comfy-Org) Fixed in 0.28.0

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-56672

References

  • TI-2026-62555 ComfyUI before 0.30.0 Path Traversal via dataset save nodes CVSS 4.0HIGH 8.5
  • TI-2026-48352 ComfyUI 0.23.0 Unauthenticated RCE via LoadTrainingDataset Pickle Deserialization CVSS 4.0CRITICAL 9.3
  • TI-2026-40855 ComfyUI: Path traversal in /experiment/models/preview allows arbitrary image file read CVSS 3.1HIGH 7.5
  • TI-2026-40857 ComfyUI: Path traversal in LoadImage via the /prompt API allows arbitrary file existence probing and image exfiltration CVSS 3.1HIGH 7.5
  • TI-2026-40854 ComfyUI: Stored XSS via SVG file upload on the /view endpoint CVSS 3.1HIGH 8.2

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences