Skip to content
Heist/ feed
Back to feed
Medium

Limited file write in Stable-diffusion-webui - GHSL-2024-010

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-31462
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 15:36 UTC · Revision 1

Source evidence

Limited file write in Stable-diffusion-webui - GHSL-2024-010

core-osv · Original source

Published 12 Apr 2024, 21:41 UTC

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.

osv:CVE-2024-31462
Complete source record
{
  "id": "c28b9772bac4629b46dfe390579637f5b346c4f0a064ea2d251b02e8f5055b31",
  "url": "https://osv.dev/vulnerability/CVE-2024-31462",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Limited file write in Stable-diffusion-webui - GHSL-2024-010",
    "summary": "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.",
    "evidence": "osv:CVE-2024-31462",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-31462",
      "aliases": [
        "CVE-2024-31462"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/automatic1111/stable-diffusion-webui",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "d9708c92b444894bce8070e4dcfaa093f8eb8d43"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.8.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "d9708c92b444894bce8070e4dcfaa093f8eb8d43"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.9.0-RC",
            "v1.7.0-RC",
            "v1.6.0-RC",
            "v1.5.2-RC",
            "v1.5.1-RC",
            "v1.4.1",
            "v1.4.0",
            "v1.5.0-RC",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.1",
            "v1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v1.0.0-pre"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-31462.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:51.105245410Z",
      "provider": "osv",
      "references": [
        "https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/cf2772fab0af5573da775e7437e6acdca424f26e/modules/ui_extensions.py#L59",
        "https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/cf2772fab0af5573da775e7437e6acdca424f26e/modules/ui_extensions.py#L646-L660",
        "https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/cf2772fab0af5573da775e7437e6acdca424f26e/modules/ui_extensions.py#L65",
        "https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/cf2772fab0af5573da775e7437e6acdca424f26e/modules/ui_extensions.py#L653",
        "https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/cf2772fab0af5573da775e7437e6acdca424f26e/modules/ui_extensions.py#L67",
        "https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/v1.7.0/modules/ui_extensions.py",
        "https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/15461",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31462.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-31462",
        "https://securitylab.github.com/advisories/GHSL-2024-010_stable-diffusion-webui",
        "https://securitylab.github.com/advisories/GHSL-2024-010_stable-diffusion-webui/",
        "https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/d9708c92b444894bce8070e4dcfaa093f8eb8d43"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31462.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-31462",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 519777,
  "published_at": "2024-04-12T21:41:46.345+00:00"
}