A critical security flaw has been discovered in Meta’s Llama large language model (LLM) framework, tracked as CVE-2024-50050, which could potentially allow an attacker to execute arbitrary code. The vulnerability, with a CVSS score of 6.3, resides in the deserialization of untrusted data within the Llama Stack component. Specifically, the flaw is located in the Python Inference API implementation, which uses the pickle serialization format, an unsafe method that could allow remote code execution (RCE) if exploited. The flaw was found to be particularly dangerous when the ZeroMQ socket is exposed, allowing attackers to send crafted malicious data that, when deserialized, could lead to arbitrary code execution on the host machine.
The vulnerability was disclosed to Meta on September 24, 2024, and was addressed with a patch on October 10, 2024. Meta’s fix involved changing the serialization format from pickle to JSON, eliminating the risk associated with untrusted data deserialization. While the flaw affected Meta’s Llama model, which is widely used for artificial intelligence applications, it also highlights the ongoing risk of deserialization vulnerabilities across different AI frameworks.
These flaws can be used to inject malicious code into vulnerable systems, potentially compromising the integrity of AI-driven services.
The Llama vulnerability is part of a growing trend of deserialization flaws in AI frameworks, including similar issues discovered in TensorFlow’s Keras framework in August 2024. These vulnerabilities, commonly referred to as “deserialization flaws,” allow attackers to exploit weak points in how data is handled and processed by the systems. As the AI landscape grows, these kinds of vulnerabilities are becoming increasingly common, especially as frameworks like Meta’s Llama and TensorFlow are integrated into critical applications and services.
In addition to the vulnerability in Llama, other high-severity flaws have been disclosed in AI-powered systems. For instance, a flaw in OpenAI’s ChatGPT crawler has been found to facilitate distributed denial-of-service (DDoS) attacks against websites by exploiting improperly handled HTTP requests. Researchers have also warned that AI models, while improving the speed and effectiveness of cyberattacks, can also be integrated into the attack lifecycle in increasingly sophisticated ways. With AI models evolving rapidly, security researchers emphasize the importance of staying ahead of potential threats to mitigate future risks to AI infrastructures.