VYPR
Medium severity6.3OSV Advisory· Published Apr 12, 2024· Updated Apr 15, 2026

CVE-2024-31462

CVE-2024-31462

Description

stable-diffusion-webui is a web interface for Stable Diffusion, implemented using Gradio library. Stable-diffusion-webui 1.7.0 is vulnerable to a limited file write affecting Windows systems. The create_ui method (Backup/Restore tab) in modules/ui_extensions.py takes user input into the config_save_name variable on line 653. This user input is later used in the save_config_state method and used to create a file path on line 65, which is afterwards opened for writing on line 67, which leads to a limited file write exploitable on Windows systems. This issue may lead to limited file write. It allows for writing json files anywhere on the server where the web server has access.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

stable-diffusion-webui 1.7.0 on Windows is vulnerable to arbitrary JSON file write via path traversal in the Backup/Restore tab.

Vulnerability

Overview CVE-2024-31462 affects stable-diffusion-webui version 1.7.0, a popular web interface for Stable Diffusion. The vulnerability is a path traversal flaw in the create_ui method within the Backup/Restore tab (file modules/ui_extensions.py). The application takes user input from the interface and assigns it to the config_save_name variable without sufficient sanitization. This unsanitized input is later used in the save_config_state method to construct a file path, which is then opened for writing JSON content [1][4].

Exploitation

Conditions The issue is exploitable specifically on Windows systems. An attacker must be able to access the Backup/Restore UI tab and provide a crafted config_save_name value that includes path traversal sequences (e.g., ..\\ or absolute paths). No authentication is required if the web interface is exposed, making it a server-side request forgery (SSRF) or arbitrary write scenario from the perspective of the web server's file system permissions [2][3].

Impact

Successful exploitation allows an attacker to write arbitrary JSON files to any location on the server where the web server process has write access. While limited to the JSON format, this can be leveraged to overwrite configuration files (like config.json) or inject malicious settings into extension files, potentially leading to further compromise such as remote code execution via crafted UI extensions [1].

Mitigation and

Status As of the publication date (April 12, 2024), no patch has been released by the project maintainers. Users running stable-diffusion-webui on Windows should restrict access to the web interface to trusted networks and monitor for updates from the official repository. The vulnerability has been reported, and the maintainers have acknowledged the issue [1].

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

1

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

9

News mentions

0

No linked articles in our index yet.