CVE-2026-44513
Diffusers: `trust_remote_code` bypass via `custom_pipeline` and local custom components
Also known as GHSA-98h9-4798-4q5v, PYSEC-2026-40
Mitigation
- Upgrade diffusers to 0.38.0 or later.
Who should check
- Projects that depend on PyPI package diffusers (< 0.38.0)
- Anyone running huggingface diffusers < 0.38.0
Vulnerability facts
- Affected
- diffusers < 0.38.0
- Fixed in
- 0.38.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 8.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 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
- EPSS
- 0.89% chance of exploitation in 30 days (percentile 57, 2026-11-26)
- CWE
- CWE-94
- Modified
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
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI diffusers | < 0.38.0 | 0.38.0 | osv |
| huggingface diffusers | < 0.38.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
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.
References
Vendor advisories
Patches
Other
- https://access.redhat.com/security/cve/CVE-2026-44513
- https://bugzilla.redhat.com/show_bug.cgi?id=2477507
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-44513.json
- https://github.com/huggingface/diffusers/issues/13446
- 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
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.