CVE-2026-44513
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.
Weakness
- CWE-94: Improper Control of Generation of Code
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | total |
| Scored | 2026-05-14 |
Timeline
- 2026-05-07GitHub advisory published (GHSA-98h9-4798-4q5v)7 days before publication
- 2026-05-14Published by the CNA16:26 UTC
- 2026-05-14CISA SSVC decision recordedsame day
Exploit and advisory records
GitHub advisory GHSA-98h9-4798-4q5v, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| PyPI diffusers | before 0.38.0 | 0.38.0 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| huggingface diffusers | before 0.38.0fixed in 0.38.0 | 0.38.0 |
References
- https://github.com/huggingface/diffusers/security/advisories/GHSA-98h9-4798-4q5v
- https://access.redhat.com/errata/RHSA-2026:60520
- 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
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-44513'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-44513'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-44513'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-44513'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).