Hugging Face Patches Diffusers Flaw Enabling Arbitrary Code Execution
Hugging Face’s Diffusers is a widely used open-source library for loading and running diffusion-based generative AI models. Its security matters because developers frequently pull model repositories created by third parties. The trust_remote_code control is designed to restrict custom code shipped with those repositories, making any bypass a potential software-supply-chain threat to individual workstations and corporate AI infrastructure.
Cybersecurity firm Zafran disclosed FaceHugger, a race-condition vulnerability that could let an attacker publish a malicious AI model repository and circumvent trust_remote_code while the model is being loaded. Successful exploitation could result in arbitrary code execution on the user’s computer. Hugging Face has fixed the vulnerability in Diffusers version 0.38.0, and users should upgrade promptly and review the provenance of downloaded models.
All Coverage
1 original reportsThe Backstory
The history behind this eventHigh-Risk RCE Flaw CVE-2026-4372 Found in Hugging Face Transformers
Hugging Face's Transformers is an open-source library widely used to download, load and deploy AI models. CVE-2026-4372 affects the way model configuration files are processed. An attacker who tricks a developer into loading a malicious config.json file could remotely execute code on the system, posing a high risk to AI model supply chains and development environments.
Security researchers disclosed in 2026 that a specially crafted config.json file could bypass existing Transformers security controls, affecting multiple previous versions. Hugging Face subsequently released Transformers 5.3.0 to patch the vulnerability. Organizations and developers using the library should upgrade to version 5.3.0 or later and avoid loading models or configuration files from unknown sources.
Malicious Hugging Face Repository Impersonates OpenAI to Spread Infostealer
OpenAI launched Privacy Filter, an open-weight model designed to detect and redact personal information in text, on April 22, 2026, and released it on Hugging Face at the same time. Attackers copied the official name and model description, highlighting how malicious actors can exploit platform rankings and download counts to manufacture trust in the open-source AI supply chain and trick developers into introducing malware when running model scripts.
HiddenLayer disclosed on May 7, 2026, that the Open-OSS/privacy-filter repository had topped Hugging Face's trending chart within 18 hours before being removed after about 244,000 downloads. Its loader.py downloaded a Rust-based infostealer on Windows that stole browser credentials and cryptocurrency wallet data. Affected users should isolate and reimage their systems, replace credentials, and transfer their crypto assets.
Subscribe to Mark Radar Weekly
Every Friday, the week's strongest signals in your inbox. Unsubscribe anytime.