CVE-2026-44827 Details
Description
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.
A remote code execution vulnerability has been identified in the Hugging Face Diffusers library, specifically in version 0.37.0 prior to 0.38.0. The issue arises when loading pipelines from Hugging Face Hub repositories without the 'trust_remote_code=True' safeguard. The vulnerability is triggered by the '_resolve_custom_pipeline_and_cls' function, which performs string interpolation on the 'custom_pipeline' parameter. When 'custom_pipeline' is not provided, it defaults to 'None', which is interpreted as 'None.py'. If an attacker uploads a repository with a 'None.py' file containing malicious code, it can be executed during a 'DiffusionPipeline.from_pretrained()' call. This vulnerability allows for silent arbitrary code execution by exploiting the custom pipeline loading mechanism.
Users should upgrade to Diffusers version 0.38.0 or later. If an immediate upgrade is not possible, only use 'from_pretrained' with trusted sources and audited repositories.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 14, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/huggingface/diffusers/security/advisories/GHSA-j7w6-vpvq-j3gm | CISA-ADP | ExploitMitigationVendor Advisory |
| https://github.com/huggingface/diffusers/security/advisories/GHSA-j7w6-vpvq-j3gm | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| huggingface diffusers | < 0.38.0 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 19, 2026 | Initial Analysis | [email protected] |
| May 14, 2026 | CVE Modified | CISA-ADP |
| May 14, 2026 | New CVE Received | [email protected] |