Junglewise Threat Intelligence

CVE-2026-51974: lllyasviel Fooocus eval injection in metadata parser

CVE-2026-51974 · Severity: high · CVSS 8.8 · Published 2026-09-01

Executive brief

Fooocus is an open-source image generation tool that processes metadata from uploaded images. An attacker can craft a malicious image file with embedded Python code in the EXIF metadata styles field, which is executed without validation when the image is imported, allowing remote code execution on the server or user's machine running Fooocus.

Technical details

The vulnerability is an unsafe eval() injection in the get_list function in modules/meta_parser.py. When users upload an image with crafted EXIF metadata, the styles field is passed directly to eval() without sanitization, allowing arbitrary Python code execution. The attack vector is network-based: an attacker can craft a malicious image file and either host it for download or trick a user into uploading it through the Fooocus web interface. No authentication is required beyond the ability to process metadata in the application. An attacker can achieve remote code execution with the privileges of the Fooocus process. Patches are available in versions later than 2.5.5.

Affected products

  • lllyasviel Fooocus 2.1.854 through 2.5.5

Timeline

  • 2025-10-27: disclosed: Security issue #4115 reported on GitHub
  • 2026-09-01: advisory: CVE-2026-51974 published

References