Time-of-check Time-of-use (TOCTOU) Race Condition Affecting diffusers package, versions [,0.38.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Social Trends
Exploit Maturity
Proof of Concept
EPSS
0.38% (31st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Time-of-check Time-of-use (TOCTOU) Race Condition vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-DIFFUSERS-16787358
  • published21 May 2026
  • disclosed20 May 2026
  • creditgal-zafran

Introduced: 20 May 2026

CVE-2026-45804  (opens in a new tab)
CWE-367  (opens in a new tab)

How to fix?

Upgrade diffusers to version 0.38.0 or higher.

Overview

diffusers is a State-of-the-art diffusion in PyTorch and JAX.

Affected versions of this package are vulnerable to Time-of-check Time-of-use (TOCTOU) Race Condition in the from_pretrained flow. An attacker can execute arbitrary code by exploiting a race condition between two repository fetch operations, allowing them to introduce malicious files after an initial trust check but before the final import occurs.

CVSS Base Scores

version 4.0
version 3.1