Several open-source machine learning (ML) tools contain vulnerabilities that can lead to client-side malicious code execution or path traversal even when loading “safe” model formats, JFrog researchers revealed Wednesday.The four flaws are among 22 total vulnerabilities the JFrog Security Research team have discovered among 15 different ML projects over the past few months. In a blog post, the team provided new details about vulnerabilities affecting MLflow, H2O, PyTorch and MLeap.Attacks on ML clients can lead to lateral movement to other ML services, as JFrog researchers described in previous research presented at Black Hat USA 2024. Once an ML client is compromised, an attacker can leverage the client’s access to other services such as model registries and ML operations (MLOps) pipelines to conduct further malicious activity such as stealing or backdooring ML models.The first client-side ML risk described in JFrog’s blog post is a vulnerability tracked as CVE-2024-27132 in the open-source platform MLflow, which is designed to help developers manage the full lifecycle of their machine learning projects. The flaw is a cross-site scripting (XSS) vulnerability that can be exploited by crafting a malicious MLflow “Recipe.”MLflow Recipes are structure frameworks for automating ML workflows and use MLflow-specific YAML files for configuration. The researchers found that when a Recipe fails to run successfully, an error message is rendered in HTML, which includes the variable “failure_traceback” that references the exception.To exploit CVE-2024-27132, an attacker could purposely cause an error by replacing part of the “recipe.yaml” file with an invalid input that also includes a malicious script. This malicious script becomes part of the exception message that is rendered in HTML due to improper sanitization, leading to XSS.This exploit can also be used for arbitrary code execution when MLflow is used inside JupyterLab, as JupyterLab supports rendering HTML as part of each Cell’s output, the researchers explained. As any arbitrary JavaScript code run via this method is not sandboxed from the Juypter web application, and the web application is capable of running arbitrary Python code, an attacker can craft a MLflow Recipe payload that creates a new “Code” cell in JupyterLab and then executes the attacker’s malicious Python code.The researchers also discovered a client-side code execution vulnerability in the open-source, distributed in-memory ML platform H2O, which stems from the use of ObjectInputStream to deserialize objects from a byte array.The JFrog team found that the hyperparameter map of models imported to H2O were deserialized by ObjectInputStream and that including malicious code in the hyperparameter map would cause the code to be executed upon deserialization. This flaw is tracked as CVE-2024-6960.
AI/ML, Vulnerability Management, AI benefits/risks
ML clients, ‘safe’ model formats exploitable through open-source AI vulnerabilities

Adobe Stock
An In-Depth Guide to AI
Get essential knowledge and practical strategies to use AI to better your security program.
Get daily email updates
SC Media's daily must-read of the most current and pressing daily news
You can skip this ad in 5 seconds



