Diffusers: TOCTOU Trust Remote Code Bypass
Summary
| CVE | CVE-2026-45804 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-07-15 17:16:48 UTC |
| Updated | 2026-07-15 20:52:04 UTC |
| Description | Diffusers is the a library for pretrained diffusion models. Prior to 0.38.0, Diffusers' DiffusionPipeline.from_pretrained flow can bypass the trust_remote_code guard because download() validates model_index.json and custom pipeline code before later loading from a cached folder that can change, allowing a Hub repository with custom .py pipeline code to execute through the custom pipeline flow without passing custom_pipeline or trust_remote_code=True. This issue is fixed in version 0.38.0. |
Risk And Classification
Primary CVSS: v3.1 7.5 HIGH from [email protected]
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS: 0.002680000 probability, percentile 0.185270000 (date 2026-07-16)
Problem Types: CWE-367 | CWE-367 CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| 3.1 | CNA | DECLARED | 7.5 | HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
HighPrivileges Required
NoneUser Interaction
RequiredScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Huggingface | Diffusers | affected < 0.38.0 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/huggingface/diffusers/releases/tag/v0.38.0 | [email protected] | github.com | |
| github.com/huggingface/diffusers/pull/13448 | [email protected] | github.com | |
| github.com/huggingface/diffusers/security/advisories/GHSA-7wx4-6vff-v64p | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | github.com | |
| github.com/huggingface/diffusers/issues/13446 | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | github.com | |
| github.com/huggingface/diffusers/commit/a37f6f8394ac2a7ee8360c3abea811ef... | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.