Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach exposed Fooocus web UI
-
DeliverySupply image with crafted metadata
-
ExploitMetadata string passed to eval() in meta_parser.py
-
ExecutionPython payload executes on host
-
ImpactArbitrary code execution as service user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File type validation, storage isolation
MITRE ATT&CK
2 techniques across 2 tactics: Command and Control, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires reachability to the Fooocus web UI and that the target processes attacker-supplied image metadata through the meta_parser.py code path (loading/importing an image or its generation parameters, which triggers eval() on fields like resolution, adm_guidance, inpaint parameters, or LoRA hash strings). Per the CVSS 4.0 vector PR:N/UI:N, no authentication or user interaction is required, consistent with Fooocus's default unauthenticated web UI; the crafted metadata itself is the payload. The primary limiting factor is network exposure: instances bound only to localhost for single-user local use are reachable only by a local user, whereas instances published to a LAN or the internet are exploitable by any remote party. Affected only on versions 2.5.5 and prior; a patched release does not yet exist. |
| Impact | The signals are strongly consistent with high real-world risk for exposed instances: the CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H, base 9.3) indicates network-reachable, low-complexity exploitation with no privileges or user interaction and full compromise of confidentiality, integrity and availability. The technical root cause is unambiguous - direct eval() on attacker-controlled input - which makes exploitation reliable rather than probabilistic, so the practical impact is more severe than EPSS alone would suggest. There is no EPSS score, KEV entry, or confirmed public POC in the provided data, so scoring rests on the CVSS vector and source-code evidence rather than observed exploitation; the absence of a KEV listing suggests no confirmed mass exploitation yet, not safety. One caveat worth verifying: PR:N assumes the web UI is unauthenticated, which is Fooocus's default, but the description's phrase 'an attacker with access to the Fooocus web UI' means the real exposure depends on whether the instance is bound to localhost or published to a network - an internet-exposed Fooocus should be treated as urgently exploitable, while a purely local single-user install carries far lower risk. Given how trivially the eval() sink can be reached, any operator running a network-reachable or shared instance should treat this as urgent and prioritize the source patch. |
| Exploit ScenarioDerived | An attacker who can reach a network-exposed Fooocus web UI submits (or gets a victim to import) an image whose embedded generation metadata contains a malicious Python expression in a field such as resolution. When meta_parser.py calls eval() on that value, the payload executes on the server, giving the attacker arbitrary code execution as the Fooocus process user. Given AV:N and AC:L, no special tooling is required, though no public POC is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 11, 2026
Remote code execution in Fooocus (lllyasviel/Fooocus) versions 2.5.5 and earlier allows an attacker who can reach the web UI to run arbitrary Python by supplying crafted image metadata that the server passes to eval(). Anyone able to load or import an image whose embedded generation metadata contains malicious Python expressions can achieve full code execution on the host. There is no public exploit identified at time of analysis and it is not listed in CISA KEV, but an upstream fix pull request (PR #4207) and a GitHub Security Lab advisory (GHSL-2024-196) both confirm the flaw.
RemediationAI
No vendor-released patched version was available at time of analysis; an upstream fix is available as a pull request (PR #4207, https://github.com/lllyasviel/Fooocus/pull/4207) but not yet as a tagged release, so a released patched version is not independently confirmed. The concrete fix is to replace every eval() call in modules/meta_parser.py with ast.literal_eval() as done in that PR - operators can apply the diff manually while awaiting an official release. Until then, restrict exposure: bind the Fooocus/Gradio server to localhost (127.0.0.1) rather than 0.0.0.0, place it behind an authenticating reverse proxy or VPN, and do not import or load images from untrusted sources, since malicious metadata is the delivery vector (trade-off: this blocks legitimate metadata import and shared/remote access). Review the GitHub Security Lab advisory (https://securitylab.github.com/advisories/GHSL-2024-196_Fooocus/) and issue #3552 (https://github.com/lllyasviel/Fooocus/issues/3552) for the authoritative fix status.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Fooocus is a Gradio-based front end for Stable Diffusion image generation. The vulnerable code lives in modules/meta_parser.py, which parses metadata embedded in image files (resolution, guidance, inpaint parameters, LoRA hashes, etc.). Multiple parsing helpers - get_str, get_steps, get_inpaint_method, get_adm_guidance and to_json - call Python's built-in eval() directly on attacker-influenced metadata strings such as data['resolution']. Because eval() executes arbitrary Python, any metadata field routed through it becomes a code-injection sink. The upstream fix (PR #4207) replaces every eval() with ast.literal_eval(), which only evaluates literal structures (tuples, numbers, strings) and cannot invoke code. Although NVD classifies this as CWE-434 (Unrestricted Upload of File with Dangerous Type) - reflecting that the vector is a crafted image/metadata file - the underlying root cause is code injection via unsafe deserialization/evaluation (closer to CWE-95/CWE-502). The affected package is identified by CPE cpe:2.3:a:lllyasviel:fooocus:*.
Know when Fooocus gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Default Fooocus web UI is unauthenticated (PR:N) and eval() is reached with a simple crafted metadata request (AC:L, UI:N), yielding full host compromise (C/I/A:H); network exposure is the practical gating factor.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
Fooocus is an image generating software. In versions 2.5.5 and prior, the Fooocus web UI is vulnerable to remote code execution due to the unsafe use of eval when processing metadata JSON. An attacker with access to the Fooocus web UI may be able to execute arbitrary code on the instance. As of time of publication, no known patched versions are available, but a suggested fix pull request is available.
Executive ViewAI
Fooocus image generation software versions 2.5.5 and earlier contain a critical remote code execution vulnerability (CVE-2025-31114, CVSS 9.3) that allows attackers to execute arbitrary Python code through crafted image metadata. Organizations using this tool face complete system compromise, with exploitation delivered through manipulated image files loaded into the application.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict Fooocus web UI access to trusted networks only; implement input validation and sandboxing for image uploads; monitor for suspicious Python code execution patterns; consider disabling image import functionality if not operationally critical; isolate affected systems from production networks; enable comprehensive logging and alerting on all file uploads and execution events.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2025-210684
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB