Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-45804: CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition in huggingface diffusers

0
High
VulnerabilityCVE-2026-45804cvecve-2026-45804cwe-367
Published: 07/15/2026 (07/15/2026, 16:05:35 UTC)
Source: CVE Database V5
Vendor/Project: huggingface
Product: diffusers

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.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected software

diffusers
pkg:pypi/diffusers
Affected versions
<0.38.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/15/2026, 16:48:13 UTC

Technical Analysis

The vulnerability in huggingface diffusers (CVE-2026-45804) is a time-of-check to time-of-use (TOCTOU) race condition in the DiffusionPipeline.from_pretrained flow. The download() function validates model_index.json and custom pipeline code before loading from a cached folder that can be changed, enabling a malicious Hub repository with custom .py pipeline code to execute without requiring the custom_pipeline or trust_remote_code=True flags. This allows unauthorized code execution through the custom pipeline flow. The issue is resolved in version 0.38.0.

Potential Impact

An attacker controlling a Hub repository can execute arbitrary Python code through the custom pipeline mechanism without explicit user consent (i.e., without setting trust_remote_code=True). This leads to high confidentiality, integrity, and availability impacts as indicated by the CVSS score of 7.5.

Mitigation Recommendations

Upgrade huggingface diffusers to version 0.38.0 or later, where this vulnerability is fixed. No other official remediation or temporary fixes are indicated. Users should avoid using affected versions prior to 0.38.0 to prevent exploitation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-05-13T08:19:32.604Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a57b64168715ace430b3837

Added to database: 07/15/2026, 16:33:05 UTC

Last enriched: 07/15/2026, 16:48:13 UTC

Last updated: 07/16/2026, 03:34:04 UTC

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses