Security
Protecting every layer from attack: supply chain, infrastructure, model files, prompt injection and agent permissions.
Threats on every layer
26 threat records, Layer 9 first. References are verified against the OWASP Top 10 for LLM Applications 2025 and MITRE ATLAS 2026.10; real cases are labelled as an incident or a research demonstration. Every record is pending expert review.
| Layer | Exposed | Top attacks | Real incident | Controls | Owner | Reference |
|---|---|---|---|---|---|---|
| L9 Applications & Interfaces Pending expert review | A deepfake video call talks staff into paying Staff who approve payments or reset access over video or phone |
| Incident: Deepfake video call that led to about US$25 million in transfers (Arup, Hong Kong) (2024-01) |
| CISO, with Legal/Compliance | AML.T0088 Generate DeepfakesAML.T0052.001 Deepfake-Assisted PhishingAML.T0048.000 Financial Harm |
| Links that plant lasting instructions in an assistant Assistants with memory that persists across chats |
| Incident: AI recommendation poisoning (2026-02) |
| AppSec, with ML engineering | LLM01:2026 Prompt InjectionAML.T0131 Crafted AI Assistant LinksAML.T0080.000 Memory | |
| Chatbot output runs as code in someone's browser Web pages and support consoles that display model output |
| Research demonstration: Cross-site scripting through a support chatbot (2025-08) |
| AppSec | LLM10:2026 Improper Output HandlingAML.T0077 LLM Response Rendering | |
| L8 Agents Pending expert review | An agent in a build pipeline leaks its keys API keys and tokens in the agent's environment |
| Research demonstration: Secret exposure through a coding agent's CI action (2026-06) |
| AppSec, with Platform/Cloud | LLM02:2026 Sensitive Information DisclosureAML.T0083 Credentials from AI Agent ConfigurationAML.T0051.001 Indirect |
| Attackers run AI agents against their targets Coding and computer-use agents that can run scans and exploits |
| Incident: AI-orchestrated espionage campaign (2025-11) |
| CISO, with AppSec | AML.T0124 Autonomous Attack Orchestration | |
| An agent with too much power is told to destroy Files, cloud resources and accounts an agent can change |
| Incident: Wiper prompt planted in an AI coding extension release (AWS says it was malformed and did not run) (2025-07) |
| AppSec, with Platform/Cloud | LLM03:2026 Excessive AgencyAML.T0101 Data Destruction via AI Agent Tool Invocation | |
| AI suggests a package that doesn't exist, and an attacker registers it Code and install commands written by AI assistants and coding agents |
| Research demonstration: huggingface-cli: an invented package name, registered as a harmless test, downloaded tens of thousands of times (2024-03) |
| AppSec, with Platform/Cloud | LLM07:2026 MisinformationAML.T0060 Publish Hallucinated EntitiesAML.T0062 Discover LLM HallucinationsAML.T0011.001 Malicious Package | |
| L7 Orchestration & Tooling Pending expert review | Hidden instructions in content the AI reads Emails, web pages, documents and tool results that enter the model's context |
| Research demonstration: EchoLeak (zero-click exfiltration from an office assistant) (2025-06) |
| AppSec, with ML engineering | LLM01:2026 Prompt InjectionAML.T0051.001 Indirect |
| A tool server that turns on its users Tool servers and packages that agents install and trust |
| Incident: Malicious postmark-mcp package (2025-09) |
| AppSec, with Platform/Cloud | LLM04:2026 Supply ChainAML.T0110 AI Agent Tool PoisoningAML.T0010.005 AI Agent Tool | |
| Planted documents steer retrieval-based answers The document store a retrieval system searches |
| Research demonstration: PoisonedRAG (2024-02) |
| Data, with AppSec | LLM09:2026 Vector and Embedding WeaknessesAML.T0070 RAG Poisoning | |
| L6 Inference & Optimization Pending expert review | Self-hosted model servers left open to anyone Model servers run on workstations and cloud machines, listening on all network interfaces |
| Research demonstration: Over 1,100 exposed Ollama servers found with Shodan (Cisco Talos) (2025-09) |
| Platform/Cloud, with ML engineering | LLM06:2026 Unbounded ConsumptionAML.T0132 Misconfigured or Publicly Exposed AI ServicesAML.T0006.002 Scan for Exposed AI InfrastructureAML.T0034 Cost Harvesting |
| Model files that run code when you load them Machines that download and load third-party model files |
| Incident: Malicious models on Hugging Face (nullifAI) (2025-02) |
| ML engineering, with AppSec | LLM04:2026 Supply ChainAML.T0011.000 Unsafe AI ArtifactsAML.T0010.003 Model Repository | |
| Encrypted chat traffic still reveals the topic Streamed responses, sent token by token over encrypted connections |
| Research demonstration: Whisper Leak (2025-11) |
| Platform/Cloud, with ML engineering | None verified | |
| L5 Foundation Models Pending expert review | Jailbreaks that get past safety training and reveal hidden instructions A model's safety training and the app's content rules |
| Research demonstration: Universal adversarial suffixes that jailbreak several aligned models (2023-07) |
| AppSec, with ML engineering | LLM08:2026 Hidden Context ExposureAML.T0054 LLM JailbreakAML.T0069.002 System PromptAML.T0085.003 System Instructions |
| A hidden backdoor that survives safety training Model weights from training runs or third parties |
| Research demonstration: Sleeper Agents (2024-01) |
| ML engineering, with CISO | LLM05:2026 Data and Model PoisoningAML.T0018.000 Poison AI Model | |
| Copying a model by harvesting its answers A model's capabilities, reachable through its public API or app |
| Incident: Distillation campaigns against a frontier model provider (2026-02) |
| CISO, with Legal/Compliance | AML.T0005 Replicate AI Model BehaviorAML.T0048.004 AI Intellectual Property Theft | |
| L4 Data Pending expert review | Models repeat private training data word for word Personal data, secrets and copyrighted text that ended up in training data |
| Research demonstration: Scalable extraction of training data (2023-11) |
| Data, with Legal/Compliance | LLM02:2026 Sensitive Information DisclosureAML.T0137.003 Extract Memorized Data |
| Poisoned training data plants bad behaviour Web-scale datasets that point to pages and images anyone can change |
| Research demonstration: Poisoning web-scale training datasets (2023-02) |
| Data, with ML engineering | LLM05:2026 Data and Model PoisoningAML.T0020 Training Data Poisoning | |
| L3 Cloud & Infrastructure Pending expert review | AI compute clusters left open to the internet Job and dashboard APIs of training and serving frameworks |
| Incident: ShadowRay (2024-03) |
| Platform/Cloud, with CISO | AML.T0049 Exploit Public-Facing ApplicationAML.T0132 Misconfigured or Publicly Exposed AI Services |
| Stolen cloud keys used to run someone else's AI bill Cloud accounts with access to hosted model services |
| Incident: LLMjacking (2024-05) |
| Platform/Cloud, with CISO | LLM06:2026 Unbounded ConsumptionAML.T0012 Valid AccountsAML.T0034 Cost Harvesting | |
| One customer's training job reaches another's data Shared managed training and serving platforms |
| Research demonstration: SAPwned (SAP AI Core) (2024-07) |
| Platform/Cloud, with ML engineering | AML.T0105 Escape to Host | |
| L2 Compute Hardware Pending expert review | Leftover GPU memory leaks one user's data to another GPU memory shared over time by different programs or tenants |
| Research demonstration: LeftoverLocals (2024-01) |
| Platform/Cloud, with CISO | None verified |
| Bit flips in GPU memory corrupt a running model Model weights held in GPU memory without error correction |
| Research demonstration: GPUHammer (2025-07) |
| Platform/Cloud, with ML engineering | AML.T0031 Erode AI Model Integrity | |
| L1 Physical & Energy Pending expert review | Hardware tampered with before it arrives Servers, network gear and accelerators in transit or at repair |
| No documented public incident yet |
| Platform/Cloud, with CISO | AML.T0010.000 Hardware |
| Model weights copied out by insiders or intruders Weight files on servers and storage in data centres and labs |
| Incident: Restricted research model weights leaked publicly a week after release (LLaMA) (2023-03) |
| CISO, with ML engineering | AML.T0035 AI Artifact CollectionAML.T0025 Exfiltration via Cyber MeansAML.T0048.004 AI Intellectual Property Theft | |
| Break-ins and tampering at data-centre sites Buildings, cages and racks that hold servers and model weights |
| No documented public incident yet |
| CISO, with Platform/Cloud | None verified |
SimpleA plain explanation, one diagram and an analogy, with where the analogy breaks.
Security means keeping bad people out. An AI has many doors: the buildings, the chips, the files that hold what it learned, and the words it reads.
Some attacks are old, like breaking into a building. Some are new, like hiding secret orders inside a web page and hoping the AI will obey them.
Builders lock every door, and give the AI only the keys it really needs.
Each layer has its own attack surface. Sites and hardware can be broken into or tampered with. Chips shared between users can leak data. Training data can be poisoned. Model files can carry hidden code. And text the model reads can carry instructions.
Prompt injection comes in two kinds. Direct: a user types instructions that try to override the app's rules. Indirect: the instructions hide in something the model reads, such as a web page, an email, a file or a tool's description (tool poisoning). Jailbreaks are related but different: the user attacks the model's own safety training, with role-play, odd encodings or many fake examples.
The prize is often the model weights: whoever copies them has the model. A 2024 RAND study counted 38 distinct ways to steal them and found no single fix.
Supply-chain security means checking what you didn't make yourself: datasets, pretrained models, libraries, plugins and tool servers. Prefer weight formats that can't run code when loaded, and check file hashes or signatures.
Agents raise the stakes. The lethal trifecta is an agent that can read private data, sees untrusted content and can send data out: injected text can make it leak that data. Remove one leg, run the agent in a sandbox with limited files and network, give it the fewest tools it needs, and ask a person before risky actions.
Like: A house with many doors and windows: one open window is enough.
Where it breaks: A burglar must come to the house. With AI the attack can arrive as ordinary text in an email or web page that the system reads on its own.
ResearchWhere the simple picture breaks, open problems and primary sources.
A model reads instructions and data as one stream of text, so most defences limit damage rather than close the hole.
Indirect prompt injection. Hidden instructions in pages, emails or tool output steer the model. Filters are models too: adaptive attacks beat 12 published defences, most of them over 90% of the time (Nasr et al., 2025). Mitigations are architectural: least privilege, sandboxes, approvals, and keeping untrusted data out of control flow (CaMeL, 2025).
Tool poisoning. Hidden instructions in MCP tool descriptions reach the model, not the user, and can change after approval (Invariant Labs, 2025).
Model supply chain. Pickle files can run code on load; safetensors stores only numbers (safetensors). Signing ties a file to its producer (model-signing 1.0, 2025).
Jailbreaks. Classes: competing objectives such as prefix injection, mismatched generalisation such as Base64 (Wei et al., 2023), optimised suffixes that transfer (Zou et al., 2023) and many-shot prompts (Anthropic, 2024).
Data poisoning. About 250 documents backdoored models of 600 million to 13 billion parameters alike (Souly et al., 2025).
Evaluating defences. Static attack sets overstate safety; benchmarks such as AgentDojo help only if attacks adapt.
On every layer
- Layer 9 · Applications & Interfaces: Apps that pass model output straight into a browser, database or shell without checks open the door to classic attacks such as cross-site scripting. (OWASP Top 10 for LLM Applications: LLM05:2025 Improper Output Handling)
- Layer 8 · Agents: An agent with more tools, permissions or autonomy than it needs turns a tricked model into real damage (excessive agency). (OWASP Top 10 for LLM Applications: LLM06:2025 Excessive Agency)
- Layer 7 · Orchestration & Tooling: Text from documents, web pages and tool results can carry hidden instructions; prompt injection tops OWASP's 2025 list of risks for LLM apps. (OWASP Top 10 for LLM Applications: LLM01:2025 Prompt Injection)
- Layer 6 · Inference & Optimization: Model files can carry code: loading a pickle-based file can run an attacker's commands, which is why weight-only formats exist. (Pickle Scanning (Hugging Face Hub documentation))
- Layer 5 · Foundation Models: A model can carry a hidden backdoor that survives safety training, so testing its behaviour cannot prove it is clean. (Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Training)
- Layer 4 · Data: Training data can be poisoned: researchers showed that 0.01% of two large web-scale datasets could have been poisoned for about $60. (Poisoning Web-Scale Training Datasets is Practical)
- Layer 3 · Cloud & Infrastructure: Shared infrastructure needs access controls on models, data and training pipelines, with sensitive code and data kept in separate environments. (Guidelines for secure AI system development: secure deployment (UK NCSC))
- Layer 2 · Compute Hardware: Chips can leak between users: the 2024 LeftoverLocals flaw let one program read another's chatbot responses from leftover GPU memory on chips from several vendors. (LeftoverLocals: Listening to LLM responses through leaked GPU local memory (Trail of Bits))
- Layer 1 · Physical & Energy: Sites need physical security: a 2024 study of how model weights could be stolen lists break-ins, planted devices and tampering with hardware among the routes. (Securing AI Model Weights: Preventing Theft and Misuse of Frontier Models (RAND))
Examples as of 2026-10-14
- OWASP Top 10 for LLM Applications 2025
- Guidelines for secure AI system development (UK NCSC and partners)
- safetensors weight format
Sources
- Securing AI Model Weights: Preventing Theft and Misuse of Frontier Models (RAND) (2024-05-30)
- OWASP Top 10 for LLM Applications 2025 (2025)
- Poisoning Web-Scale Training Datasets is Practical (2023)
- Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Training (2024)
- Extracting Training Data from Large Language Models (2020)
- The lethal trifecta for AI agents: private data, untrusted content, and external communication (Simon Willison) (2025-06-16)
- Guidelines for secure AI system development: secure deployment (UK NCSC) (2023-11-27)
- The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses against LLM Jailbreaks and Prompt Injections (2025-10-10)
- Defeating Prompt Injections by Design (CaMeL) (2025-03-24)
- MCP Security Notification: Tool Poisoning Attacks (Invariant Labs) (2025-04-01)
- Safetensors (Hugging Face documentation) (ongoing)
- Taming the Wild West of ML: Practical Model Signing with Sigstore (Sigstore blog) (2025-04-04)
- Jailbroken: How Does LLM Safety Training Fail? (2023-07-05)
- Universal and Transferable Adversarial Attacks on Aligned Language Models (2023-07-27)
- Many-shot jailbreaking (Anthropic) (2024-04-02)
- Poisoning Attacks on LLMs Require a Near-constant Number of Poison Samples (2025-10-08)
- AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents (2024-06-19)
- Beyond permission prompts: making Claude Code more secure and autonomous (Anthropic engineering blog) (2025-10-20)