# CVE-2026-111985: AUTOMATIC1111 stable-diffusion-webui resource exhaustion in metadata extraction

Source: https://junglewise.ai/threats/cve-2026-111985-a-vulnerability-was-found-in-automatic1111-stable-diffusion  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-18. Updated: 2026-10-18  
License: CC BY 4.0 with a link back

CVE-2026-111985 · Severity: medium · CVSS 4.3 · Published 2026-10-18

AUTOMATIC1111's Stable Diffusion web UI is an image generation tool that users interface with via a web browser. A vulnerability in how the application reads model metadata from safetensors files allows an attacker to cause the application to attempt massive memory allocations by crafting a malicious model file with a forged header size, leading to memory exhaustion and potential denial of service during model enumeration or server startup.

Technologies: [AUTOMATIC1111 Stable Diffusion WebUI](https://junglewise.ai/threats/technologies/stable-diffusion-webui). Vendors: [AUTOMATIC1111](https://junglewise.ai/threats/vendors/automatic1111).

## Quick answers

**Is CVE-2026-111985 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-111985 being exploited in the wild.

**How severe is CVE-2026-111985?** Medium severity, with a CVSS score of 4.3, published 18 October 2026.

**Which products and versions are affected?** AUTOMATIC1111 Stable Diffusion WebUI up to 1.10.1.

**Is there a fix for CVE-2026-111985?** No fixed version is recorded yet. Validate the declared metadata header length against the actual file size using os.fstat() before reading, or delegate metadata extraction to the official safetensors library which includes proper bounds checking. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-111985 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-111985?** Check whether you run AUTOMATIC1111 Stable Diffusion WebUI at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix


Validate the declared metadata header length against the actual file size using os.fstat() before reading, or delegate metadata extraction to the official safetensors library which includes proper bounds checking.

## Technical details

The vulnerability exists in the read_metadata_from_safetensors() function in modules/sd_models.py, which parses the safetensors header by reading an 8-byte little-endian length field directly from the file start and using it as the size argument for file.read() without validating it against the actual file size. An attacker can craft a malicious safetensors file as small as 40 bytes with a declared header length of 2^46 bytes, causing the application to attempt allocating ~64 TiB of memory whenever the model is scanned (at startup or during checkpoint refresh). The official safetensors library includes bounds checking and absolute header limits; this reimplementation lacks both.

## Affected products

- AUTOMATIC1111 stable-diffusion-webui up to 1.10.1

## Timeline

- 2026-09-29: disclosed: Vulnerability reported via GitHub issue #17498
- 2026-10-18: advisory

## References

- [https://github.com/AUTOMATIC1111/stable-diffusion-webui/](https://github.com/AUTOMATIC1111/stable-diffusion-webui/)
- [https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/17498](https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/17498)

## Related threats

- [AUTOMATIC1111 stable-diffusion-webui stored XSS in Extra-Networks Card Builder](https://junglewise.ai/threats/cve-2026-111987-a-vulnerability-was-identified-in-automatic1111-stable-diffusion)
- [AUTOMATIC1111 stable-diffusion-webui code injection in model instantiation](https://junglewise.ai/threats/cve-2026-111986-a-vulnerability-was-determined-in-automatic1111-stable-diffusion)
- [AUTOMATIC1111 stable-diffusion-webui cross-site scripting in card builder](https://junglewise.ai/threats/cve-2026-111984-a-vulnerability-has-been-found-in-automatic1111-stable-diffusion)
- [Stable Diffusion WebUI credential disclosure in /sdapi/v1/cmd-flags endpoint](https://junglewise.ai/threats/cve-2026-82288-stable-diffusion-webui-credential-disclosure-in-sdapi-v1-cmd)
