ComfyUI: Stored XSS via /userdata/{file} due to Missing Content-Type Sanitization
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-56672
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 03:19 UTC · Revision 1
Source evidence
ComfyUI: Stored XSS via /userdata/{file} due to Missing Content-Type Sanitization
core-osv · Original sourcePublished 31 Jul 2026, 04:27 UTC
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.
osv:CVE-2026-56672
Complete source record
{
"id": "45d9c82576bc968c4c333a1a0f5fa618dad4042457d94bc33ceb29f8972d49d1",
"url": "https://osv.dev/vulnerability/CVE-2026-56672",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ComfyUI: Stored XSS via /userdata/{file} due to Missing Content-Type Sanitization",
"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.",
"evidence": "osv:CVE-2026-56672",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-56672",
"aliases": [
"CVE-2026-56672",
"GHSA-53g8-45wq-pcv8"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/comfy-org/comfyui",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "700821e1364eaab0e8f21c538a2131719fec57bf"
},
{
"fixed": "96e0e3585b41e1417442eaa14ec57f7b4ffcb5e0"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "0.28.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "96e0e3585b41e1417442eaa14ec57f7b4ffcb5e0"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "700821e1364eaab0e8f21c538a2131719fec57bf"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v0.28.0"
}
]
}
}
],
"versions": [
"v0.27.0",
"v0.26.0",
"v0.25.0",
"v0.24.0",
"v0.23.0",
"v0.22.0",
"v0.21.1",
"v0.21.0",
"v0.20.1",
"v0.20.0",
"v0.19.3",
"v0.19.2",
"v0.19.1",
"v0.19.0",
"v0.18.1",
"v0.18.0",
"v0.17.0",
"v0.16.4",
"v0.16.3",
"v0.16.2",
"v0.16.1",
"v0.16.0",
"v0.15.1",
"v0.15.0",
"v0.14.1",
"v0.14.0",
"v0.13.0",
"v0.12.3",
"v0.12.2",
"v0.12.1",
"v0.12.0",
"v0.11.1",
"v0.11.0",
"v0.10.0",
"v0.9.2",
"v0.9.1",
"v0.9.0",
"v0.8.2",
"v0.8.1",
"v0.8.0",
"v0.7.0",
"v0.6.0",
"v0.5.1",
"v0.5.0",
"v0.4.0",
"v0.3.76",
"v0.3.75",
"v0.3.74",
"v0.3.73",
"v0.3.72",
"v0.3.71",
"v0.3.70",
"v0.3.69",
"v0.3.68",
"v0.3.67",
"v0.3.66",
"v0.3.65",
"v0.3.64",
"v0.3.63",
"v0.3.62",
"v0.3.61",
"v0.3.60",
"v0.3.59",
"v0.3.58",
"v0.3.52",
"v0.3.57",
"v0.3.56",
"v0.3.55",
"v0.3.54",
"v0.3.53",
"v0.3.51",
"v0.3.50",
"v0.3.49",
"v0.3.48",
"v0.3.47",
"v0.3.46",
"v0.3.45",
"v0.3.44",
"v0.3.43",
"v0.3.42",
"v0.3.41",
"v0.3.40",
"v0.3.39",
"v0.3.38",
"v0.3.37",
"v0.3.36",
"v0.3.35",
"v0.3.34",
"v0.3.33",
"v0.3.32",
"v0.3.31",
"v0.3.30",
"v0.3.29",
"v0.3.28",
"v0.3.27",
"v0.3.26",
"v0.3.25",
"v0.3.24",
"v0.3.23",
"v0.3.22",
"v0.3.21",
"v0.3.20",
"v0.3.19",
"v0.3.18",
"v0.3.17",
"v0.3.16",
"v0.3.15",
"v0.3.14",
"v0.3.13",
"v0.3.12",
"v0.3.11",
"v0.3.10",
"v0.3.9",
"v0.3.8",
"v0.3.7",
"v0.3.6",
"v0.3.5",
"v0.3.4",
"v0.3.3",
"v0.3.2",
"v0.3.1",
"v0.3.0",
"v0.2.7",
"v0.2.6",
"v0.2.5",
"v0.2.4",
"v0.2.3",
"v0.2.2",
"v0.2.1",
"v0.2.0",
"v0.1.3",
"v0.1.2",
"v0.1.1",
"v0.1.0",
"v0.0.8",
"v0.0.7",
"v0.0.6",
"v0.0.5",
"v0.0.4",
"v0.0.2",
"v0.0.1",
"latest"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-56672.json"
}
}
],
"modified": "2026-10-28T02:30:49.355327734Z",
"provider": "osv",
"references": [
"https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.28.0",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56672.json",
"https://github.com/Comfy-Org/ComfyUI/security/advisories/GHSA-53g8-45wq-pcv8",
"https://nvd.nist.gov/vuln/detail/CVE-2026-56672",
"https://github.com/Comfy-Org/ComfyUI/commit/96e0e3585b41e1417442eaa14ec57f7b4ffcb5e0"
],
"provider_metadata": {
"cwe_ids": [
"CWE-79"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56672.json"
}
},
"related_cves": [
{
"value": "CVE-2026-56672",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 517699,
"published_at": "2026-07-31T04:27:18.721+00:00"
}