CVE-2026-51974
moderatePython eval() injection RCE in Fooocus via crafted image EXIF metadata
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.
| lllyasviel Fooocus | 2.1.854 through 2.5.5 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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 news0 stories
No ingested article mentions this CVE yet.