# CVE-2026-44513: Diffusers: \`trust\_remote\_code\` bypass via \`custom\_pipeline\` and local custom components

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.89% (percentile 57, 2026-11-26)
- **CWE:** CWE-94
- **Aliases:** GHSA-98h9-4798-4q5v, PYSEC-2026-40
- **Published:** 2026-05-07T05:31:17.000Z
- **Modified:** 2026-10-26T14:10:00.130Z

## Who should check

- Projects that depend on PyPI package diffusers (\< 0.38.0)
- Anyone running huggingface diffusers \< 0.38.0

## 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.

## Affected and fixed versions

- PyPI `diffusers`: affected \< 0.38.0; fixed 0.38.0 (osv)
- huggingface diffusers: \< 0.38.0 (cvelist)

## Mitigation

- Upgrade diffusers to 0.38.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-44513. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-44513.md
Affected: diffusers < 0.38.0
Fixed in: 0.38.0

Steps:
1. Search this machine and project for diffusers (PyPI), huggingface diffusers: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-44513 being exploited?

There is no confirmed exploitation: CVE-2026-44513 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.89% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-44513?

High: CVSS 8.8 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-44513?

diffusers \< 0.38.0.

### Is there a fix for CVE-2026-44513?

Yes. Fixed in 0.38.0. Upgrade diffusers to 0.38.0 or later.

### How do I check if I'm affected by CVE-2026-44513?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-44513>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-98h9-4798-4q5v> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-40> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-44513> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-44513>
