Remote code execution via mutable Hub snapshot
Published Jul 15, 2026 · Updated Jul 15, 2026
TOCTOU race in Hugging Face Diffusers before 0.38.0 allows remote attackers to execute code via a changing Hub repository. DiffusionPipeline.from_pretrained checks model_index.json with hf_hub_download, then snapshot_download can resolve a newer commit whose custom pipeline is imported without another trust check. Exploitation requires a first or forced Hub download without a pinned commit and the victim's pipeline-loading action; successful code runs with the victim process's privileges.
Summary
What happened
TOCTOU race in Hugging Face Diffusers before 0.38.0 allows remote attackers to execute code via a changing Hub repository. DiffusionPipeline.from_pretrained checks model_index.json with hf_hub_download, then snapshot_download can resolve a newer commit whose custom pipeline is imported without another trust check. Exploitation requires a first or forced Hub download without a pinned commit and the victim's pipeline-loading action; successful code runs with the victim process's privileges.
The record
- CVE
- CVE-2026-45804
- Published
- Jul 15, 2026
- Updated
- Jul 15, 2026
- Vendor
- Hugging Face
- Product
- Diffusers
- Classifications
- CWE-367, T1203
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jul 15, 2026CVE publishedPublication date reported by the CVE source.
- Jul 15, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 0.38.0
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Vendor TOCTOU race proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo