Unsafe reflection in Diffusers - #VU164387
Published: November 10, 2026
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code with the victim's privileges when loading a malicious Diffusers repository.
The vulnerability exists due to externally controlled module selection in Diffusers model loading when component library names reach importlib.import_module() or requirements keys reach importlib.util.find_spec() without validation. A remote attacker can entice a victim to load a crafted local repository using from_pretrained(), with the repository importable from a sys.path root, to execute bundled Python code even with trust_remote_code=False and DIFFUSERS_DISABLE_REMOTE_CODE=1.