Skip to main content

HuggingFace Diffusers EUVDEUVD-2026-30332

| CVE-2026-44827 HIGH
Code Injection (CWE-94)
2026-05-14 GitHub_M GHSA-j7w6-vpvq-j3gm
8.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker publishes malicious Hub repository with None.py
  2. Delivery
    Victim searches Hub and discovers repository
  3. Exploit
    Victim executes DiffusionPipeline.from_pretrained()
  4. Install
    Library downloads repository snapshot including None.py
  5. C2
    Type coercion bypasses trust_remote_code check
  6. Execute
    Malicious None.py imports and executes
  7. Impact
    Attacker code runs in victim's Python process

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to call DiffusionPipeline.from_pretrained() on an attacker-controlled Hugging Face Hub repository without supplying the custom_pipeline keyword argument (allowing the default None value to trigger the type coercion vulnerability). The attacker's repository must contain a file named exactly 'None.py' with a class subclassing DiffusionPipeline, and a model_index.json configuration that references a standard pipeline class name to appear legitimate. The victim's environment must have network access to huggingface.co for repository download (or the malicious repository must already exist in local cache from prior operations). User interaction is required (UI:R from CVSS vector) - the vulnerability cannot be triggered through passive network exposure but depends on explicit developer/data scientist action to load a specific model repository. No special Diffusers configuration or non-default settings are required; default installations with standard from_pretrained() usage patterns are vulnerable. Exploitation is NOT limited by authentication requirements (PR:N) as Hugging Face Hub allows anonymous repository publication and public model hosting.

Impact

The CVSS score of 8.8 (High) reflects network-accessible remote code execution with no authentication required but requiring user interaction (UI:R) - a victim must explicitly call from_pretrained() on an attacker-controlled repository. Attack complexity is low (AC:L) as exploitation requires only publishing a malicious Hub repository with None.py and standard model_index.json configuration. The vulnerability enables complete compromise (C:H/I:H/A:H) within the Python process context running the Diffusers library. Real-world risk is elevated by the library's popularity in AI/ML workflows where users frequently load models from public repositories, creating a supply chain attack vector. The silent nature of exploitation (no visible warnings, returns functional pipeline) significantly increases danger compared to typical trust_remote_code bypasses. However, risk is partially mitigated by the UI:R requirement - exploitation depends on social engineering to convince targets to load specific repositories. No CISA KEV listing indicates exploitation has not been observed at scale in enterprise environments. EPSS data unavailable prevents quantitative exploitation probability assessment. The fix is straightforward (upgrade to 0.38.0) with GitHub commit a37f6f8394ac2a7ee8360c3abea811efe54512b1 providing explicit type checking to prevent None-to-string coercion. Organizations using Diffusers in production ML pipelines should treat this as high priority due to the silent RCE nature and supply chain implications.

Exploit ScenarioDerived

An attacker creates a malicious Hugging Face Hub repository named 'optimized-sdxl-turbo' with a legitimate-appearing model_index.json referencing StableDiffusionXLPipeline. The repository includes a None.py file containing a DiffusionPipeline subclass with __init__ code that establishes a reverse shell and exfiltrates AWS credentials from environment variables. A data scientist discovering this repository through Hub search loads it using DiffusionPipeline.from_pretrained('attacker/optimized-sdxl-turbo') without any custom_pipeline or trust_remote_code arguments. The malicious None.py executes silently during import, compromising the workstation while returning a functional pipeline object that generates images normally, masking the compromise.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 14, 2026

Remote code execution in HuggingFace Diffusers library (versions < 0.38.0) allows attackers to execute arbitrary Python code when victims load malicious pipelines from Hugging Face Hub repositories. The vulnerability bypasses the trust_remote_code=True safeguard through a type coercion flaw where None values are interpolated as 'None.py' filenames. Attackers can achieve silent code execution by publishing repositories containing a malicious None.py file alongside legitimate-looking configuration, requiring only that victims call DiffusionPipeline.from_pretrained() on the attacker's repository. EPSS data not available; no public exploit identified at time of analysis. Vendor-released patch: version 0.38.0.

RemediationAI

Upgrade HuggingFace Diffusers to version 0.38.0 or later, which includes the fix from GitHub pull request #13448 and commit a37f6f8394ac2a7ee8360c3abea811efe54512b1. For Python environments managed via pip, execute 'pip install --upgrade diffusers>=0.38.0' and verify installation with 'pip show diffusers'. Organizations unable to immediately upgrade should implement compensating controls: restrict DiffusionPipeline.from_pretrained() calls to explicitly trusted repository sources through application-layer allowlists of Hub repository IDs, deploy network egress filtering to block unauthorized connections to huggingface.co from production ML inference environments (note: this breaks legitimate model downloads and requires pre-cached models), or enforce mandatory code review of all model_index.json configurations before loading with validation that _class_name references only standard pipeline classes and no None.py files exist in repository snapshots. These workarounds significantly impact operational workflows and model update agility. Additionally, audit existing cached model directories (typically ~/.cache/huggingface/hub/) for suspicious None.py files as indicators of potential prior exploitation. Consult the official advisory at https://github.com/huggingface/diffusers/security/advisories/GHSA-j7w6-vpvq-j3gm for vendor guidance.

Affected VersionsENISA

Diffusers < 0.38.0
Diffusers < 0.38.0

Affected Packages

pypi diffusers fix: 0.38.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability exploits Python's string interpolation behavior in the _resolve_custom_pipeline_and_cls function within pipeline_loading_utils.py. When the custom_pipeline parameter is not supplied, Python's default None value undergoes string interpolation via f-string formatting (f'{custom_pipeline}.py'), producing the literal string 'None.py'. The trust_remote_code security check evaluates 'custom_pipeline is not None' as False when the parameter is absent from kwargs, but downstream module loading logic treats the interpolated 'None.py' as a valid filename target. This creates a logic bypass where the security gate checks for explicit None but the file resolution accepts implicit string 'None'. The vulnerability is a CWE-94 (Improper Control of Generation of Code) instance, specifically exploiting type coercion between NoneType and string representations in security-critical path validation. The affected component is the Diffusers library's pipeline loading mechanism from Hugging Face Hub, which uses huggingface_hub's snapshot_download functionality with allow_patterns filtering that inadvertently includes attacker-controlled filenames.

Know when Diffusers gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 8.8 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
May 14, 2026 - 18:32 EUVD
CVE Published
May 14, 2026 - 16:33 nvd
HIGH 8.8

DescriptionCVE.org

Diffusers is the a library for pretrained diffusion models. Prior to 0.38.0, diffusers 0.37.0 allows remote code execution without the trust_remote_code=True safeguard when loading pipelines from Hugging Face Hub repositories. The _resolve_custom_pipeline_and_cls function in pipeline_loading_utils.py performs string interpolation on the custom_pipeline parameter using f"{custom_pipeline}.py". When custom_pipeline is not supplied by the user, it defaults to None, which Python interpolates as the literal string "None.py". If an attacker publishes a Hub repository containing a file named None.py with a class that subclasses DiffusionPipeline, the file is automatically downloaded and executed during a standard DiffusionPipeline.from_pretrained() call with no additional keyword arguments. The trust_remote_code check in DiffusionPipeline.download() is bypassed because it evaluates custom_pipeline is not None as False (since the kwarg was never supplied), while the downstream code path that actually loads the module resolves the None value into a valid filename. An attacker can achieve silent arbitrary code execution by publishing a malicious model repository with a None.py file and a standard-looking model_index.json that references a legitimate pipeline class name, requiring only that a victim calls from_pretrained on the repository. This vulnerability is fixed in 0.38.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 4 pypi packages depend on diffusers (3 direct, 1 indirect)

Ecosystem-wide dependent count for version 0.38.0.

Executive ViewAI

Why It Matters

HuggingFace Diffusers library versions below 0.38.0 contain a remote code execution vulnerability that allows attackers to execute arbitrary Python code when users load machine learning pipelines from compromised repositories. Organizations using this library for image generation, model development, or AI inference are at risk of complete system compromise through supply chain attack vectors that bypass existing trust controls.

Business Impact: High
Compensating Controls

Vendor-released patch: version 0.38.0. Until patched, disable DiffusionPipeline.from_pretrained() calls from external or user-supplied Hugging Face Hub repositories; implement strict allowlisting of approved model sources; enforce code review for any pipeline configuration files before loading; consider air-gapping systems running Diffusers from network access to the Hub.

Threat Intelligence Overview

EPSS Score
0.1%
Top 70% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy