Skip to main content

Fooocus CVE-2025-31114

| EUVDEUVD-2025-210684 CRITICAL
Unrestricted Upload of File with Dangerous Type (CWE-434)
2026-08-11 GitHub_M
9.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach exposed Fooocus web UI
  2. Delivery
    Supply image with crafted metadata
  3. Exploit
    Metadata string passed to eval() in meta_parser.py
  4. Execution
    Python payload executes on host
  5. Impact
    Arbitrary 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.9% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Fooocus ≤ 2.5.5

Affected Packages

euvd fooocus no fix

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

Vendor (GitHub_M) PRIMARY 9.3 CRITICAL
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
vuln.today AI 9.8 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

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

EPSS Score
0.9%
Top 44% exploitable
Prevalence
Low
popular open-source AI-art UI, mostly local/hobbyist, minimal enterprise footprint
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.9%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy