# CVE-2026-44513: Diffusers: `trust_remote_code` bypass via `custom_pipeline` and local custom components

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.07%, higher than 65% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-07T05:31:17.000Z
- Modified: 2026-10-26T14:10:00.130Z
- Also known as: GHSA-98h9-4798-4q5v, PYSEC-2026-40
- Weaknesses: CWE-94, CWE-358
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- huggingface diffusers: < 0.38.0; before 0.38.0
- rhoai/odh-th06-cuda130-torch210-py312-rhel9: no versions given (not affected: from 1787077779 before *)
- rhoai/odh-th06-rocm64-torch291-py312-rhel9: no versions given (not affected: from 1787076481 before *)
- rhoai/odh-training-cuda128-torch29-py312-rhel9: no versions given (not affected: from 1786611803 before *)
- rhoai/odh-training-rocm64-torch29-py312-rhel9: no versions given (not affected: from 1786611435 before *)
- rhaiis/vllm-cpu-rhel9: no versions given
- rhaiis/vllm-cuda-rhel9: no versions given
- rhaiis/vllm-rocm-rhel9: no versions given
- rhaiis/vllm-tpu-rhel9: no versions given
- rhaii/vllm-cpu-rhel9: no versions given
- rhaii/vllm-cuda-rhel9: no versions given
- rhelai3/bootc-aws-cuda-rhel9: no versions given
- rhelai3/bootc-azure-cuda-rhel9: no versions given
- rhelai3/bootc-cuda-rhel9: no versions given
- rhelai3/bootc-gcp-cuda-rhel9: no versions given
- rhoai/odh-openvino-model-server-rhel9: no versions given
- rhoai/odh-th06-cuda130-torch291-py312-rhel9: no versions given
- diffusers (PyPI): before 0.38.0

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- redhat-SADP: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/huggingface/diffusers/security/advisories/GHSA-98h9-4798-4q5v> (exploit, evidence, mitigation, vendor-advisory, web)
- <https://access.redhat.com/security/cve/CVE-2026-44513> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2477507> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-44513.json>
- <https://access.redhat.com/errata/RHSA-2026:60520> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-44513> (advisory)
- <https://github.com/huggingface/diffusers/issues/13446> (web)
- <https://github.com/huggingface/diffusers/pull/13448> (web)
- <https://github.com/huggingface/diffusers/commit/a37f6f8394ac2a7ee8360c3abea811efe54512b1> (web)
- <https://github.com/huggingface/diffusers> (package)
- <https://github.com/huggingface/diffusers/releases/tag/v0.38.0> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/diffusers/PYSEC-2026-40.yaml> (web)

## Sources

- CVE List: [CVE-2026-44513](https://www.cve.org/CVERecord?id=CVE-2026-44513), CVE Terms of Use, modified 2026-08-28
- GitHub Advisory Database: [GHSA-98h9-4798-4q5v](https://github.com/advisories/GHSA-98h9-4798-4q5v), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-44513](https://nvd.nist.gov/vuln/detail/CVE-2026-44513), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-40](https://osv.dev/vulnerability/PYSEC-2026-40), CC-BY-4.0, modified 2026-05-20

---

Page: https://cve.day/CVE-2026-44513 · Whole record: https://cve.day/CVE-2026-44513.json · Rebuilt by cve.day 2026-11-25T22:59:21.730Z
