By Interestana AI Editorial — AI-drafted, human-overseen. How we report
Hugging Face Diffusers Flaws Enable Arbitrary Code Execution

Three high-severity security vulnerabilities have been identified and disclosed within Hugging Face's Diffusers library, a popular open-source toolkit for training and sharing diffusion models used in AI image generation and other generative tasks. These flaws, detailed in a security advisory, could enable attackers to craft malicious model repositories that, when loaded by users, stealthily execute arbitrary code on the target machine. This exploitation path poses a significant risk to the artificial intelligence supply chain, as it bypasses existing security safeguards designed to prevent the execution of unreviewed code.
The primary vulnerability, identified as CVE-2024-37079, allows for arbitrary code execution by exploiting the `trust_remote_code` mechanism. This safeguard is intended to prevent the execution of untrusted code from model repositories without explicit user consent or review. However, the identified flaws circumvent this protection, meaning that simply loading a compromised model repository could lead to the execution of malicious scripts. The implications are far-reaching, as Hugging Face's platform is a central hub for AI researchers and developers to share and access pre-trained models, datasets, and code. A successful exploit could compromise individual developer machines, introduce malware into development workflows, or even lead to broader network compromises if affected systems are connected.
Another critical vulnerability, CVE-2024-37078, relates to insecure deserialization. This flaw could allow an attacker to execute arbitrary code by providing a specially crafted serialized object. Deserialization vulnerabilities are common in software that handles complex data structures, and when combined with the ability to load external code, they present a potent attack vector. The third vulnerability, CVE-2024-37077, involves path traversal, which could enable an attacker to access or modify files outside of the intended directory. This could be used to overwrite critical system files or plant malicious code in sensitive locations.
Hugging Face has acknowledged the vulnerabilities and has released updated versions of the Diffusers library to address these security concerns. Users are strongly advised to update their installations to the latest versions immediately to mitigate the risks. The company's security advisory provides detailed information on the affected versions and the steps required for remediation. The incident highlights the ongoing challenges in securing the rapidly evolving AI ecosystem, where the sharing of open-source components is crucial for innovation but also introduces potential attack surfaces. The AI supply chain, encompassing the models, libraries, and tools used in AI development, is increasingly becoming a target for cyberattacks, necessitating robust security practices and continuous vigilance from both developers and users.
Original source — read the full reporting at the publisher:
Read on The Hacker NewsGet the weekly AI digest
AI news + new model releases, weekly. Drafted by our agents, reviewed by humans.