External risk intelligence

Fooocus RCE via Unsafe JSON Metadata Processing

CVE advisorySeverity: CRITICAL (CVSS 9.3)

CVE-2025-31114

Fooocus is image generation software that provides a web UI. While it is often run locally or on internal GPU servers by individuals, it is technically a web service that could be exposed to the internet. Because it is typically used as a personal or internal tool rather than an enterprise-facing edge service or gateway, internet exposure is possible but not the standard deployment pattern.

Remote Code Execution

Halo Surface Signal: 3 out of 5 — possibly public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

Fooocus, an image generation software, has a critical vulnerability where an attacker could execute arbitrary code on an instance by exploiting how the web UI processes metadata. This issue stems from the unsafe use of a function that processes JSON inputs. While a fix is being developed, no patched version is currently available, meaning organizations need to assess if their use of Fooocus could be exposed.

  • Attackers can run unauthorized code remotely.
  • Critical flaw in image generation software needs awareness.
  • Confirm relevance and exposure of this technology.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this vulnerability by interacting with the Fooocus web UI, which lacks proper security for processing user-supplied metadata. If an attacker can send specially crafted JSON data containing malicious code within the metadata, the software's use of an unsafe `eval` function could allow them to execute arbitrary commands on the system running Fooocus.

  • No authentication required.
  • Triggered by processing metadata JSON.
  • Leads to arbitrary code execution.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, remote attackers with access to the Fooocus web UI could execute arbitrary code on the instance by sending specially crafted metadata JSON, potentially affecting the integrity and availability of the system.

  • Arbitrary code execution on the instance.
  • Unsafe eval of crafted JSON metadata.
  • System compromise or unauthorized actions.

Operational Fix

Recommended remediation, mitigation, and detection steps

Fooocus, an image generation tool, presents a critical remote code execution vulnerability in its web UI that could allow an attacker to execute arbitrary code. Given its typical use as a personal or internal tool, responsibility for addressing this likely falls to individual users or internal platform teams managing GPU resources, rather than dedicated enterprise security teams. The first step is to determine if any instances of Fooocus are exposed externally or accessible by unauthorized users, and then to plan remediation based on this exposure and business criticality.

  • Identify and assess affected Fooocus instances.
  • Confirm reachability and business criticality.
  • Plan remediation with vendor coordination.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is Fooocus software?

Fooocus is an open-source image generation tool designed to transform text prompts into high-quality visual art. It is built on stable diffusion technology and provides a user-friendly web interface. Users typically deploy it on systems equipped with GPUs to handle the intensive computational requirements of image synthesis.

What does CWE-434 mean for CVE-2025-31114?

This vulnerability involves the improper processing of user-supplied data. Specifically, Fooocus uses an unsafe 'eval' function when handling metadata JSON. Because the application blindly trusts and executes the contents of this JSON, it inadvertently allows an attacker to run arbitrary code on the underlying system instead of simply reading the image information.

How is this Fooocus vulnerability triggered?

The flaw is triggered when the Fooocus web UI processes specially crafted metadata JSON. An attacker must be able to interact with this input field to supply malicious data. Simply browsing or viewing the interface without triggering the metadata processing mechanism does not activate the vulnerability.

Is my instance of Fooocus at risk?

Risk depends on your deployment. Halo Surface Signal notes that while Fooocus is often run as a local or internal tool, it is a web service that can be internet-facing. If your instance is reachable from the public internet, it faces a higher risk of exploitation compared to a version isolated within a secure, private network.

How should I respond to this threat?

Since no official patched version is currently available, you should prioritize restricting access to your Fooocus instance. Ensure it is not exposed to the public internet and limit usage to trusted users. Monitor the project's official communication channels for updates, as a community-driven pull request is currently in development to address this issue.

References