# CVE-2026-45804: Diffusers: TOCTOU Trust Remote Code Bypass

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.38%, higher than 33% of CVEs (2026-12-02)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-05-20T15:31:33.000Z
- Modified: 2026-10-24T21:10:00.130Z
- Also known as: GHSA-7wx4-6vff-v64p, PYSEC-2026-2446
- Weaknesses: CWE-367
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- huggingface diffusers: < 0.38.0; before 0.38.0
- diffusers (PyPI): before 0.38.0

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.5 High `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> (exploit, vendor-advisory, web)
- <https://github.com/huggingface/diffusers/issues/13446> (exploit, issue-tracking, web)
- <https://github.com/huggingface/diffusers/pull/13448> (issue-tracking, web)
- <https://github.com/huggingface/diffusers/commit/a37f6f8394ac2a7ee8360c3abea811efe54512b1> (patch, web)
- <https://github.com/huggingface/diffusers/releases/tag/v0.38.0> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-45804> (advisory)
- <https://github.com/huggingface/diffusers> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/diffusers/PYSEC-2026-2446.yaml> (web)
- <https://pypi.org/project/diffusers> (package)
- <https://github.com/advisories/GHSA-7wx4-6vff-v64p> (advisory)

## Sources

- CVE List: [CVE-2026-45804](https://www.cve.org/CVERecord?id=CVE-2026-45804), CVE Terms of Use, modified 2026-07-15
- GitHub Advisory Database: [GHSA-7wx4-6vff-v64p](https://github.com/advisories/GHSA-7wx4-6vff-v64p), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-45804](https://nvd.nist.gov/vuln/detail/CVE-2026-45804), Public domain, modified 2026-10-24
- PyPA Advisory Database: [PYSEC-2026-2446](https://osv.dev/vulnerability/PYSEC-2026-2446), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-45804 · Whole record: https://cve.day/CVE-2026-45804.json · Rebuilt by cve.day 2026-11-25T22:59:28.310Z
