Diffusers: `trust_remote_code` bypass via `custom_pipeline` and local custom components
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 3 fixed, 2 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-94.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| huggingface | diffusers | before 0.38.0 | 0.38.0 | Patch available | CNA |
| — | diffusers (PyPI) | before 0.38.0 | 0.38.0 | Patch available | GHSA-98h9-4798-4q5v |
- diffusers Vendorhuggingface Affected before 0.38.0 Fixed in 0.38.0 Patch available CNA
- diffusers (PyPI) Vendor— Affected before 0.38.0 Fixed in 0.38.0 Patch available GHSA-98h9-4798-4q5v
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:huggingface:diffusers:*:*:*:*:*:python:*:* | before 0.38.0 | Vulnerable | huggingface |
- cpe:2.3:a:huggingface:diffusers:*:*:*:*:*:python:*:* Versions before 0.38.0 Vulnerable ·huggingface
Remediation
- Fix · CNA diffusers (huggingface) Fixed in 0.38.0
- Fix · GHSA-98h9-4798-4q5v diffusers (PyPI) Fixed in 0.38.0 Advisory →
Red Hat 7 advisories
- RHSA-2026:76150 Released 2026-10-05 · Red Hat rating ImportantRed Hat Enterprise Linux AI 3.4.5 security update
- Red Hat Enterprise Linux AI 3.4 registry.redhat.io/rhelai3/bootc-aws-cuda-rhel9, registry.redhat.io/rhelai3/bootc-azure-cuda-rhel9, registry.redhat.io/rhelai3/bootc-azure-rocm-rhel9 +3
- RHSA-2026:76149 Released 2026-10-05 · Red Hat rating ImportantRed Hat Enterprise Linux AI 3.4.5 security update
- Red Hat Enterprise Linux AI 3.4 registry.redhat.io/rhelai3/disk-image-cuda-rhel9
- RHSA-2026:70979 Released 2026-09-23 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (cuda)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-cuda-rhel9
Show 4 more Red Hat advisories
- RHSA-2026:70965 Released 2026-09-23 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (cpu)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-cpu-rhel9
- RHSA-2026:69467 Released 2026-09-21 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (cuda)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-cuda-rhel9
- RHSA-2026:69466 Released 2026-09-21 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (cpu)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-cpu-rhel9
- RHSA-2026:60520 Released 2026-08-27 · Red Hat rating CriticalRHOAI 3.4.4 - Red Hat OpenShift AI
- Red Hat OpenShift AI 3.4 registry.redhat.io/rhoai/odh-automl-rhel9, registry.redhat.io/rhoai/odh-autorag-rhel9, registry.redhat.io/rhoai/odh-built-in-detector-rhel9 +47
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat AI Inference Server | Affected | No fix planned: Will not fix |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet |
| Red Hat AI Inference Server 3.4 | Fixed | RHSA-2026:69466, RHSA-2026:69467, RHSA-2026:70965, RHSA-2026:70979 |
| Red Hat Enterprise Linux AI 3.4 | Fixed | RHSA-2026:76149, RHSA-2026:76150 |
| Red Hat OpenShift AI 3.4 | Fixed | RHSA-2026:60520 |
Not affected: 4 products
- Red Hat AI Inference Server
- Red Hat Enterprise Linux AI 3.4
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift AI 3.4
Timeline
- 2026-10-02 Threatist record created from CVE-2026-44513
- 2026-10-03 Alias added: GHSA-98h9-4798-4q5v
- 2026-10-06 Fix available: RHSA-2026:76149 · Red Hat
- 2026-10-06 Fix available: RHSA-2026:76150 · Red Hat
- 2026-10-06 Fix available: Red Hat Enterprise Linux AI 3.4 · Red Hat
References
Other 6
- https://github.com/huggingface/diffusers/issues/13446
- https://github.com/huggingface/diffusers/pull/13448
- https://github.com/huggingface/diffusers/commit/a37f6f8394ac2a7ee8360c3abea811efe54512b1
- https://github.com/huggingface/diffusers
- https://github.com/huggingface/diffusers/releases/tag/v0.38.0
- https://github.com/pypa/advisory-database/tree/main/vulns/diffusers/PYSEC-2026-40.yaml
More huggingface Diffusers vulnerabilities
- TI-2026-32710 Diffusers: None.py Trust Remote Code Bypass CVSS 3.1HIGH 8.8
- TI-2026-33539 Diffusers: TOCTOU Trust Remote Code Bypass CVSS 3.1HIGH 7.5
Sources
- CVE-2026-44513 · CVE Program
- CVE-2026-44513 · NVD
- FIRST EPSS
- GHSA-98h9-4798-4q5v · GitHub Advisory Database · CC BY 4.0
- CVE-2026-44513 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences