Vulnerability
CVE-2026-45804
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.
18 advisories report this vulnerability, across 2 ecosystems.
Advisories
- CGA-2cj4-2mh5-q6mq
- CGA-48fg-pxj5-xx79
- CGA-4c5f-6hfv-wrg4
- CGA-5fmx-c465-vw89
- CGA-5mqf-85jw-q34c
- CGA-84x9-5hh6-hhh5
- CGA-89gw-q4x9-4q39
- CGA-8g78-22gr-wj64
- CGA-c8rp-33c6-c89v
- CGA-mxj5-qc9w-fhh4
- CGA-q4gj-g44q-ffh9
- CGA-qc9p-9c3h-hx2v
- CGA-qr7p-2q85-ghf5
- CGA-r8gq-hqf5-hx9v
- CGA-rfvj-m38q-6h9h
- CGA-vr98-fx2f-g8v3
-
GHSA-7wx4-6vff-v64p
Diffusers: TOCTOU Trust Remote Code Bypass
-
PYSEC-2026-2446
Diffusers: TOCTOU Trust Remote Code Bypass
References
- https://github.com/huggingface/diffusers/commit/a37f6f8394ac2a7ee8360c3abea811efe54512b1
- https://github.com/huggingface/diffusers/issues/13446
- https://github.com/huggingface/diffusers/pull/13448
- https://github.com/huggingface/diffusers/releases/tag/v0.38.0
- https://github.com/huggingface/diffusers/security/advisories/GHSA-7wx4-6vff-v64p