Hugging Face Diffusers Fixes Three Remote-Code Bypasses
Zafran Labs disclosed three high-severity Hugging Face Diffusers flaws on July 27 that could let a malicious model repository execute Python code despite the library's trust_remote_code safeguard. Hugging Face's advisories say all three issues are fixed in Diffusers 0.38.0, released May 1, and rate them from 7.5 to 8.8 on the CVSS scale.
Zafran Labs disclosed three high-severity vulnerabilities in Hugging Face's Diffusers library on July 27, grouping them under the name FaceHugger. The issues affect model-loading paths in DiffusionPipeline.from_pretrained and could allow a crafted model repository to execute Python code even when a user did not enable remote custom code. Hugging Face's repository advisories identify the issues as CVE-2026-44827, CVE-2026-45804, and CVE-2026-44513.
What the advisories show
CVE-2026-44827, scored 8.8, used a filename-resolution quirk: when no custom pipeline was supplied, a downstream path could resolve the missing value to None.py and load that file from a malicious repository. CVE-2026-45804, scored 7.5, was a time-of-check/time-of-use race between separate requests that inspected repository configuration and downloaded the final snapshot. A repository update between those requests could make the checked content differ from the code ultimately loaded.
CVE-2026-44513, also scored 8.8, covered three related paths in which the trust check was placed in the download step rather than at the point where dynamic Python modules were imported. Those paths included cross-repository custom pipelines and local snapshots containing or referencing custom components.
The advisories describe successful exploitation as silent arbitrary code execution in the process loading the model. They require a user or automated system to load an attacker-controlled repository or component; the disclosures do not establish that the flaws were exploited in the wild.
The fix and the operational lesson
Hugging Face published Diffusers 0.38.0 on May 1. The advisories say the fix moves the trust_remote_code enforcement to the dynamic-module loading chokepoint so it applies wherever custom Python code is actually imported. Zafran's later July 27 report brought the three related issues together and framed them as an AI supply-chain risk.
Teams that load community models should upgrade to Diffusers 0.38.0 or later and audit any code paths that accept repository identifiers, custom_pipeline values, or local model snapshots from outside a trusted release process. Hugging Face's workarounds include reviewing unexpected Python files and avoiding unaudited cross-repository custom pipelines, but its advisory says those steps are mitigations rather than a complete fix. Pinning a repository revision can close the specific race window in CVE-2026-45804, yet it does not replace the patched loader for the other bypasses.
For ML platform owners, the broader control is to treat model repositories as software dependencies: restrict who can select them, record immutable revisions, scan downloaded snapshots, isolate model-loading jobs, and avoid exposing long-lived credentials to processes that import third-party model code.
Key Points
- 1Three Hugging Face Diffusers trust_remote_code bypasses are tracked as CVE-2026-44827, CVE-2026-45804, and CVE-2026-44513, with CVSS scores from 7.5 to 8.8.
- 2Hugging Face says Diffusers 0.38.0 fixes all three issues by enforcing the trust check at the dynamic-module loading point.
- 3Model-loading systems should upgrade, constrain repository selection, pin immutable revisions, inspect snapshots, and isolate processes that import third-party code.
Scoring Rationale
The flaws enabled high-impact code execution in a widely used model-loading library and could affect automated ML pipelines, but they require loading attacker-controlled content, the advisories do not report in-the-wild exploitation, and a patched release has been available since May 1.
Sources
Primary source and supporting public references used for this report.
Practice interview problems based on real data
1,625 SQL & Python problems across 15 industry datasets — the exact type of data you work with.
Try 250 free problems


