Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-111986 Overview
CVE-2026-111986 is a code injection vulnerability in AUTOMATIC1111 stable-diffusion-webui through version 1.10.1. The flaw resides in the get_obj_from_str function within modules/sd_models.py, which handles model instantiation. An attacker who can influence the Target argument processed by this function can inject arbitrary Python code during model loading. Public proof-of-concept material has been disclosed, demonstrating exploitation through a crafted YAML configuration delivered in a model archive. The project maintainers were notified through an issue report but have not responded at the time of disclosure. The weakness is classified under CWE-74: Improper Neutralization of Special Elements in Output.
Critical Impact
Successful exploitation allows injection and execution of attacker-controlled Python code in the context of the stable-diffusion-webui process, with user interaction required to load a malicious model or configuration.
Affected Products
- AUTOMATIC1111 stable-diffusion-webui versions up to and including 1.10.1
- Component: Model Instantiation (modules/sd_models.py)
- Function: get_obj_from_str
Discovery Timeline
- 2026-10-18 - CVE-2026-111986 published to the National Vulnerability Database (NVD)
- 2026-10-22 - Last updated in NVD database
- 2026-10-22 - EPSS score recorded at 0.402% (33.29 percentile)
Technical Details for CVE-2026-111986
Vulnerability Analysis
The vulnerable function get_obj_from_str in modules/sd_models.py is used during model instantiation to resolve a class or callable from a string identifier. When the string value passed as the Target argument is not strictly validated, the function performs dynamic resolution that an attacker can abuse to reference arbitrary Python objects. The result is code injection within the Python runtime hosting the web UI.
Exploitation is initiated remotely over the network, but requires a user to load an attacker-supplied model or configuration file. The attacker-controlled Python objects execute with the privileges of the stable-diffusion-webui process, which commonly runs in the user's desktop or server session with broad filesystem and GPU access.
Root Cause
The root cause is improper neutralization of a string argument that is subsequently used to dynamically resolve and instantiate a Python object. The pattern — resolving an arbitrary dotted import path from untrusted input — allows the attacker to target functions and classes that execute code at import or construction time. See the upstream issue tracking the flaw for the full triage context.
Attack Vector
The attack vector is remote delivery of a crafted model package or YAML configuration containing a malicious target field. A public proof-of-concept distributed as a YAML target PoC archive demonstrates the technique. When the victim loads the model through the web UI, the injected Python path is resolved by get_obj_from_str and executed. No authentication is required on the vulnerable function itself; the gating condition is the victim action of loading the model.
See the VulDB entry for CVE-2026-111986 for additional technical references.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-111986
Indicators of Compromise
- Model YAML or configuration files containing unexpected dotted import paths in target fields that resolve to modules outside the project's expected namespace (for example, os, subprocess, builtins, or importlib).
- Unexpected child processes spawned by the stable-diffusion-webui Python process, especially shells, package managers, or network utilities.
- Outbound network connections initiated by the webui process to non-model-related hosts shortly after a model load event.
Detection Strategies
- Scan model archives and user-supplied YAML configurations for target: entries and allowlist only project-approved classes before load.
- Monitor process ancestry for the Python interpreter running webui.py and alert on uncommon child executables or interactive shells.
- Correlate file-write events in the models directory with subsequent process execution anomalies to identify delivery-plus-trigger patterns.
Monitoring Recommendations
- Enable endpoint telemetry on hosts running stable-diffusion-webui and retain command-line arguments for all child processes of the Python interpreter.
- Baseline normal outbound network behavior for the webui host and alert on new domains or raw IP destinations following model load activity.
- Audit the models directory for new files whose source is unknown or untrusted and flag YAML files that reference target paths outside the vendor codebase.
How to Mitigate CVE-2026-111986
Immediate Actions Required
- Do not load models, checkpoints, or YAML configurations from untrusted sources until a patched release is available.
- Restrict access to the stable-diffusion-webui interface to trusted users only; do not expose it to the public internet.
- Run the webui as an unprivileged user inside an isolated environment such as a container or dedicated virtual machine to limit the blast radius of code execution.
Patch Information
No vendor patch is available at the time of publication. The maintainers were informed through the GitHub issue #17499 but have not yet responded. Monitor the AUTOMATIC1111/stable-diffusion-webui repository for an upstream fix and apply updates when published.
Workarounds
- Review modules/sd_models.py and wrap get_obj_from_str with an allowlist that restricts resolution to known-safe module paths within the project.
- Pre-scan every model archive and configuration file for a target key and reject any value whose module prefix is not explicitly approved.
- Execute the webui in a sandboxed environment with network egress filtering so that successful code injection cannot establish command-and-control channels.
# Example: grep model configs for unexpected target paths before loading
grep -R --include='*.yaml' -nE '^\s*target:\s*' /path/to/models \
| grep -vE 'ldm\.|sgm\.|modules\.' \
| tee suspicious_targets.log
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

