Join our Newsletter — 33% off our NHI Course
Home› Guides› AML.T0011 User Execution: How the Technique Works Against…
Guide AI Threats & Model Security

AML.T0011 User Execution: How the Technique Works Against AI Systems and How to Defend

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 12 November 2026 12 min read
On this page

In AI systems the moment of compromise is often an ordinary action: loading a model, importing a package, starting an inference server or asking an agent to use a tool. MITRE ATLAS records this as AML.T0011 User Execution, an Execution (AML.TA0005) technique rated Realized, with four sub-techniques in the 2026.10 release: Unsafe AI Artifacts (AML.T0011.000), Malicious Package (AML.T0011.001), Poisoned AI Agent Tool (AML.T0011.002) and Malicious Link (AML.T0011.003). ATLAS describes it as an adversary relying on a user to load, execute, interpret or otherwise use a malicious or unsafe artefact, with effects ranging from host code execution to malicious AI behaviour. This guide covers how each sub-technique works, the cases ATLAS records, the controls that stop execution and how to measure them. It is for ML engineers, data scientists, agent developers and the security teams that manage their workstations and pipelines. The Enterprise equivalent is covered in T1204 User Execution; this page covers the AI-specific angle.

Key takeaways

  • Loading is executing. Serialised model formats based on Python pickle run code during deserialisation; Hugging Face's own documentation says not to unpickle data from untrusted sources.
  • No vulnerability is required. ATLAS notes an unsafe artefact may use functionality an AI runtime supports on purpose, such as a bundled chat template, to change model outputs, safety behaviour or agent actions.
  • The artefact may still work. ATLAS says unsafe artefacts may continue to work as expected from the victim's perspective, so "it ran fine" is not evidence of safety.
  • Agents add a new user. With AML.T0011.002 the "user" action can be a prompt that makes the agent invoke a poisoned tool, as in the postmark-mcp incident.
  • Verify before load. ATLAS maps AML.M0014 Verify AI Artifacts, AML.M0013 Code Signing, AML.M0011 Restrict Library Loading, AML.M0016 Vulnerability Scanning and AML.M0018 User Training.

How the four sub-techniques work

Sub-techniqueMaturityPlatformThe execution momentTypical effect
AML.T0011.000 Unsafe AI ArtifactsRealizedPredictive, generative and agentic AI; EnterpriseLoading a serialised model or package, starting an inference runtime or submitting an inference request that processes bundled templates, tokenizer metadata, configuration or pre- and post-processing logicHost code execution, or changed model context, outputs or agent actions
AML.T0011.001 Malicious PackageRealizedEnterpriseImporting a software package that appears useful for an AI taskCode execution with the user's privileges
AML.T0011.002 Poisoned AI Agent ToolRealizedAgentic AIThe agent invoking a tool from AI software, installed packages, skills or a remote servicePoisoned definitions or responses enter context; malicious tool logic runs; further tools are invoked
AML.T0011.003 Malicious LinkDemonstratedEnterpriseA user clicking a link, often after spearphishing; ATLAS references ATT&CK T1204Code execution through the browser or an AI agent that accepts connections from any website

ATLAS links the technique to Supply Chain Compromise (AML.T0010): users may inadvertently execute unsafe code introduced that way. Supply chain compromise is the delivery; user execution is the trigger. For the Malicious Link example, ATLAS notes that an AI agent configured not to validate website origin headers will accept connections from any website, letting an adversary reach otherwise inaccessible networks.

Why model files execute

Hugging Face's pickle security documentation explains the mechanism: pickle stores a stack of opcodes that run when the file is loaded, and opcodes such as GLOBAL or STACK_GLOBAL import modules while REDUCE calls a function with arguments, which together can run arbitrary code during deserialisation. Its example returns the expected data after running the injected code, so the victim sees nothing wrong. PyTorch checkpoints commonly use pickle. The current torch.load documentation (2.15) shows weights_only=True as the default, which restricts the unpickler to tensors, primitive types, dictionaries and types added through add_safe_globals(), and it warns never to load data from an untrusted source. The safetensors format stores tensors without pickle and is described by Hugging Face as a format for storing tensors safely, as opposed to pickle.

Format choice is only part of the answer. AML.T0011.000 explicitly covers behaviour-shaping components, and the GGUF case below needs no deserialisation flaw at all.

Artefact typeExecution or influence pathSafer practice
Pickle-based checkpoints (.pkl, .pt, .pth, .bin)Code runs during deserialisationPrefer safetensors; keep weights_only=True; inspect imports with pickletools before loading anything untrusted
Models with remote or custom codeRepository code runs when the model is loadedLeave custom code loading off unless the code has been reviewed and pinned to a commit
Bundled chat templates and tokenizer metadata (for example GGUF)The inference engine interprets the template during normal useCompare templates with the publisher's original; supply your own reviewed template in production
NotebooksCells run shell commands and download further filesRead before running; run unknown notebooks in disposable environments without credentials
Agent skills and MCP serversTool code runs locally; tool descriptions enter model contextAllow-list by publisher and version; review descriptions and code; require approval for sensitive tool calls

Cases in ATLAS

  • Malicious models on Hugging Face (AML.CS0031): ReversingLabs found models that executed reverse shells when loaded. ATLAS records the files were corrupted so the payload ran before deserialisation failed, which the scanner of the time did not flag.
  • Organization Confusion on Hugging Face (AML.CS0027): a researcher replaced models in look-alike organisation accounts; per ATLAS, when any future user loads the model it automatically executes the payload.
  • Model Namespace Reuse (AML.CS0065): loading or deploying a model pulled through a re-registered name executed the embedded payload in the model endpoint environment.
  • Poisoned GGUF Templates (AML.CS0064): Pillar Security and Fujitsu Research of Europe showed a modified chat template that the inference engine interprets automatically, changing model and agent behaviour without touching weights.
  • Google Colab notebooks (AML.CS0018): a victim may unwittingly run malicious code in a shared notebook, with the code hidden in files the notebook downloads.
  • Package hallucination (AML.CS0022): a user installs a package whose name an LLM invented and an adversary registered, giving arbitrary code execution. See the Slopsquatting and Package Hallucination Guide.
  • Amazon Q Developer extension (AML.CS0047): ATLAS maps execution to users who upgraded to v1.84.0; the AWS bulletin says the injected code failed to execute because of a syntax error.
  • postmark-mcp (AML.CS0053) and ClawdBot skill (AML.CS0049): the malicious code ran when users asked their agent to use the poisoned tool or skill. See postmark-mcp Malicious MCP Server 2025 and, for the marketplace pattern where skills told users to run "prerequisite" commands, ClawHub Malicious Skills 2026.
  • LAMEHUG (AML.CS0044): an email attachment held a PyInstaller-built .pif executable that CERT-UA classified as LAMEHUG, malware that uses an LLM to generate commands.

The PyTorch nightly case shows how small the trigger can be: PyTorch's advisory says the malicious torchtriton binary ran only when the package was imported. See the PyTorch torchtriton Supply Chain Attack 2022 page.

Where identity fits

User execution runs with whatever the user, notebook kernel or agent can reach. The torchtriton payload collected environment variables, .gitconfig and SSH keys; ClawHub skills went after exchange API keys, SSH keys and an agent's .env file. The less a workstation or agent holds in long-lived secrets, the less a single load or tool call exposes. Keep cloud and model hub credentials short-lived and out of environment files, run model experimentation under identities without production access, and give each agent tool its own scoped credential so a poisoned tool cannot borrow the agent's full access. See the Local MCP Server Security Guide.

Controls that stop execution

ATLAS mitigationSub-techniquesPractical form
AML.M0014 Verify AI ArtifactsParent, .000Check artefacts against protected approval records before deserialisation, loading, interpretation or inference; pin models to commit revisions and digests
AML.M0013 Code Signing.000, .001Refuse unsigned models and packages in production; verify signatures at load. See the Model Signing and OpenSSF Model Signing Guide
AML.M0011 Restrict Library LoadingParent, .000, .001Restricted unpicklers (weights_only=True), no custom model code by default, application control on inference hosts
AML.M0016 Vulnerability ScanningParent, .000, .001Scan models, packages and binaries before use; Hugging Face runs ClamAV and a Pickle Import scan but states the scan is not 100% foolproof
AML.M0018 User TrainingParent, .000, .001Teach ML and agent users to recognise manipulation: unknown models, "prerequisite" commands, look-alike organisations and invented package names

ATLAS maps no mitigation directly to AML.T0011.002 or AML.T0011.003. For poisoned tools, the controls on the delivery side in AML.T0010.005 apply (AI-BOM, red teaming, threat intelligence), plus runtime measures: an allow-list of tools, human approval for sensitive actions, and egress limits on tool processes. For malicious links, the general phishing defences in M1017 User Training apply, together with origin validation on any local agent service that listens for connections.

Decision guidance: the strongest single change is to make the safe path the default: safetensors or other non-executable formats in the intake pipeline, restricted loading in code, and an internal mirror of approved models, so data scientists do not have to judge each file. Where a team must load pickle-based or custom-code models from outside, do it in a disposable sandbox with no credentials and no network beyond what the test needs. Small teams should start with format and loading defaults plus an agent tool allow-list; larger organisations add signing enforcement and endpoint controls on ML workstations.

How to put it in place

  1. Find the load points: search code, notebooks and serving configuration for model loading calls, custom code flags, unpinned model names and agent tool configuration.
  2. Set safe defaults: convert approved models to safetensors where possible, keep weights_only=True, and turn off custom model code unless reviewed.
  3. Create a sandbox lane: a disposable environment without credentials for evaluating untrusted models, notebooks and tools.
  4. Allow-list agent tools: approved MCP servers and skills by publisher and version, with approval prompts kept on for tools that send data or change systems.
  5. Pilot in audit mode: log load events and tool installs that would be blocked for one release cycle, then enforce.
  6. Plan rollback: keep previous approved artefacts and tool versions available; if an enforced rule blocks legitimate work, add a reviewed exception rather than switching enforcement off.

Detection and measurement

SignalWhere
Inference or notebook processes spawning shells or making unexpected outbound connectionsEDR on ML workstations and inference hosts
Models loaded with unsafe settings or from paths outside the approved mirrorApplication logs, code scanning
Agent tool calls followed by reads of credential files or unusual egressAgent and tool logs, egress proxy
Installs of packages first published recently or matching hallucinated namesPackage proxy
Model outputs or agent actions that change after a template or model updateEvaluation suite, agent action logs
  • Share of production model loads using non-executable formats or restricted loading.
  • Share of production models verified by signature or digest at load.
  • Number of agent tools in use outside the allow-list (target zero on managed devices).
  • Untrusted artefacts evaluated in the sandbox lane rather than on workstations.
  • Mean time to contain after an EDR alert on an ML workstation.

Common failure patterns

  • "It is just weights": treating a model download as data rather than code, then loading it on a workstation that holds cloud credentials.
  • Scanner as approval: relying on a hub scan result alone, although the hub itself says its scan is not foolproof and ATLAS records models that evaded it.
  • Turning safety flags off to make a model load: disabling restricted loading or enabling custom code to fix an error, without reviewing why it was needed.
  • Running the prerequisite: following setup commands embedded in a skill or README without reading them.
  • Agents with everything: one agent holding many tools and broad credentials, so one poisoned tool can drive the others.

Framework mapping

FrameworkReferenceRelevance
MITRE ATLASAML.T0011, .000 to .003 (AML.TA0005 Execution)The technique and its sub-techniques
MITRE ATT&CKT1204 User ExecutionReferenced by AML.T0011.003
NIST SP 800-53 Rev. 5CM-7 Least Functionality, CM-11 User-installed Software, CM-14 Signed Components, SI-7, RA-5, AT-2Restricting what runs, verifying integrity, scanning and awareness
NIST CSF 2.0PR.PS-05, PR.AT-01, DE.CM-09Preventing unauthorised software execution, training, runtime monitoring
OWASP Top 10 for LLM Applications 2025LLM03 Supply Chain; LLM04 Data and Model PoisoningMalicious models and components; behaviour-shaping artefacts

Practitioner checklist

  • Treat every model, notebook, package and agent tool as code, not data.
  • Default to safetensors and restricted loading; keep custom model code off unless reviewed and pinned.
  • Load only from the internal mirror of approved, verified artefacts in production.
  • Evaluate untrusted artefacts in a disposable sandbox without credentials.
  • Allow-list MCP servers and skills and keep approval prompts on for sensitive tool calls.
  • Keep long-lived secrets off ML workstations and out of agent environment files.
  • Monitor inference and notebook processes for shells and unexpected egress.
  • Train ML and agent users on manipulation patterns specific to AI artefacts.

Standards and references

Related NHI Mgmt Group resources: MITRE ATLAS Guide · AML.T0010 Supply Chain Compromise · AML.T0110 AI Agent Tool Poisoning · AML.T0060 Publish Hallucinated Entities · Model Supply Chain Guide · Hugging Face Security Guide · MCP Server Trust Assessment

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 12 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.