Skip to content
MediumNews

Hugging Face Diffusers Flaws Could Let Model Repositories Execute Arbitrary Code

Published
Record updated
View JSON

Summary

Three high-severity flaws in Hugging Face's Diffusers library, dubbed FaceHugger, let crafted model repositories execute arbitrary code on machines that load them, bypassing the trust_remote_code safeguard. The flaws are CVE-2026-44827 (CVSS 8.8), CVE-2026-45804 (CVSS 7.5) and CVE-2026-44513 (CVSS 8.8), and any user calling DiffusionPipeline.from_pretrained with custom pipelines is affected. Zafran Labs traced each variant to a time-of-check to time-of-use issue, where the trust check runs only against the first of two sequential downloads.

Mitigation

Fixed in Diffusers version 0.38.0, released in early May 2026. If immediate patching is not an option, the maintainers recommend only calling from_pretrained with pretrained_model_name_or_path, custom_pipeline, and local snapshot directories from fully trusted, audited sources, and not passing custom_pipeline= pointing at untrusted code.