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 repoAs file list rather than repoBs, so repoBs 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.
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Diffusers | Huggingface | * | 0.38.0 (excluding) |
| Red Hat AI Inference Server 3.4 | RedHat | rhaii/vllm-cpu-rhel9:1789681128 | * |
| Red Hat AI Inference Server 3.4 | RedHat | rhaii/vllm-cuda-rhel9:1789681126 | * |
| Red Hat AI Inference Server 3.4 | RedHat | rhaii/vllm-cpu-rhel9:1790075793 | * |
| Red Hat AI Inference Server 3.4 | RedHat | rhaii/vllm-cuda-rhel9:1790090131 | * |
| Red Hat Enterprise Linux AI 3.4 | RedHat | rhelai3/disk-image-cuda-rhel9:1790957417 | * |
| Red Hat Enterprise Linux AI 3.4 | RedHat | rhelai3/bootc-aws-cuda-rhel9:1790881122 | * |
| Red Hat Enterprise Linux AI 3.4 | RedHat | rhelai3/bootc-azure-cuda-rhel9:1790881120 | * |
| Red Hat Enterprise Linux AI 3.4 | RedHat | rhelai3/bootc-cuda-rhel9:1790868254 | * |
| Red Hat Enterprise Linux AI 3.4 | RedHat | rhelai3/bootc-gcp-cuda-rhel9:1790881123 | * |
| Red Hat OpenShift AI 3.4 | RedHat | rhoai/odh-th06-cuda130-torch210-py312-rhel9:1787077779 | * |
| Red Hat OpenShift AI 3.4 | RedHat | rhoai/odh-th06-rocm64-torch291-py312-rhel9:1787076481 | * |
| Red Hat OpenShift AI 3.4 | RedHat | rhoai/odh-training-cuda128-torch29-py312-rhel9:1786611803 | * |
| Red Hat OpenShift AI 3.4 | RedHat | rhoai/odh-training-rocm64-torch29-py312-rhel9:1786611435 | * |