LLMOps Security
Comprehensive overview of security across the LLMOps lifecycle: from data preparation and experiment tracking through model deployment and production monitoring. Attack surfaces, threat models, and defensive strategies for ML operations.
LLMOps Security
Large Language Model Operations -- LLMOps -- encompasses the tools, processes, and infrastructure that move a model from an initial experiment to a production system serving millions of users. Every stage in this lifecycle introduces attack surfaces that do not exist in traditional software development. Unlike conventional DevOps pipelines where the artifact is deterministic code, LLMOps pipelines produce opaque statistical artifacts whose behavior cannot be fully predicted from inspection alone.
The LLMOps Lifecycle
The LLMOps lifecycle extends the traditional MLOps loop with stages specific to large language models. Each stage has distinct actors, artifacts, and trust boundaries.
Stage 1: Data Preparation
Data preparation for LLMs involves collecting, cleaning, and curating training corpora at web scale. This stage is uniquely vulnerable because the sheer volume of data makes manual review impossible, and automated filtering can be gamed.
Key assets at risk:
- Training datasets (proprietary corpora, licensed content, curated instruction sets)
- Data preprocessing scripts and filtering logic
- Data provenance records and lineage metadata
- PII and sensitive content that should have been filtered
Attack surfaces:
- Data source compromise (DNS hijacking of crawl targets, man-in-the-middle on data downloads)
- Poisoning through contributed datasets on public platforms
- Manipulation of deduplication and filtering pipelines to preserve malicious content
- Injection of backdoor triggers in instruction-tuning datasets
Stage 2: Experiment Tracking
During model development, teams run thousands of experiments, logging hyperparameters, metrics, model checkpoints, and artifacts to tracking platforms like Weights & Biases or MLflow. These platforms become repositories of sensitive intellectual property and operational metadata.
Key assets at risk:
- Hyperparameter configurations revealing architecture decisions
- Training metrics exposing dataset properties
- Model checkpoints at various stages of training
- API keys and credentials stored in experiment configurations
Attack surfaces:
- Experiment tracking server compromise leading to artifact poisoning
- Metadata leakage revealing proprietary training approaches
- API key exposure in logged configurations
- Cross-team boundary violations in shared tracking instances
Stage 3: Model Training and Fine-tuning
The training process itself consumes enormous compute resources and produces model weights that encode everything the model has learned. Compromising this stage can insert persistent backdoors that survive through deployment.
Key assets at risk:
- GPU cluster access and compute resources
- Training scripts and loss functions
- Intermediate checkpoints and final model weights
- Fine-tuning datasets (often containing proprietary data)
Attack surfaces:
- Compute hijacking for cryptocurrency mining or unauthorized training
- Training job manipulation to inject backdoors
- Checkpoint substitution with poisoned weights
- Supply chain attacks on training dependencies
Stage 4: Model Registry and Artifact Management
Trained models are stored in registries that manage versioning, access control, and deployment metadata. A compromised registry is a direct path to serving a malicious model to production users.
Key assets at risk:
- Production model weights and configurations
- Model version history and rollback targets
- Deployment metadata and serving configurations
- Model provenance and signing information
Attack surfaces:
- Model substitution via version confusion or namespace squatting
- Registry access control bypass
- Unsigned model deployment
- Malicious model uploads exploiting trust signals
Stage 5: Deployment and Serving
Model deployment involves packaging weights with serving infrastructure, configuring inference endpoints, and managing traffic routing. This stage bridges ML-specific concerns with traditional infrastructure security.
Key assets at risk:
- Production inference endpoints
- Model serving configurations and scaling parameters
- A/B testing and canary deployment configurations
- User request and response data flowing through the system
Attack surfaces:
- Deployment pipeline injection (substituting model at deploy time)
- Serving infrastructure misconfiguration exposing model internals
- Lack of security gates allowing unvetted models into production
- Insufficient isolation between model versions
Stage 6: Monitoring and Observability
Production monitoring tracks model performance, data drift, fairness metrics, and security indicators. When monitoring is compromised or evaded, attackers operate without detection.
Key assets at risk:
- Performance and drift metrics
- Security alerts and anomaly detection systems
- User interaction logs
- Model behavior baselines
Attack surfaces:
- Monitoring evasion through gradual drift below detection thresholds
- Alert fatigue exploitation through false positive flooding
- Metric manipulation to mask degraded model behavior
- Blind spots in monitoring coverage
How LLMOps Differs from Traditional DevOps Security
Traditional DevOps security has matured over two decades with well-understood threat models, established tooling, and industry standards. LLMOps introduces fundamental differences that break many assumptions.
Artifact Opacity
In DevOps, you can read every line of code being deployed. A model weight file is a matrix of floating-point numbers -- you cannot inspect it to determine what the model will do. This opacity means that traditional code review, static analysis, and vulnerability scanning are insufficient. A model with a planted backdoor is indistinguishable from a clean model through file inspection alone.
Non-deterministic Behavior
Traditional software produces the same output for the same input. LLMs can produce different outputs for identical inputs depending on sampling parameters, and small changes to inputs can produce radically different outputs. This makes behavioral testing fundamentally harder and means that security testing must be statistical rather than binary.
Data as Attack Vector
In traditional DevOps, data is processed by code. In LLMOps, data shapes the behavior of the artifact itself. Poisoning a training dataset does not just corrupt one query result -- it alters the model's learned representations, potentially affecting every future interaction. The attack surface includes not just the code pipeline but the entire data supply chain.
Scale of Trust Dependencies
LLMOps pipelines depend on pretrained models, community datasets, open-source training frameworks, and cloud ML services -- all consumed with implicit trust. A typical LLM deployment might trust Hugging Face for base weights, a public dataset for fine-tuning data, PyTorch for the training framework, and a cloud provider's ML platform for serving. Each is a potential supply chain entry point.
Comparison Table
| Dimension | Traditional DevOps | Classical MLOps | LLMOps |
|---|---|---|---|
| Primary artifact | Source code (inspectable) | Model weights (opaque) | Model weights + adapters (opaque, very large) |
| Artifact size | Megabytes | Megabytes to gigabytes | Gigabytes to terabytes |
| Behavior verification | Unit tests (deterministic) | Accuracy benchmarks | Statistical behavioral testing + red teaming |
| Supply chain | Package registries | Package registries + datasets | Package registries + datasets + pretrained models + adapters |
| Data sensitivity | Configurations, secrets | Training data | Training data + prompt history + RLHF feedback |
| Rollback complexity | Redeploy previous version | Retrain or redeploy | Extremely expensive retraining |
| Security tooling maturity | Mature (SAST, DAST, SCA) | Emerging | Nascent |
Threat Actor Profiles
Different threat actors target different stages of the LLMOps lifecycle based on their capabilities and objectives.
External Attackers
External attackers typically target the supply chain (public model registries, open-source dependencies) or production-facing infrastructure (inference APIs, monitoring systems). They may lack access to internal training infrastructure but can influence model behavior through data poisoning of public resources.
Malicious Insiders
Insiders with access to experiment tracking systems, model registries, or training infrastructure can cause significant damage. A single compromised ML engineer account can alter training data, swap model checkpoints, or modify deployment configurations. The opacity of model artifacts makes insider attacks particularly difficult to detect.
Competitors
Industrial espionage targeting LLMOps focuses on exfiltrating training data, model architectures, and hyperparameter configurations. Experiment tracking metadata is particularly valuable because it reveals the decisions that led to model performance improvements.
Nation-State Actors
State-level actors may target the entire lifecycle, from corrupting public training datasets used by many organizations to compromising cloud ML infrastructure. Their objective may be persistent access, intelligence collection, or the ability to influence model behavior in specific scenarios.
Propagation of Compromise
A key characteristic of LLMOps attacks is how compromise propagates through the lifecycle. Unlike traditional software where a vulnerability is typically scoped to a single component, an LLMOps compromise can cascade.
Data poisoning in Stage 1 produces a compromised model in Stage 3, which is stored in the registry in Stage 4, deployed to production in Stage 5, and evades monitoring in Stage 6 because the monitoring baselines were established against already-compromised behavior.
This cascading effect means that:
- Detection must happen as early as possible in the lifecycle
- Each stage needs independent integrity verification, not just trust in the previous stage
- Provenance tracking across the entire pipeline is essential for incident response
- Rollback may require retraining from scratch if the poisoning point cannot be identified
Section Overview
This section covers the major attack surfaces across the LLMOps lifecycle:
- Experiment Tracking Security -- Securing experiment metadata, tracking platforms, and the sensitive information they accumulate
- Model Registry Security -- Protecting model artifacts, signing, provenance, and registry-specific attack vectors
- ML CI/CD Security -- Securing the pipelines that build, test, and deploy ML artifacts
- Feature Store Security -- Protecting feature computation, storage, and access patterns
- AI Monitoring Security -- Defending observability systems against evasion and manipulation
References
- Google MLOps Whitepaper -- MLOps maturity model and best practices
- OWASP ML Security Top 10 -- ML-specific security risks
- NIST AI Risk Management Framework -- Federal guidance on AI risk management
- MITRE ATLAS -- Adversarial Threat Landscape for AI Systems
Why does a data poisoning attack in the data preparation stage pose a greater risk in LLMOps than a vulnerability in a single microservice in traditional DevOps?