MITRE ATLAS 2026.10 · AML.T0018.002 · Critical severity
Manipulate AI Model: Embed Malware
Threat actors conceal executable malware, backdoors, or reverse-shell loaders inside AI model archive files, pickle serialization streams, or weight tensor payloads. When engineers or automated serving clusters deserialize the checkpoint, the hidden malware runs directly on host infrastructure.
Technique dossier overview
- Category
- Training and model integrity
- Severity
- Critical
- Attack surface
- Model Weights & Supply Chain · Inference API & Hosting
- Framework maturity
- Realized
- Platforms
- Predictive AI, Generative AI, Agentic AI
- Tactics
- AI Attack Adaptation, Persistence
- Catalog entry modified
How the mechanism works
- Attackers pack executable scripts, compiled binaries, or obfuscated loader instructions inside permissive model formats (pickle, PyTorch `.pt`, joblib, or zip archives) or steganographically within weight LSBs paired with a loader.
- The trojanized artifact is published under reclaimed namespaces, typosquatted model repos, or compromised internal buckets.
- Loading the model via standard ML APIs triggers execution of the embedded malware under the inference host's service identity.
Detection & telemetry signals
- Static artifact scanners (ModelScan, Fickling, ClamAV/YARA) detecting suspicious serialization opcodes, network imports, or embedded binaries inside model containers.
- Runtime EDR/eBPF sensors observing model-serving processes writing unexpected executables, invoking shells, or opening external C2 connections.
- Registry integrity checks alerting on unsigned checkpoint replacements or sudden binary size jumps.
Architectural defensive countermeasures
- Prohibit unsafe serialization formats such as pickle in production and convert vetted models exclusively to Safetensors.
- Scan every model archive in an ephemeral, network-isolated container before promoting artifacts into internal registries.
- Enforce cryptographic code signing on verified internal builds and validate signatures prior to deployment.
- Restrict inference host filesystems to read-only mounts with strict outbound network deny policies so embedded payloads cannot stage or beacon.
Framework crosswalk (OWASP LLM Top 10 & NIST AI RMF)
- OWASP LLM Top 10 (2025)
- OWASP rationale
- Embedding malware inside model archives corrupts the ML model supply chain (LLM03) and achieves host code execution via unsafe artifact parsing (LLM05).
- NIST AI RMF functions
- NIST AI RMF guidance
- Apply NIST AI RMF GOVERN 6.1 and MANAGE by eliminating unsafe deserialization formats, scanning artifacts in sandboxes, and isolating serving hosts.
Mapped defensive controls
- Restrict Library Loading AML.M0011
Eliminate unsafe deserialization (Python pickle, torch.load) and block arbitrary dynamic code/library loading when handling untrusted model weights, datasets, and plugins.
- Code Signing AML.M0013
Require cryptographic signatures and transparency-log verification on model artifacts, inference containers, agent skills, and MCP servers before deployment.
- Verify AI Artifacts AML.M0014
Verify provenance, SHA-256 digests, serialization safety, and behavioral integrity of every external dataset, model weight, LoRA adapter, and container prior to loading.
- Vulnerability Scanning AML.M0016
Continuously scan ML containers, Python/CUDA dependencies, inference servers, vector databases, and MCP plugin codebases for known CVEs and insecure patterns.
Related technique records
Documented incidents & exercises (9)
- Organization Confusion on Hugging Face AML.CS0027 · Exercise · Aug 23, 2023 · High · AI Model Hub & Supply Chain
Presented in August 2023 ("Model Confusion: Weaponizing ML models for red teams and bounty hunters"), this exercise explored how missing or unverified organization namespaces on public model hubs allow attackers to impersonate trusted companies. By registering lookalike…
- Malicious Models on Hugging Face AML.CS0031 · Incident · 2025 · High · Open-Source Model Supply Chain
Documented in MITRE ATLAS (2025) following large-scale registry scans that uncovered malicious ML models hosted on Hugging Face, attackers uploaded corrupted PyTorch and pickle checkpoints containing embedded reverse shells and C2 loaders. Although Hugging Face's scanners…
- Model Namespace Reuse Supply Chain Attack AML.CS0065 · Exercise · Sep 3, 2025 · Moderate
ATLAS case study: model namespace reuse on public registries tricked users into pulling attacker-controlled models.
- Keras Arbitrary Code Injection via Malicious Lambda Layers in Legacy Models INC-2024-3660 · Incident · Apr 16, 2024 · Critical · Cloud & AI Infrastructure
CVE-2024-3660 (published April 16, 2024, disclosed by Oligo Security and JFrog) highlighted arbitrary code execution in TensorFlow Keras (`< 2.13`) when deserializing `.h5` or Keras models containing weaponized `Lambda` layers. Because Keras Lambda layers serialize arbitrary…
- Picklescan pip.main() Global Allowlist Bypass Evading ML Malware Scanners INC-2025-1716 · Incident · Feb 26, 2025 · High · Software Development & AI Tooling
CVE-2025-1716 (published February 26, 2025) exposed a critical static-analysis evasion flaw in `picklescan` (`< 0.0.22`), the open-source scanner widely used by model hubs and CI pipelines to detect malicious Python pickle checkpoints. Because `picklescan` failed to flag…
- PyTorch torch.load(weights_only=True) Safety Bypass Remote Code Execution INC-2025-32434 · Incident · Apr 18, 2025 · Critical · Cloud & AI Infrastructure
CVE-2025-32434 (CVSS 9.3, published April 18, 2025) shattered a widely relied-upon ML security assumption by bypassing `torch.load(..., weights_only=True)` in PyTorch versions `<= 2.5.1`. Security teams had adopted `weights_only=True` to safely load external `.pt` checkpoints…
- nullifAI Broken Pickle + 7z Archive Evasion Bypassing Public Model Registry Scanners INC-OBS-013 · Incident · Feb 6, 2025 · Critical · Cloud & AI Infrastructure
On February 6, 2025, ReversingLabs disclosed nullifAI, a novel ML malware evasion technique discovered in live malicious PyTorch models uploaded to the Hugging Face Hub. Threat actors compressed PyTorch model files using 7z archives rather than standard ZIP containers and…
- JFrog Discovery of Over 100 Malicious Pickle Models Hosted on Public Model Hub INC-OBS-014 · Incident · Feb 27, 2024 · High · Cloud & AI Infrastructure
On February 27, 2024, JFrog Security Research published an investigation identifying roughly 100 malicious machine learning models hosted publicly on the Hugging Face Hub, including checkpoints engineered to open interactive reverse shells to attacker infrastructure when…
- Lexo LLM-Assisted Program Regeneration Against Supply-Chain Backdoors OBS.EX0140 · Exercise · Oct 16, 2025 · 100+ Real-World Open-Source Packages · Input-Output Behavioral Regeneration
Lamprou et al. (2025) evaluated Lexo, a defensive supply-chain sanitization framework that models observable benign package behavior via input-output traces and uses multiple guardrailed LLMs to synthesize clean drop-in package replacements stripped of stealthy conditional…
Source citation records
- MITRE ATLAS: Embed Malware · MITRE ·
Common questions
- What is Manipulate AI Model: Embed Malware (AML.T0018.002)?
- Threat actors conceal executable malware, backdoors, or reverse-shell loaders inside AI model archive files, pickle serialization streams, or weight tensor payloads. When engineers or automated serving clusters deserialize the checkpoint, the hidden malware runs directly on host infrastructure.
- How do you mitigate Manipulate AI Model: Embed Malware?
- MITRE ATLAS maps 4 mitigations to AML.T0018.002: Restrict Library Loading, Code Signing, Verify AI Artifacts, and Vulnerability Scanning. Prohibit unsafe serialization formats such as pickle in production and convert vetted models exclusively to Safetensors.