GHSA-7wx4-6vff-v64p: Diffusers: TOCTOU Trust Remote Code Bypass
- Identifiers
- CVE-2026-45804GHSA-7wx4-6vff-v64p
- Published
- Record updated
- Affected
- diffusers < 0.38.0
- Fixed in
- 0.38.0
- released May 1, 2026, 19 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.4%
Summary
The `diffusers` package's `DiffusionPipeline.from_pretrained` flow contains a time-of-check/time-of-use flaw in its `trust_remote_code` guard. The guard reads `model_index.json` through `hf_hub_download` from one Hub commit, then `snapshot_download` fetches the files, and these two independent calls can resolve to different commits if the repository changes between them. Because the custom pipeline `.py` file is then imported from the newer snapshot, a custom-code load can run without `trust_remote_code=True`, allowing arbitrary code execution.
Mitigation
The source does not state a fix yet. Check the original advisory for updates.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- diffusersPyPILLM dependency since 2022-05-30 · 20 tracked dependents
Related items
- MediumCVE-2026-134825: Gradio 6.27.0 before 6.32.0 contains an authentication bypass vulnerability in gradio/history.py that allows remote…Same vendor · NVD/CVE Database
- MediumCVE-2026-124588: huggingface finetrainers code injection via Library argumentSame vendor · NVD/CVE Database
- HighCVE-2026-119120: Crawl4AI Docker API lets clients choose the HuggingFace model it loadsSame vendor · NVD/CVE Database
- HighGHSA-wf6j-7hvr-gr93: Hydra legacy target blacklist permits unsafe PyYAML loadingSame vendor · Hugging Face Security Advisories
- MediumCVE-2026-100653: vLLM unpinned Hugging Face artifact loads for FunAudioChat and Tarsier2Same vendor · NVD/CVE Database