CVE-2026-44513
HighCVSS 8.8Exploitation Probability (EPSS)
Elevated risk62th percentile - higher than 62% of all known CVEs
Summary
The Diffusers library before version 0.38.0 contains a vulnerability that bypasses the trust_remote_code protection. An attacker can execute arbitrary remote code even when trust_remote_code is set to False or omitted. The issue stems from a flawed implementation of the security check in the download() function, which can be bypassed through alternative code paths.
Risk Assessment
The organization risks remote code execution on servers or workstations using the Diffusers library. An attacker could take control of the system, steal data, or install malware.
Recommendation
Immediately update the Diffusers library to version 0.38.0 or later. Before updating, temporarily disable the use of from_pretrained with custom pipelines and local snapshots.
Other vulnerabilities in Diffusers
See all- CVE-2026-65920Medium
A path traversal vulnerability was found in Diffusers up to version 0.39.0 in the _get_checkpoint_shard_files function. Attackers can supply malicious weight_map values in model index JSON, containing ../ sequences or absolute paths, allowing reading of safetensors files outside the intended directory.
- CVE-2026-45804High
A vulnerability in the Diffusers library before version 0.38.0 allows bypassing the trust_remote_code guard. The download() method validates model_index.json and custom pipeline code but later loads from a cached folder that can change, enabling execution of malicious .py code from a Hub repository without requiring trust_remote_code=True.
Original NVD description (English source)
Diffusers is the a library for pretrained diffusion models. Prior to 0.38.0, a trust_remote_code bypass in DiffusionPipeline.from_pretrained allows arbitrary remote code execution despite the user passing trust_remote_code=False (or omitting it, which is the default). The vulnerability has three variants, all sharing the same root cause — the trust_remote_code gate was implemented inside DiffusionPipeline.download() rather than at the actual dynamic-module load site, so any code path that bypassed or short-circuited download() also bypassed the security check. DiffusionPipeline.from_pretrained('repoA', custom_pipeline='attacker/repoB', trust_remote_code=False) — the gate evaluated against repoA's file list rather than repoB's, so repoB's pipeline.py was loaded and executed. DiffusionPipeline.from_pretrained('/local/snapshot', custom_pipeline='attacker/repoB', trust_remote_code=False) — the local-path branch never invoked download(), so the gate was never reached and remote code from repoB executed. DiffusionPipeline.from_pretrained('/local/snapshot', trust_remote_code=False) where the snapshot contains custom component files (e.g. unet/my_unet_model.py) referenced from model_index.json — same root cause; the local path skipped download() and custom component code executed. This vulnerability is fixed in 0.38.0.

