From MLOps to MLOops - Exposing the Attack Surface of Machine Learning Platforms
Unknown
Black Hat USA 2024 · Day 1 · Briefing
Overview
In this compelling Black Hat USA presentation, "From MLOps to MLOops - Exposing the Attack Surface of Machine Learning Platforms," Shahar Menashe, leading JFrog's security research teams, alongside his colleagues Ori Hollander, Natan Nehorai, and Uriya Yavnielli, shed critical light on the emerging security risks within modern machine learning operations (MLOps). The talk posits a stark and crucial argument: MLOps platforms, the backbone of AI development and deployment within organizations, are rapidly becoming a new class of high-value targets for adversaries.

Key moments
- 0:00 MLOps platforms: A new high-value attack target
- 2:00 Understanding the ML software supply chain components
- 3:25 Automating ML with machine learning pipelines
- 4:30 The role of a model registry for version control
- 5:20 How model serving makes models accessible via API
- 6:05 Seldon Core: An example of an inference server
From MLOps to MLOops - Exposing the Attack Surface of Machine Learning Platforms
Speakers: Shahar Menashe (Lead, Security Research Teams, JFrog), Ori Hollander, Natan Nehorai, Uriya Yavnielli (Zero-Day Team, JFrog)
Conference: Black Hat USA
YouTube: https://www.youtube.com/watch?v=1dsRAEdbpq4
Overview
In this compelling Black Hat USA presentation, "From MLOps to MLOops - Exposing the Attack Surface of Machine Learning Platforms," Shahar Menashe, leading JFrog's security research teams, alongside his colleagues Ori Hollander, Natan Nehorai, and Uriya Yavnielli, shed critical light on the emerging security risks within modern machine learning operations (MLOps). The talk posits a stark and crucial argument: MLOps platforms, the backbone of AI development and deployment within organizations, are rapidly becoming a new class of high-value targets for adversaries.
Menashe emphasizes that much like domain controllers or IT orchestration frameworks, a successful compromise of an MLOps platform can lead to "massive spread" and catastrophic impact across an entire organization. He provocatively likens the potential scale of such an attack to "SolarWinds before AI," highlighting the systemic risk inherent in these interconnected and often unexamined systems. The research presented aims to dissect the MLOps ecosystem, revealing how its distinct features – from data pipelines to model registries and serving infrastructure – can be individually attacked, culminating in the demonstration of a real-world zero-day exploit.
Background
▶ Watch: MLOps platforms: A new high-value attack target (0:00)
The landscape of enterprise IT security has long focused on protecting established high-value targets such as domain controllers, which, if compromised, grant attackers unfettered access to an organization's network. Similarly, IT orchestration frameworks, controlling the deployment and management of software across numerous machines, represent another critical attack vector. However, with the rapid proliferation of artificial intelligence and machine learning across industries, a new category of critical infrastructure has emerged: MLOps platforms. These platforms are designed to streamline and automate the entire ML software supply chain, from data ingestion and model training to version control and production deployment.
The typical ML software supply chain involves several key stages, each of which MLOps platforms aim to automate and manage:
- Algorithm Selection: Choosing appropriate machine learning algorithms, such as decision trees or Support Vector Machines (SVMs).
- Data Training: Feeding vast datasets to these algorithms to train a model, a process that results in a pre-trained model capable of answering specific queries, much like advanced conversational AI systems.
- Model Version Control: Once a model is trained, it needs to be managed. This is handled by a model registry, which serves as the source control or version control system for machine learning models. Data scientists iterate on models, pushing new versions, while ML engineers retrieve specific versions for deployment. A popular open-source example cited is MLflow, which visually organizes models, versions, and aliases.
- Model Serving/Model as a Service (MaaS): The final stage involves deploying the model for end-user consumption. This can be done by embedding the model directly into an application or, more commonly, through model serving. MLOps platforms provide this capability by wrapping the model binary in a standardized API (e.g., HTTP), eliminating the need for custom web application development. This allows clients to query the model via an API, akin to how users interact with services like ChatGPT. Seldon Core is highlighted as an example, which typically serves models by wrapping them in Docker containers, deploying them via Kubernetes, and exposing them through a standard API layer, supporting various model types under a unified interface.
- ML Pipelines: To automate this entire lifecycle, MLOps platforms offer the ability to construct and run ML pipelines. These are typically sequences of Python code that monitor for changes in datasets, automatically trigger model training, evaluation, and deployment. This automation is analogous to DevOps pipelines, where a code commit triggers a build, testing, and deployment. For instance, in frameworks like Kubeflow, pipeline definitions can specify inputs from cloud storage (e.g., Google Cloud training and evaluation data), orchestrating the subsequent steps when data changes.
The problem, as articulated by the speaker, is that while these platforms offer immense efficiency and scalability for ML development, their inherent automation, centralized control, and deep integration into organizational data and infrastructure present a significant, often overlooked, attack surface. The complexity of these systems, coupled with their critical role in an organization's intellectual property and operational decision-making, makes them an irresistible target for sophisticated adversaries seeking to gain control or exfiltrate sensitive information.
Key Findings
▶ Watch: Automating ML with machine learning pipelines (3:25)
The core finding presented by Shahar Menashe and his team is that MLOps platforms have emerged as a new class of high-value target for attackers, comparable in strategic importance to traditional targets like domain controllers or critical IT orchestration frameworks. The research unequivocally demonstrates that compromising these platforms can lead to "massive spread" throughout an organization, potentially impacting a wide array of systems and data.
Specifically, the JFrog research identified that the intricate architecture of MLOps platforms, designed for automation and scalability, simultaneously introduces multiple distinct and exploitable attack surfaces. The team's work involved a systematic breakdown of MLOps functionality, revealing that each core feature—ML pipelines, model registries, and model serving infrastructure—can be individually attacked. This granular approach unveiled specific vulnerabilities, including zero-day exploits, within these widely adopted platforms. The implication is profound: an attacker doesn't necessarily need to compromise the entire platform at once; exploiting a single vulnerable component can cascade into broader system compromise, data manipulation, or even arbitrary code execution across the organization's ML infrastructure. The talk aims to illustrate this by detailing the specific attack vectors associated with each MLOps component and demonstrating a practical exploit.
Technical Deep Dive
▶ Watch: The role of a model registry for version control (4:30)
The technical deep dive of the talk focuses on dissecting the MLOps ecosystem into its core components and systematically exposing how each feature can be leveraged as an attack vector. The inherent complexity and interconnectedness of MLOps, while beneficial for automation, create a rich environment for sophisticated supply chain attacks.
ML Pipelines
ML Pipelines are the automation backbone of MLOps, orchestrating the entire lifecycle from data ingestion to model deployment. These pipelines, often defined using Python code within frameworks like Kubeflow, monitor for data changes, trigger model training, evaluation, and subsequent deployment.
- Attack Surface: The primary vulnerability lies in the pipeline definitions themselves and the environments in which they execute. If an attacker can inject malicious code into the pipeline definition or manipulate the input data sources that trigger pipeline execution, they can achieve significant control.
- Code Injection: Malicious code injected into a pipeline step could execute arbitrary commands within the pipeline's execution environment, which often has elevated privileges to access data, compute resources, and deployment targets. This could lead to remote code execution (RCE) on the underlying infrastructure (e.g., Kubernetes pods).
- Data Poisoning/Manipulation: If the pipeline monitors and automatically processes data, an attacker could introduce poisoned data into the training datasets. This could lead to a backdoored model being trained and deployed, producing biased or manipulated outputs, or even allowing the model to act as an exfiltration channel.
- Dependency Confusion/Supply Chain Attacks: Pipelines often pull dependencies from various sources. If an attacker can exploit dependency confusion vulnerabilities or compromise upstream package repositories, they can inject malicious libraries that the pipeline will incorporate and execute.
- Misconfiguration: Insecure configurations of Kubeflow or similar pipeline orchestration tools (e.g., overly permissive roles, exposed dashboards) can provide attackers with an entry point to modify or trigger malicious pipelines.
Model Registry
The Model Registry (e.g., MLflow) acts as the central repository for machine learning models, providing version control, metadata management, and facilitating collaboration among data scientists and engineers. It's the "source control for models."
- Attack Surface: The registry's role as the single source of truth for models makes it a critical target.
- Malicious Model Uploads: An attacker with write access to the registry could upload a deliberately backdoored or malicious model version. This model could contain embedded code designed to execute when loaded by a serving infrastructure, or it could be engineered to exfiltrate data during inference.
- Model Tampering: If an attacker gains access, they could modify existing legitimate models, altering their behavior to introduce biases, degrade performance, or inject vulnerabilities without detection if integrity checks are absent.
- Metadata Manipulation: Altering model metadata could deceive engineers into deploying a compromised version or misrepresenting a model's capabilities or security posture.
- Access Control Bypass: Weak authentication or authorization mechanisms for the model registry could allow unauthorized users to push, pull, or delete critical model assets, disrupting operations or facilitating malicious deployments.
Model Serving / Model as a Service (MaaS)
Model Serving platforms (e.g., Seldon Core) are responsible for deploying trained models to production, typically by wrapping them in APIs (e.g., HTTP) to allow clients to query them. These systems often leverage containerization (Docker) and orchestration (Kubernetes) for scalability and reliability.
- Attack Surface: The serving layer is the public-facing component of the ML system, making it a direct target for external attacks.
- Inference-time Code Execution: If a malicious model binary (potentially sourced from a compromised registry) is deployed, querying this model could trigger arbitrary code execution within the serving container. This could lead to container escapes, allowing the attacker to compromise the underlying Kubernetes node or other services within the cluster.
- API Vulnerabilities: The standardized API layer, while convenient, can be susceptible to common web vulnerabilities such as injection attacks (e.g., SQL injection if the API interacts with a database, or command injection if model inputs are not properly sanitized before being passed to underlying system calls).
- Denial of Service (DoS): Maliciously crafted queries or excessive requests could overwhelm the inference server, leading to a denial of service for legitimate users.
- Misconfigured Deployments: Insecure Kubernetes configurations, such as overly permissive network policies, exposed dashboards, or containers running with root privileges, can be exploited to gain deeper access to the cluster.
- Data Exfiltration: A compromised model or serving component could be used to exfiltrate sensitive data that passes through the inference process or is accessible from the serving environment. For example, a model might be trained to encode sensitive information into its output, or directly access and send data to an attacker-controlled endpoint.
The speaker highlights that Seldon Core, by wrapping models in Docker containers and deploying them via Kubernetes, introduces the entire attack surface of containerized environments and orchestration platforms, in addition to the ML-specific risks. The "standard API layer" aims for uniformity but doesn't inherently mitigate underlying security flaws in the model or its deployment.
Demo / Proof of Concept
▶ Watch: How model serving makes models accessible via API (5:20)
The talk promised a compelling demonstration of the research's findings. As stated by Shahar Menashe, "We're going to have a fun demo where we exploit one of the zero days that we found as part of this research." While the provided transcript segment concludes before the detailed description of the demonstration, the clear intention was to showcase a practical, real-world exploit.
Such a demonstration would typically involve a step-by-step walkthrough: first, identifying a vulnerability within one of the MLOps components (e.g., an ML pipeline, model registry, or model serving platform). Then, crafting a malicious payload—which could be a poisoned dataset, a backdoored model, or a specially crafted input query—to trigger the vulnerability. The ultimate goal of such an exploit, consistent with the talk's premise, would be to achieve unauthorized access, remote code execution, or data manipulation within the MLOps environment. For instance, a demo might illustrate how a malicious model uploaded to a registry could lead to a container escape on a Seldon Core inference server when that model is queried, thereby compromising the underlying Kubernetes cluster. The impact of such a demo would underscore the critical need for robust security measures across the entire MLOps lifecycle.
Defensive Implications
▶ Watch: Seldon Core: An example of an inference server (6:05)
The detailed exposure of MLOps attack surfaces necessitates a comprehensive defensive strategy that integrates security throughout the entire machine learning software supply chain. Defenders must recognize MLOps platforms as critical infrastructure and apply security rigor commensurate with their high-value status.
- Secure ML Pipelines:
- Input Validation and Sanitization: Rigorously validate and sanitize all inputs to ML pipelines, especially data and configuration parameters, to prevent injection attacks.
- Code Review and Scanning: Implement strict code review processes for pipeline definitions (e.g., Kubeflow pipeline code) and use static application security testing (SAST) tools to identify vulnerabilities before deployment.
- Least Privilege: Configure pipeline execution environments with the principle of least privilege, ensuring that pipeline steps only have the necessary permissions to perform their designated tasks.
- Secure Dependencies: Vet all external libraries and dependencies used in pipelines, scanning them for known vulnerabilities and ensuring they are sourced from trusted repositories.
- Isolation: Run pipeline steps in isolated, ephemeral environments (e.g., dedicated containers or virtual machines) to limit the blast radius of a compromise.
- Secure Model Registries:
- Strong Access Control: Implement robust authentication and authorization mechanisms for model registries (e.g., MLflow), ensuring that only authorized individuals and automated processes can push, pull, or modify models.
- Integrity Verification: Employ cryptographic signing for models and their metadata to ensure their integrity and authenticity. Verify signatures before deploying any model to production.
- Model Scanning: Integrate security scanning tools that can analyze model binaries for embedded malicious code, suspicious libraries, or unusual characteristics that might indicate tampering.
- Auditing and Logging: Maintain comprehensive audit trails of all activities within the model registry, including model uploads, downloads, and version changes, to detect suspicious behavior.
- Secure Model Serving:
- Hardened Container Images: Use minimal, hardened Docker images for model serving (e.g., Seldon Core deployments), removing unnecessary tools and libraries to reduce the attack surface.
- Kubernetes Security Best Practices: Adhere to Kubernetes security best practices, including network segmentation, pod security policies, resource limits, and regular vulnerability scanning of the cluster.
- API Security: Apply standard API security best practices, such as input validation, rate limiting, authentication, and authorization for all model inference endpoints.
- Runtime Monitoring: Implement runtime monitoring for inference servers to detect anomalous behavior, resource spikes, or attempts at code execution within the serving environment.
- Network Segmentation: Isolate model serving infrastructure from other critical organizational networks to contain potential breaches.
- Regular Patching: Keep all MLOps platform components, underlying operating systems, container runtimes, and orchestration layers (Kubernetes) up to date with the latest security patches.
- Holistic Security Approach:
- Threat Modeling: Conduct thorough threat modeling exercises specifically for MLOps deployments to identify potential attack paths and vulnerabilities unique to the ML workflow.
- Security by Design: Integrate security considerations from the initial design phase of ML systems, rather than treating it as an afterthought.
- Employee Training: Educate data scientists, ML engineers, and MLOps practitioners on security best practices and the specific threats targeting ML systems.
By adopting these defensive measures, organizations can significantly mitigate the risks associated with the burgeoning MLOps attack surface and prevent their machine learning initiatives from turning into "MLOops."
Key Takeaways
- MLOps Platforms are High-Value Targets: MLOps systems are as critical and attractive to attackers as domain controllers or IT orchestration frameworks, offering pathways for massive organizational compromise.
- Massive Spread Potential: A successful attack on an MLOps platform can lead to widespread impact across an organization, akin to a "SolarWinds before AI" scenario.
- Multi-faceted Attack Surface: The MLOps ecosystem presents distinct attack surfaces across its core components: ML pipelines, model registries, and model serving infrastructure.
- Zero-Days Exist: Research confirms the presence of zero-day vulnerabilities in widely used MLOps platforms, underscoring the immediate need for security vigilance.
- Integrate Security Throughout the ML Supply Chain: Security must be a continuous process, embedded from data ingestion and pipeline definition through model training, versioning, and production deployment.
- Apply Traditional Security Principles to MLOps: Defenders must extend established security practices—like strong access control, input validation, code review, and runtime monitoring—to the unique context of machine learning operations.
About the Speaker(s)
The research presented was a collaborative effort by JFrog's security research teams. Shahar Menashe spearheaded the presentation and leads JFrog's security research teams, bringing a deep technical background to the field. Classically a binary reverse engineer, Menashe's expertise now extends to assigning CVEs and CVSS scores, a testament to his comprehensive understanding of vulnerability analysis. His team at JFrog specializes in zero-day analysis, CVE analysis, and malware analysis, making them uniquely positioned to uncover and explain the novel threats in MLOps. The research itself was a joint effort with Ori Hollander, Natan Nehorai, and Uriya Yavnielli, all integral members of JFrog's zero-day team, contributing their specialized skills to expose these critical vulnerabilities.