Vulnerability · Published Jul 15, 2026 · Assigned by GitHub_M
CVE-2026-45804Diffusers: TOCTOU Trust Remote Code Bypass
High 7.5
In plain English
A high-severity security flaw in diffusers from huggingface. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 31% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | diffusers | 0.38.0 | GHSA-7wx4-6vff-v64p |
| PyPI | diffusers | 0.38.0 | PYSEC-2026-2446 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| huggingface | diffusers | < 0.38.0 |
Weakness: CWE-367 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/huggingface/diffusers/security/advisories/GHSA-7wx4-6vff-v64p x_refsource_CONFIRM
- https://github.com/huggingface/diffusers/issues/13446 x_refsource_MISC
- https://github.com/huggingface/diffusers/pull/13448 x_refsource_MISC
- https://github.com/huggingface/diffusers/commit/a37f6f8394ac2a7ee8360c3abea811efe54512b1 x_refsource_MISC
- https://github.com/huggingface/diffusers/releases/tag/v0.38.0 x_refsource_MISC