RCE in Hugging Face Diffusers custom pipeline loading
CVE-2026-44827 is a remote code execution vulnerability in Hugging Face Diffusers prior to version 0.38.0. The flaw is in the custom pipeline resolution logic used during DiffusionPipeline.from_pretrained(). In the vulnerable flow, the _resolve_custom_pipeline_and_cls function in pipeline_loading_utils.py interpolates the custom_pipeline parameter into a Python filename using a pattern equivalent to appending .py. When the caller does not supply custom_pipeline, the default None value is converted into the literal filename None.py. This creates an inconsistency with the trust_remote_code safeguard: the security check in the download path treats an omitted custom_pipeline as absent and therefore does not require explicit trust, while the downstream module-loading path resolves the same value into a concrete Python module name and loads it if present in the repository. A malicious Hugging Face Hub repository can therefore include a Python module with that derived name and a pipeline class that appears legitimate, causing attacker-controlled code to be downloaded and executed during a normal pipeline load even when trust_remote_code is false or omitted.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows silent arbitrary code execution in the context of the process loading the model. Because the vulnerable call path is commonly used in development, CI/CD, research, and production inference environments, exploitation can expose local data, credentials, tokens, and connected infrastructure accessible to that runtime. The load may still appear to succeed and return a functional pipeline, reducing the likelihood of immediate detection.
If you can’t patch tonight, do this now.
Until patching is complete, treat model repositories and local snapshots as untrusted executable content rather than passive data. Only load pipelines from fully trusted and audited sources. Avoid loading repositories that may contain custom pipeline code unless it has been reviewed. Inspect local snapshots and repository contents for unexpected Python modules at the repository root or component subdirectories. Restrict model-loading activity in sensitive environments through sandboxing, least privilege, network egress controls, and credential minimization to reduce blast radius if malicious code executes.
Patch, then assume compromise.
Upgrade Hugging Face Diffusers to version 0.38.0 or later. The fix relocates trust enforcement to the dynamic module-loading chokepoint so untrusted custom pipeline code cannot be loaded through this bypass path. Ensure all environments using Diffusers, including notebooks, build systems, containers, and production services, are updated to a fixed release.
No public exploits tracked yet. Mallory keeps watching.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.