MITRE ATLAS 2026.10 · AML.T0011.000 · Critical severity
User Execution: Unsafe AI Artifacts
Attackers embed arbitrary code-execution payloads inside model files and ML serialization formats—such as Python pickle (`.pt`/`.bin`), TorchScript, Keras Lambda layers, or GGUF Jinja chat templates. Simply loading or inspecting the artifact in standard ML libraries triggers immediate host code execution before any inference occurs.
Technique dossier overview
- Category
- Supply chain
- Severity
- Critical
- Attack surface
- Model Weights & Supply Chain · Inference API & Hosting
- Framework maturity
- Realized
- Platforms
- Predictive AI, Generative AI, Agentic AI, Enterprise
- Tactics
- Execution
- Aliases
- Unsafe model artifact handling
- Catalog entry modified
How the mechanism works
- Adversaries craft a model file whose serialization stream invokes Python `__reduce__` opcodes, unsafe Keras custom layers, or vulnerable template directives.
- The artifact is shared on public hubs, attached to bug reports, or substituted into a model registry under a benign-looking name.
- When an engineer, CI pipeline, or inference engine loads the file with default permissive deserializers, embedded commands execute with process privileges.
Detection & telemetry signals
- Static artifact scanners (ModelScan/Picklescan/Fickling) detecting dangerous opcodes (`GLOBAL`, `STACK_GLOBAL`, `os.system`, `eval`) or unsafe Lambda layers.
- Runtime process monitors flagging child shells, network sockets, or file writes triggered inside `torch.load` or `model.load` call stacks.
- Model loader telemetry logging blocked legacy format ingestion attempts or unapproved Jinja template expressions.
Architectural defensive countermeasures
- Standardize model interchange on non-executable formats such as Safetensors and enforce `weights_only=True` or equivalent strict deserializers everywhere.
- Scan every externally sourced model artifact automatically in an isolated, network-disabled sandbox container before admitting it to internal registries.
- Disable arbitrary Jinja template evaluation and unsafe custom-layer deserialization in local runners and inference engines.
- Apply OS-level library loading restrictions, read-only mounts, and minimal IAM permissions on model-conversion and serving hosts.
Framework crosswalk (OWASP LLM Top 10 & NIST AI RMF)
- OWASP LLM Top 10 (2025)
- OWASP rationale
- Unsafe AI artifacts exploit model-hub supply chains (LLM03) and unvalidated deserialization/template-rendering sinks (LLM05) for code execution.
- NIST AI RMF functions
- NIST AI RMF guidance
- Under NIST AI RMF GOVERN 6.1 and MANAGE, forbid unsafe deserialization formats in production, mandate static artifact scanning, and isolate legacy loaders.
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.
- User Training AML.M0018
Educate engineers, analysts, and end-users on AI trust boundaries, deepfake phishing, untrusted model outputs, and concrete verification/escalation workflows.
Related technique records
Documented incidents & exercises (21)
- 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…
- Poisoned GGUF Templates: Inference-Time Supply Chain Attack AML.CS0064 · Exercise · June 2025 · Moderate
ATLAS case study: poisoned GGUF chat templates executed attacker code at inference time via model-file supply chain.
- 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.
- TensorFlow GRUBlockCellGrad Out-of-Bounds Memory Read Vulnerability INC-2023-25658 · Incident · Mar 25, 2023 · High · Cloud & AI Infrastructure
CVE-2023-25658 (published March 25, 2023) documented an out-of-bounds memory read inside TensorFlow's `GRUBlockCellGrad` C++ kernel prior to versions 2.11.1 and 2.12.0. Supplying mismatched or malformed tensor dimension inputs to the gradient operator caused memory corruption,…
- ClearML Client SDK Pickle Deserialization RCE via Poisoned Artifacts INC-2024-24590 · Incident · Feb 6, 2024 · Critical · Cloud & AI Infrastructure
CVE-2024-24590 (published February 6, 2024, disclosed by HiddenLayer) exposed a critical insecure deserialization vulnerability in the ClearML Python SDK (`0.17.0` through `1.14.2`). When an ML engineer invoked `Artifact.get()` on a shared project artifact, the ClearML SDK…
- ClearML Client SDK Path Traversal Overwriting Files on Artifact Download INC-2024-24591 · Incident · Feb 6, 2024 · High · Cloud & AI Infrastructure
CVE-2024-24591 (published February 6, 2024, disclosed by HiddenLayer) affected ClearML's `Dataset.get_local_copy()` archive extraction workflow. Crafted dataset zip archives containing relative directory traversal entries could write arbitrary files outside the target cache…
- MLflow Untrusted Recipe Template XSS Escalating to Client-Side Notebook RCE INC-2024-27132 · Incident · Feb 23, 2024 · High · Software Development & AI Tooling
CVE-2024-27132 (published February 23, 2024) disclosed a template sanitization flaw in MLflow Recipes when rendering step cards inside interactive notebook environments like Jupyter. Insufficient escaping of untrusted recipe variables allowed attacker-controlled JavaScript to…
- llama-cpp-python GGUF Chat Template Jinja2 Server-Side Template Injection RCE INC-2024-34359 · Incident · May 10, 2024 · Critical · Cloud & AI Infrastructure
CVE-2024-34359 exposed a critical server-side template injection (SSTI) flaw in `llama-cpp-python` when rendering `tokenizer.chat_template` strings embedded inside `.gguf` model headers. Because the Python wrapper passed untrusted Jinja2 template strings directly into an…
- Hugging Face Transformers TensorFlow Checkpoint Pickle Deserialization RCE INC-2024-3568 · Incident · Apr 10, 2024 · Elevated · Cloud & AI Infrastructure
CVE-2024-3568 disclosed arbitrary code execution inside Hugging Face `transformers` (`load_tf_weights_in_*` / `TFPreTrainedModel` checkpoint utilities) when deserializing untrusted repository artifacts. Certain checkpoint conversion and loading paths invoked unsafe `pickle`…
- 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…
- JupyterLab Untrusted Notebook Markdown DOM Clobbering XSS INC-2024-43805 · Incident · Aug 28, 2024 · Elevated · Software Development & AI Tooling
CVE-2024-43805 identified a DOM clobbering cross-site scripting (XSS) vulnerability in JupyterLab triggered when a user opened or previewed an untrusted `.ipynb` notebook or Markdown file. Crafted HTML elements inside Markdown cells clobbered global DOM properties used by…
- Ollama Modelfile ZIP Archive Path Traversal During Local Model Creation INC-2024-45436 · Incident · Aug 28, 2024 · High · Cloud & AI Infrastructure
CVE-2024-45436 revealed a Zip-Slip style path traversal flaw inside Ollama (`< 0.1.47`) during extraction of uploaded ZIP archives in `CreateModel` workflows. Crafted archives containing relative `../` entry names could write files outside the intended model staging directory…
- ONNX download_model Tar Archive Path Traversal Arbitrary File Overwrite INC-2024-7776 · Incident · Mar 20, 2025 · High · Cloud & AI Infrastructure
CVE-2024-7776 (published March 20, 2025) affected the `onnx` Python framework (`<= 1.16.1`) within its `download_model` archive extraction helper. Because tar archives retrieved from model hubs were extracted without validating member paths against directory traversal (`../`)…
- Keras Model.load_model() safe_mode=True Bypass via Crafted config.json INC-2025-1550 · Incident · Mar 11, 2025 · Critical · Cloud & AI Infrastructure
CVE-2025-1550 (published March 11, 2025) revealed an arbitrary code execution bypass in Keras's `Model.load_model()` even when `safe_mode=True` was explicitly enforced. Attackers could modify the `config.json` manifest inside a `.keras` zip archive to reference arbitrary Python…
- 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…
- Coding CLI Malicious Nested Bare Git Repository core.fsmonitor Auto-Execution INC-2026-45033 · Incident · May 11, 2026 · High · Software Development & AI Tooling
CVE-2026-45033 (CVSS 7.8, published May 11, 2026) exposed arbitrary command execution in GitHub Copilot CLI versions prior to `1.0.43`. When the coding agent traversed a workspace containing a crafted nested bare Git repository and invoked routine read-only commands such as…
- ComfyUI LoadTrainingDataset Node Unauthenticated Pickle Deserialization RCE INC-2026-68771 · Incident · Jul 31, 2026 · Critical · Consumer AI & Local Runtimes
CVE-2026-68771 (CVSS 9.3, published July 31, 2026) affected ComfyUI versions `<= 0.23.0` within its `LoadTrainingDataset` workflow node. An unauthenticated attacker reaching an exposed instance or sharing a workflow referencing crafted `.pkl` dataset shard files triggered…
- 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…
- Large-Scale Exploit Instrumentation of Unsafe Pickle Serialization on Hugging Face OBS.EX0132 · Exercise · Oct 6, 2024 · Hugging Face Model Hub · Ecosystem-Scale Serialization & Scanner Audit
Casey, Santos, and Mirakhorli (2024) conducted a large-scale empirical study of unsafe Python serialization formats across the Hugging Face Model Hub, evaluating both real exploitability via object injection and the coverage limits of platform-side security flagging. Their…
Source citation records
- MITRE ATLAS: Unsafe AI Artifacts · MITRE ·
Common questions
- What is User Execution: Unsafe AI Artifacts (AML.T0011.000)?
- Attackers embed arbitrary code-execution payloads inside model files and ML serialization formats—such as Python pickle (`.pt`/`.bin`), TorchScript, Keras Lambda layers, or GGUF Jinja chat templates. Simply loading or inspecting the artifact in standard ML libraries triggers immediate host code execution before any inference occurs.
- How do you mitigate User Execution: Unsafe AI Artifacts?
- MITRE ATLAS maps 5 mitigations to AML.T0011.000: Restrict Library Loading, Code Signing, Verify AI Artifacts, Vulnerability Scanning, and User Training. Standardize model interchange on non-executable formats such as Safetensors and enforce `weights_only=True` or equivalent strict deserializers everywhere.