ZeroHour

CVE-2026-51974

moderate

Python eval() injection RCE in Fooocus via crafted image EXIF metadata

CVSS 3.1
8.8 high
EPSS
<1%p35
Published
()
Modified
AI analysis

Fooocus versions 2.1.854 through 2.5.5 contain a Python eval() injection vulnerability in the get_list function of modules/meta_parser.py. An attacker triggers it by uploading an image whose EXIF metadata carries a crafted 'styles' payload, which the metadata parser evaluates as live Python code, yielding arbitrary code execution on the host running Fooocus. Successful exploitation runs code with the privileges of the Fooocus process, typically the local user account, enabling data theft, modification, or further compromise. Anyone running an affected version that accepts image uploads from others is affected, especially instances exposed over a LAN or via shared/public Gradio links rather than bound to localhost. No public proof-of-concept, KEV listing, or confirmed in-the-wild exploitation is known, and EPSS estimates only about a 0.4% chance of exploitation within 30 days.

What to do: Upgrade to a patched Fooocus release newer than 2.5.5 when available, or apply a workaround by removing eval() on untrusted metadata in modules/meta_parser.py. Until patched, avoid loading untrusted images into affected builds and keep instances bound to localhost instead of exposing them on the LAN or via public share links. Operators of shared instances should review which outside images have been processed, since a malicious upload could have served as an entry point.

Affected
lllyasviel Fooocus2.1.854 through 2.5.5
Estimated exposure
moderatetens of thousands of installations (popular open-source image-generation UI, mostly local single-user deployments) — Fooocus is a widely used GitHub open-source project typically deployed per-user on local machines, and only the minority of instances reachable over a network via LAN bindings or public share links can be attacked remotely.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

An eval() injection vulnerability in the get_list function in modules/meta_parser.py in lllyasviel Fooocus 2.1.854 through 2.5.5 allows remote attackers to execute arbitrary Python code via a crafted styles payload in the EXIF metadata of an uploaded image file.

Weakness
CWE-94
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.