Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
7.5

CVE-2026-45804: Diffusers library may run untrusted code

CVE-2026-45804 · published 3 months ago
Summary

If you use the Diffusers library version earlier than 0.38.0, a model downloaded from the online hub can execute custom Python code even when you haven’t explicitly allowed it. This could let an attacker run unwanted code on your system. Upgrade Diffusers to version 0.38.0 or newer to restore the safety check.

What to do
  • Update the hugging face team (past and future) with the help of all our contributors (https://github.com/huggingface/diffusers/graphs/contributors) diffusers to version 0.38.0.
  • Update huggingface diffusers to version 0.38.0 or later.
Affected software
Ecosystem VendorProductAffected versions
– huggingface diffusers < 0.38.0
pip the hugging face team (past and future) with the help of all our contributors (https://github.com/huggingface/diffusers/graphs/contributors) diffusers < 0.38.0
Fix: upgrade to 0.38.0
Original advisory text
Diffusers: TOCTOU Trust Remote Code Bypass
Diffusers is the a library for pretrained diffusion models. Prior to 0.38.0, Diffusers' DiffusionPipeline.from_pretrained flow can bypass the trust_remote_code guard because download() validates model_index.json and custom pipeline code before later loading from a cached folder that can change, allowing a Hub repository with custom .py pipeline code to execute through the custom pipeline flow without passing custom_pipeline or trust_remote_code=True. This issue is fixed in version 0.38.0.
Fix within
Internet-facing 14 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit
  • Gives an attacker full control
Severity
7.5 High
Exploitation
<1% chance of attack within 30 days
Type
CWE-367Time-of-check Time-of-use (TOCTOU) Race Condition
Timeline
Published15 Jul 2026
Updated4 Nov 2026
First seen20 May 2026
Sources
CVE-2026-45804 · MITRE
Track software like this
Free during beta