MITRE ATLAS 2026.10 · AML.T0112.001 · Critical severity
Machine Compromise: AI Artifacts
Loading untrusted local AI artifacts (such as Python `pickle` weights `.pt`/`.bin`/`.pkl`, custom model Python modules with `trust_remote_code`, or weaponized GGUF chat templates) executes arbitrary code on the host machine during ingestion or inference startup. Even inspecting or benchmarking a downloaded checkpoint can compromise the host if unsafe loaders are used.
Technique dossier overview
- Category
- Supply chain
- Severity
- Critical
- Attack surface
- Model Weights & Supply Chain · Inference API & Hosting
- Framework maturity
- Feasible
- Platforms
- Predictive AI, Generative AI, Agentic AI
- Tactics
- Impact
- Catalog entry modified
How the mechanism works
- An attacker embeds malicious Python bytecode opcodes (via `__reduce__` / `GLOBAL` opcodes) inside a serialized checkpoint, or malicious Jinja/Python hooks in a model config.
- A victim researcher, CI worker, or inference engine loads the artifact using `torch.load` (without `weights_only=True`), `pickle.load`, or Hugging Face `trust_remote_code=True`.
- Deserialization or template rendering immediately executes the embedded payload with the privileges of the ML host process.
Detection & telemetry signals
- Static artifact scanners (Fickling, ModelScan, Picklescan) flagging dangerous opcodes (`os.system`, `eval`, `subprocess`, `posix`) inside `.pt`, `.bin`, or `.ckpt` archives.
- Runtime execution of `subprocess` or network socket calls triggered inside Python deserialization stack frames (`pickle.Unpickler.load`).
- Code paths in ML pipelines invoking `trust_remote_code=True` or `torch.load(..., weights_only=False)` against external unverified repositories.
- GGUF or tokenizer configuration files containing abnormally complex Jinja2 template expressions accessing Python object internals (SSTI).
Architectural defensive countermeasures
- Standardize exclusively on SafeTensors and non-executable tensor formats across internal registries; block `.pkl`, `.bin`, and legacy pickle weights at CI/registry admission.
- Enforce `weights_only=True` and disallow `trust_remote_code=True` globally in inference and evaluation loaders unless audited commits are hash-pinned.
- Scan every ingested external model archive in an offline, unprivileged sandbox with Fickling/ModelScan before admitting it to GPU nodes.
- Use strict sandboxed Jinja rendering (disallowing arbitrary attribute traversal) when parsing GGUF or Hugging Face `chat_template` strings.
Framework crosswalk (OWASP LLM Top 10 & NIST AI RMF)
- OWASP LLM Top 10 (2025)
- OWASP rationale
- Deserialization and template-injection flaws in local model artifacts are classic AI Supply Chain threats (LLM03) resulting in unsafe downstream code execution (LLM05).
- NIST AI RMF functions
- NIST AI RMF guidance
- Inventory model formats and loader flags across pipelines under MAP, and enforce SafeTensors-only policies, pre-load scanning, and sandboxed template rendering under MANAGE.
Mapped defensive controls
- Control Access to AI Models and Data at Rest AML.M0005
Lock down stored model weights, LoRA adapters, training corpora, vector indexes, and backups with strict least-privilege IAM, private networking, and zero public bucket ACLs.
- 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 (5)
- 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…
- 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…
- 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…
- PickleBall Ecosystem Audit & Load-Time Deserialization Enforcement OBS.EX0133 · Exercise · Aug 21, 2025 · Hugging Face Popular Models · Static Policy Synthesis & Drop-In Safe Unpickler
Kellas et al. (ACM CCS 2025) audited popular Hugging Face repositories and found 44.9% still depend on the unsafe pickle format, while rigid loaders like PyTorch weights-only block 15% of benign pickle repos and static scanners exhibit both false positives and false negatives.…
- Cloak and Detonate: Scanner Evasion & Taint Detection Across 1,613 Skills OBS.EX0205 · Exercise · Jul 2, 2026 · 8 Skill Scanners & 1,613 In-the-Wild Malicious Skills · SkillCloak & SkillDetonate
Ji et al. (2026) tested eight static and hybrid LLM skill scanners against 1,613 real-world malicious agent skills using SkillCloak structural obfuscation and Self-Extracting Skill (SFS) packing that materializes payloads only at runtime. SFS packing bypassed every tested…
Source citation records
- MITRE ATLAS: AI Artifacts · MITRE ·
Common questions
- What is Machine Compromise: AI Artifacts (AML.T0112.001)?
- Loading untrusted local AI artifacts (such as Python `pickle` weights `.pt`/`.bin`/`.pkl`, custom model Python modules with `trust_remote_code`, or weaponized GGUF chat templates) executes arbitrary code on the host machine during ingestion or inference startup. Even inspecting or benchmarking a downloaded checkpoint can compromise the host if unsafe loaders are used.
- How do you mitigate Machine Compromise: AI Artifacts?
- MITRE ATLAS maps 5 mitigations to AML.T0112.001: Control Access to AI Models and Data at Rest, Restrict Library Loading, Code Signing, Verify AI Artifacts, and Vulnerability Scanning. Standardize exclusively on SafeTensors and non-executable tensor formats across internal registries; block `.pkl`, `.bin`, and legacy pickle weights at CI/registry admission.