INCIDENT MAP

Browse / Unsafe Model Loading and Supply Chain / CVE-2026-44513

Diffusers has a `trust_remote_code` bypass via `custom_pipeline` and local custom components

CVE-2026-44513 · 2026-05-07 high

Class
Unsafe Model Loading and Supply Chain (filed by a model that read the advisory)
Technique
Code and command execution
Affected
diffusers (PyPI)
Gets past
Safe model loader or scanner
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
1.1% chance of exploitation in 30 days

How it works, in short

Remote code in a custom pipeline or local model folder runs even when trust_remote_code is false, because the check sits in the download step that those paths skip. (Our summary, written by a model. The source text is below.)

Details

Impact

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:

Silent remote code execution on the victim's machine. Anyone calling DiffusionPipeline.from_pretrained with custom pipelines is impacted.

Patches

Yes. Fixed in diffusers 0.38.0 via PR #13448. All users on versions < 0.38.0 should upgrade:

pip install --upgrade "diffusers>=0.38.0"

The fix moves the trust_remote_code gate out of DiffusionPipeline.download() and into get_cached_module_file in src/diffusers/utils/dynamic_modules_utils.py, which is the actual chokepoint for every dynamic module load (local, Hub, or community mirror). All three variants now raise ValueError instead of executing untrusted code.

Workarounds

If upgrading immediately is not possible:

These are mitigations, not fixes — the only complete remediation is upgrading to 0.38.0.

Resources

References

Source: GitHub Advisory Database, used under CC BY 4.0.