Stable Diffusion WebUI combines a public page with code execution authority
AUTOMATIC1111's Stable Diffusion WebUI is a local interface for image generation, model management, and extensions. The project exposes command-line options for --listen, --port, --api, --gradio-auth, and --api-auth. Those options describe the security question directly: when the UI is published beyond localhost, who can reach the generation endpoints, and which authentication layer protects them?
The measured set
On 25 November 2026 at 07:48 Asia/Shanghai, the count-only query (title="Stable Diffusion" && (http.body="AUTOMATIC1111" || http.body="sdapi")) || http.body="AUTOMATIC1111" returned 3,285 observations. The scope was sub_type=all, page 1, page size 1. The result is a candidate set built from page text and API terminology. It does not prove that all 3,285 hosts are running the same version or that every host accepts unauthenticated inference requests.
The query deliberately avoids treating the phrase "Stable Diffusion" alone as a product fingerprint. Many sites publish generated images or tutorials. A title combined with AUTOMATIC1111 or sdapi is stronger evidence of the software, but still requires host-level checking. Resolve owned hosts through deployment inventory and compare the current web root, API route, and process command line.
Why a UI is more than a generator
The WebUI loads models, extensions, and custom scripts from local paths. Its command-line documentation describes --allow-code, which allows custom script execution from the web UI, and API authentication options for the API surface. A person who can change settings or invoke a privileged extension may affect the host, not merely consume GPU time. Uploaded models and extensions also become supply-chain inputs.
Public access can expose image prompts, generated content, model names, and system information. The API may allow batch jobs that consume resources, download remote images when allowed by configuration, or modify options. The exact impact depends on flags, extensions, file permissions, and whether the service runs as a dedicated user. A GPU host with a mounted home directory or cloud credentials is a different risk from an isolated workstation.
Remediation
Bind the service to loopback unless remote access is required. If remote access is required, terminate TLS at a trusted proxy and enforce authentication on both the UI and API. Do not assume --gradio-auth protects an API started with --api; configure the API-specific control as well. Disable --allow-code and unneeded remote requests. Run the process as a low-privilege account with only the model and output directories it needs.
Review extensions and downloaded model sources. Hash approved artifacts, pin versions, and keep a list of what was added after the last known-good deployment. Rotate cloud credentials or repository tokens if a host with those credentials was reachable through an unprotected interface. Add a network policy that prevents the inference host from reaching unrelated internal management services.
For owned matches, test anonymous access to the root page, /sdapi/v1/options, and a harmless generation endpoint with a deliberately invalid request. A rejection before model work is the expected result. Then verify that an authenticated request can complete a small test and that the process account cannot read unrelated secrets.
References
- AUTOMATIC1111 command-line and settings
- AUTOMATIC1111 project
- API implementation
- ZoomEye count-only query:
(title="Stable Diffusion" && (http.body="AUTOMATIC1111" || http.body="sdapi")) || http.body="AUTOMATIC1111"; 3,285;sub_type=all; page 1; page size 1; 2026-11-24T23:48:14Z.