---
id: 2026-07-comfyui-five-cves-unauthenticated-pickle-rce-cve-2026-68771-xss-path-traversal-fixed-0-28-0
title: "ComfyUI before 0.28.0: five CVEs, including unauthenticated code execution through a training-dataset node (CVE-2026-68771)"
date_disclosed: 2026-07-15
last_updated: 2026-11-16
severity: critical
status: patched
ecosystems: [comfyui, python, image-generation, 3d-modeling, self-hosted-ai]
tools_affected: ["ComfyUI 0.23.0 and earlier (CVE-2026-68771, VulnCheck's range)", "ComfyUI before 0.28.0 (four vendor advisories)", "any ComfyUI server reachable from a network without authentication"]
tags: [cve, comfyui, pickle, deserialization, unauthenticated, xss, path-traversal, vulncheck, self-hosted-ai, silent-fix, backfill]
---

## TL;DR
ComfyUI has five CVEs, all fixed by release 0.28.0 (2026-07-15). The most serious is CVE-2026-68771, scored 9.8 by VulnCheck: an unauthenticated network caller can run Python on the server through the `LoadTrainingDataset` node, which loaded pickle files. The other four are vendor advisories for two stored XSS bugs and two path traversals. Upgrade to 0.28.0 or later. Do not expose a ComfyUI port to a network you do not control.

## What happened

| CVE | Source | What it is | Score | Affected | Fixed |
|---|---|---|---|---|---|
| CVE-2026-68771 | VulnCheck CNA, 2026-07-31 | `LoadTrainingDataset` deserializes an uploaded pickle file, unauthenticated | 9.8 (3.1), 9.3 (4.0) | 0.23.0 and earlier, per the record | 0.26.0, see below |
| CVE-2026-56672 | vendor GHSA-53g8-45wq-pcv8, 2026-07-15 | stored XSS through `/userdata/{file}` | 8.2 | before 0.28.0 | 0.28.0 |
| CVE-2026-56670 | vendor GHSA-rj8c-c4p8-3c5h, 2026-07-15 | stored XSS through SVG upload on `/view` | 8.2 | before 0.28.0 | 0.28.0 |
| CVE-2026-56673 | vendor GHSA-rvxv-29p8-pxgq, 2026-07-15 | path traversal in `LoadImage` through `/prompt`, file probing and image read | 7.5 | before 0.28.0 | 0.28.0 |
| CVE-2026-56671 | vendor GHSA-pj59-g5vv-74q4, 2026-07-15 | path traversal in `/experiment/models/preview`, image read | 7.5 | before 0.28.0 | 0.28.0 |

**CVE-2026-68771 has no vendor advisory and no fixed version in its record.** The record references commit 94ee49b, "harden: load training-dataset shards with weights_only=True", dated 2026-06-18. The GitHub compare API shows that commit is not in tags `v0.23.0`, `v0.24.0`, `v0.25.0` or `v0.25.1`, and is in `v0.26.0` (2026-06-23) and every later tag. So the record's upper bound of 0.23.0 is too low: 0.24.0, 0.25.0 and 0.25.1 do not contain the fix. For this id alone, 0.26.0 is the first fixed tag. Upgrade to 0.28.0 or later anyway, because the other four ids need it. The commit message calls the change defense-in-depth for installs pinned to an older PyTorch, and says recent PyTorch already loads with `weights_only=True`. VulnCheck's 9.8 does not state a PyTorch version.

The CVE records for CVE-2026-56672 and CVE-2026-56673 were published on 2026-07-31, sixteen days after the vendor advisories and the release. The newest release when read was `v0.45.0` (2026-11-10).

## Am I affected?

```bash
git -C /path/to/ComfyUI describe --tags      # a git install
```

- Affected: any version before 0.28.0. The `comfyui` package on PyPI is a single 2024 release, 0.0.1, and is not how current ComfyUI is installed, so `pip show comfyui` does not answer this.
- Highest exposure: a server started so that other machines can reach it, a cloud GPU instance with the port open, or a tunnel to a local instance.

## If you are affected

- Upgrade to 0.28.0 or later.
- If an affected server was reachable from the internet, assume code may have run on it. Rotate every credential on that machine and rebuild it. See [rotating cloud credentials](../playbooks/rotating-cloud-credentials.md) and [if your local AI agent was exploited](../playbooks/if-your-local-ai-agent-was-exploited.md).
- None of the sources below reports exploitation of these five ids. A separate campaign against exposed ComfyUI servers used a ComfyUI-Manager flaw. See [the ComfyUI-Manager advisory](2026-01-comfyui-manager-unprotected-config-channel-cve-2025-67303-exposed-servers-fixed-3-38.md).

## Prevention

- Bind ComfyUI to the local machine and reach it through an authenticated tunnel.
- Load only model, dataset and workflow files from sources you trust. A pickle file is code.
- See [agent sandboxing](../prevention/agent-sandboxing.md) for running generation tools away from credentials.

## Sources
- [CVE Services: CVE-2026-68771](https://cveawg.mitre.org/api/cve/CVE-2026-68771), fetched 2026-11-16: VulnCheck CNA, published 2026-07-31, affected up to and including 0.23.0, 9.8 and 9.3, credit Bofei Chen, references to pull request 14543 and commit 94ee49b.
- [CVE Services: CVE-2026-56672](https://cveawg.mitre.org/api/cve/CVE-2026-56672), fetched 2026-11-16: GitHub CNA, published 2026-07-31, before 0.28.0, 8.2.
- [CVE Services: CVE-2026-56673](https://cveawg.mitre.org/api/cve/CVE-2026-56673), fetched 2026-11-16: GitHub CNA, published 2026-07-31, before 0.28.0, 7.5.
- [ComfyUI security advisories tab](https://github.com/Comfy-Org/ComfyUI/security/advisories), read through the GitHub API on 2026-11-16: four advisories, all published 2026-07-15, all high, all patched in 0.28.0.
- [ComfyUI commit 94ee49b](https://github.com/Comfy-Org/ComfyUI/commit/94ee49b1612824366a8631ea069b2a1fa5c73720), read through the GitHub API on 2026-11-16: date, message, and the compare results against tags `v0.23.0` through `v0.28.0`.
- ComfyUI releases, read through the GitHub API on 2026-11-16: `v0.23.0` 2026-06-01, `v0.25.0` 2026-06-16, `v0.28.0` 2026-07-15, `v0.45.0` 2026-11-10.
- CVE Services records for CVE-2026-56670 and CVE-2026-56671, fetched 2026-11-16: 8.2 and 7.5.
- PyPI `comfyui`, queried 2026-11-16: one release, 0.0.1, dated 2024-06-13.
- Not opened: the VulnCheck advisory page and pull request 14543.
