Book a 20-minute call

Research · open data

AI attack map

A dated map of how a local or third-party AI setup can be turned against the person running it, organised by six layers of the stack, from the model file you download to the agent that acts on your machine.

Layers
6
Techniques
48
Dated events
122
Updated

Attacks only: this is a map of the surface, not a hardening guide. Every entry links its primary source.

L1ModelfileL2ChattemplateL3RunnerL4NetworkexposureL5Weights +toolsL6Agentharness

Pace

Dated events by year

The earliest technique on the map was first described in 2017. Dates are the publication dates of each primary source.

Every technique

Six layers, newest event first.

First described is the earliest primary source we could verify, not a claim that nobody did it earlier. Attacks chain across layers: each technique lives on one layer and its text names the chain.

L1 · 5 techniques

Model file

Can the file you download run code, or pretend to be something it is not?

A model download is a package from a stranger. Some formats (Python pickle: .bin, .pt, .ckpt, .pkl) can run code the moment they are loaded, the way a booby-trapped email attachment runs when opened. Newer formats (safetensors, GGUF) are plain numbers by design, so attacks there move to other layers. This layer covers where the file came from and whether loading it can execute anything.

ExampleA Hugging Face repository that looks like a popular model but opens a reverse shell or starts a crypto-miner the moment you load it.

L1.01Code execution when a pickle-based model is loadedIn the wildsince 2021 · 3 events

Pickle files can call arbitrary Python functions during deserialization. A model saved as pickle runs the attacker's code as soon as a framework loads it; no inference is needed.

  1. Campaign of 31 malicious repositories across 7 Hugging Face accounts (32,000+ downloads incl. linked models); returned under new accounts days after takedown.

    Pluto Security
  2. Malicious PyTorch models found on Hugging Face in the wild, including one opening a reverse shell on load.

    JFrog Security Research
  3. Exploiting ML pickle files described and the Fickling tool released (earliest verified ML-specific write-up). First described

    Trail of Bits, 'Never a dill moment'
L1.02Model-scanner evasionProof of conceptsince 2026 · 4 events

Model scanners use lists of dangerous functions and file-type routing. Attackers use functions not on the list, nest one payload inside another, give a file a misleading extension, or abuse whitelisted modules so the scan passes and the load still executes code.

  1. Analysis of why pickle defences in ML are repeatedly bypassed the same way.

    Sysdig
  2. 22 pickle loading paths across five frameworks, 19 missed by scanners; 133 exploitable gadgets with ~89-100% bypass. (conference held August 2026)

    Liu et al., USENIX Security 2026
  3. ShadowPickle: three stealthy deserialization attacks evade ten scanners; one evades PyTorch's weights-only unpickler 32% of the time.

    Pradhan et al., arXiv 2607.17503
  4. Real malicious Hugging Face files that ModelScan misses: alternative execution functions, nested deserialization, extension mismatch (earliest verified catalogue). First described

    protectai/modelscan issue #338
L1.03Malicious dataset or 'remote code' loaderIn the wildsince 2026 · 2 events

Datasets and models can ship loader code or configuration that the platform or your library executes while processing them. The attack lands on whoever processes the artifact, including the hosting platform itself.

  1. Model and dataset repositories whose loading scripts decode and execute a remote second stage (e.g. a `modeling.py` running base64-decoded code) passed the hub's file scanners, which check weights rather than scripts.

    HubAudit (paper)
  2. A malicious dataset abused a remote-code loader and a template injection in dataset configuration to run code on Hugging Face processing workers; the intruder then moved laterally. The campaign was run by an autonomous agent framework. First described

    Hugging Face security incident disclosure
L1.04Typosquatting and impersonation on model hubsIn the wildsince 2025 · 1 event

Attackers register model, dataset and organisation names that look like popular ones, so users download the attacker's artifact by mistake.

  1. 1,574 squatting models against the top-100 models (10.4% suspicious), 625 squatting datasets, 302 squatting organisations on Hugging Face. First described

    Internetware 2025, 'Exploring Typo Squatting Threats in the Hugging Face Ecosystem'
L1.05Polyglot model filesProof of conceptsince 2024 · 1 event

One file is valid in two formats at once, so a tool that checks it as format A loads or passes it while another tool reads it as format B.

  1. PyTorch file-format polyglots described; Fickling gains a module to identify and create them. First described

    Trail of Bits

L2 · 4 techniques

Chat template

Can the small program that formats every prompt change what the model is told, or run code?

Before your message reaches the model, a hidden Jinja2 program (the chat template) wraps it in the model's expected format. It ships inside the model file (GGUF metadata or tokenizer_config.json) and runs on every single request. A few extra lines can quietly add instructions whenever a trigger word appears, without touching the weights.

ExampleA GGUF that answers normally until a user mentions a certain product, then starts giving wrong answers and inserting attacker links.

L2.01Chat-template backdoor (conditional hidden instructions)Proof of conceptsince 2025 · 4 events

A few lines of Jinja2 added to the template check the user's message for a trigger phrase and, if found, prepend attacker instructions as a system message. Weights are unchanged and benign prompts render byte-for-byte identical, so evaluations and hub scans pass.

  1. Paper v4: 18 models, 7 families, 4 engines; triggered accuracy falls from ~90% to ~15%, attacker-URL emission above 80%; tool-use hijack across 3,868 agent episodes; passes all automated hub scans; sandboxing the template engine does not stop it.

    Pillar Security + Fujitsu, arXiv 2602.04653
  2. Large-scale look at GGUF templates on Hugging Face; mismatches mostly benign runtime differences, i.e. few signs of in-the-wild use.

    Splunk
  3. Validation across 18 models and llama.cpp, Ollama, vLLM, SGLang.

    Pillar Security
  4. Inference-time backdoors via poisoned GGUF chat templates first described. First described

    Pillar Security
L2.02Template injection (SSTI) to code executionCVEsince 2024 · 2 events

If the runner renders the model's template with an unsandboxed Jinja2 environment, the template can reach Python internals and run commands on the server.

  1. SGLang CVE-2026-5760: template from a GGUF rendered unsandboxed; reachable through the rerank endpoint.

    Cloud Security Alliance research note
  2. 'Llama Drama' CVE-2024-34359 in llama-cpp-python: model metadata template rendered without a sandbox; fixed in 0.2.72. First described

    Checkmarx
L2.03Chat-template token spoofing in untrusted contentProof of conceptsince 2026 · 1 event

Untrusted text (a web page, a tool result) is formatted with the model's own role tags so the model treats it as a higher-authority turn. Chains into L6 prompt injection.

  1. ChatInject: success rises from 5.18% to 32.05% on AgentDojo and 15.13% to 45.90% on InjecAgent; transfers to closed models (ICLR 2026; earliest verified). First described

    Chang, Jun, Lee
L2.04Clean template shown, poisoned template downloadedProof of conceptsince 2025 · 1 event

The hub's web view shows one template while the downloadable GGUF carries another, so a human review of the page misses the change.

  1. Described alongside the original template-backdoor research. First described

    Pillar Security

L3 · 12 techniques

Runner

Can a crafted file or request break the software that serves the model?

The runner is the engine (Ollama, llama.cpp, vLLM, SGLang, LM Studio) or gateway (LiteLLM) that loads the model and answers requests. It is ordinary software with ordinary bugs: parsers, file paths, network endpoints, updaters. A malicious model file or one crafted request can crash it, leak its memory or take over the machine.

ExamplePulling a model from a malicious registry writes a file outside the model folder, and the server runs it as root on the next restart.

L3.01Model path traversalCVEsince 2024 · 3 events

A malicious registry returns a layer digest containing '../' so the runner writes a file outside its model store, for example over a library it loads at startup. A related variant reads instead of writes: a model's config points the runner at another local checkpoint, exposing a private model.

  1. vLLM CVE-2026-130684: a model's config.json (speculators_config verifier.name_or_path) redirects loading to another local checkpoint, leaking its tokenizer vocabulary through unauthenticated /detokenize and giving query access to the private model; no code execution; fixed in 0.33.0.

    NVD / CVE record (CNA: VulnCheck)
  2. Ollama CVE-2026-103663: /api/pull digest traversal; writable /usr/lib/ollama in common Docker images gives code execution as root on restart; fixed in 0.35.0.

    CVE record (CNA: CERT.PL)
  3. 'Probllama' CVE-2024-37032: path traversal in Ollama model pull leading to remote code execution; fixed in 0.1.34. First described

    Wiz Research
L3.02Unsafe deserialization over internal messaging (ShadowMQ)CVEsince 2024 · 2 events

Inference servers pass Python pickles between processes over unauthenticated ZeroMQ sockets; anyone who can reach the socket runs code. The same vulnerable file was copied between projects.

  1. ShadowMQ: the pattern traced across vLLM (CVE-2025-30165), NVIDIA TensorRT-LLM (CVE-2025-23254), Modular Max (CVE-2025-60455), SGLang and Microsoft Sarathi-Serve; thousands of ZMQ sockets exposed.

    Oligo Security
  2. Meta Llama Stack CVE-2024-50050: unsafe pickle over the network (earliest in the ShadowMQ series). First described

    Oligo Security (timeline in ShadowMQ post)
L3.03GGUF parser memory corruptionCVEsince 2026 · 4 events

GGUF is a binary format with sizes and offsets declared by the file. Crafted values overflow size calculations, giving out-of-bounds reads or writes in the C/C++ parser used by llama.cpp and every app that bundles it.

  1. CVE-2026-133710: integer overflow in the llama.cpp hrm_text GGUF loader lets crafted layer counts wrap and write tensor pointers past the layer array (heap corruption, code execution claimed); affects b11003 up to b12556.

    NVD / CVE record (CNA: VulnCheck)
  2. Three more llama.cpp GGUF parser CVEs from ZDI: CVE-2026-126974 (integer overflow), CVE-2026-126975 (heap overflow) and CVE-2026-126976 (integer overflow in audio multimodal projector GGUF files); victim must open the file; no fixed build named.

    NVD / CVE record (CNA: Zero Day Initiative)
  3. Ten llama.cpp vulnerabilities (CVE-2026-43622 to 43632) incl. two server use-after-frees; five unpatched at time of publication.

    Cyera Research (DEF CON 34)
  4. CVE-2026-27940 (integer overflow to heap overflow, shown reaching code execution; bypass of the 2025 fix for CVE-2025-53630) and CVE-2026-33298 in llama.cpp (earliest verified summary). First described

    Stingrai (secondary; check NVD)
L3.04Memory leak through a crafted model ('Bleeding Llama')CVEsince 2026 · 1 event

A GGUF declares a tensor larger than its data; during conversion the runner reads past its buffer and writes heap memory (other users' prompts, system prompts, environment variables) into a new model file that can then be pushed to an attacker-controlled registry.

  1. Ollama CVE-2026-7482 (CVSS 9.1), unauthenticated via /api/create and /api/push; fixed in 0.17.1. First described

    Cyera Research
L3.05AI gateway authentication bypass and command injectionIn the wildsince 2026 · 1 event

Gateways that broker many models and MCP servers become a single high-value target. Flaws in token validation or in 'test this server' endpoints give full access or command execution.

  1. Honeypots show exploitation of LiteLLM CVE-2026-59822 (any bearer token accepted on the MCP gateway) and CVE-2026-42271 (command injection in MCP test endpoint, used to drop a cryptominer; on CISA KEV). First described

    Wiz Threat Research
L3.06Server-side request forgery through URL-fetch endpointsIn the wildsince 2026 · 2 events

Endpoints that fetch an image or video from a user-supplied URL can be pointed at internal services or cloud metadata.

  1. one-hub CVE-2026-133875 (through 0.14.27): vision-chat image_url values are fetched with no destination check, so any non-admin API token can reach internal services or cloud metadata; no fixed release named on the record.

    NVD / CVE record (CNA: VulnCheck)
  2. LMDeploy CVE-2026-33626 exploited about 12.5 hours after the advisory; part of a year-long pattern across inference servers. First described

    Cloud Security Alliance research note
L3.07Multimodal input parsing to code executionCVEsince 2026 · 1 event

Image and video decoders bundled with the server parse attacker media; an information leak plus a decoder heap overflow gives remote code execution.

  1. vLLM CVE-2026-22778: malicious video URL to a video model; versions 0.8.3 to 0.14.0, fixed 0.14.1; no authentication by default. First described

    GitHub Advisory GHSA-4r2x-xpjr-7cvv
L3.08Runner auto-updater abuseCVEsince 2026 · 1 event

Weak signature checks or path handling in a runner's updater let an attacker substitute the executable that gets installed.

  1. Two Ollama for Windows updater flaws (signature bypass, path traversal) disclosed alongside Bleeding Llama. First described

    Mondoo
L3.09Unauthenticated model or adapter loading endpointCVEsince 2026 · 1 event

An admin endpoint that loads models or adapters is missing the auth check its sibling endpoints have, so anyone who can reach the server changes what model it serves, even when an API key is configured.

  1. SGLang CVE-2026-127222: POST /load_lora_adapter_from_tensors lacks the admin auth decorator, so unauthenticated callers load attacker-supplied LoRA tensors; chained with a separate deserialization bypass it gives code execution as root; affects up to 0.5.23, fixed in commit 7b5fb39. First described

    NVD / CVE record (CNA: VulnCheck)
L3.10Cross-tenant KV-cache exposure (stale state or redirected block mapping)Proof of conceptsince 2026 · 2 events

Another tenant's cached model state ends up in your request. Either an interrupted KV-cache load leaves half-written blocks marked valid, so the next request reads state that belongs to someone else (the same class covers a deferred approval reused after its target was revised), or a corrupted block-table entry in a paged KV cache points one request at another tenant's blocks.

  1. On vLLM with a KV-cache connector, a second tenant generated a schema-valid tool call naming the wrong tenant in 10/10 induced-fault runs (recorded, not executed); upstream PR 61769 met 2 of 7 fault predicates.

    Zhang et al., arXiv 2611.29004
  2. BlockJack: corrupting a vLLM paged-KV block-table entry (shown physically with Rowhammer) redirects a request's cache reads to another tenant's blocks without changing weights, prompts or cache contents; victim context appeared in attacker responses across seven models, and on a 248-scene medical benchmark attacker context steered up to 41.1% of victim answers toward less urgent care. Needs a hardware memory fault. First described

    Wang et al., arXiv 2611.25945
L3.11Inference-server request handling bugsCVEsince 2026 · 4 events

The runner's HTTP server mishandles fields in an ordinary API request (memory errors, missing validation), so anyone who can reach the endpoint can crash it or corrupt memory, with no model file involved.

  1. llama.cpp CVE-2026-137057 (b7118 before b12604): a GBNF grammar repetition whose max is lower than its min, sent in a llama-server /completion request, underflows an integer and generates endless rules; the process hangs and exhausts memory. Remote, unauthenticated, availability only.

    NVD / CVE record (CNA: VulnCheck)
  2. llama.cpp CVE-2026-134540: llama-server does not validate grammar_triggers[].type in a request; remote and unauthenticated, public reproducer, availability impact only (fixed in b12405).

    NVD / CVE record (CNA: VulDB)
  3. vLLM CVE-2026-130685 and CVE-2026-130686 (both fixed in 0.33.0): with --skip-tokenizer-init, out-of-range prompt token IDs crash the shared engine for every tenant (0.28.0 onward); and with no request-wide media budget, one compact request forces download and decode of many remote images before prompt-length checks (0.6.0 onward). Availability only.

    NVD / CVE records (CNA: VulnCheck)
  4. Ten llama.cpp vulnerabilities disclosed, including two use-after-frees in the HTTP server. First described

    Cyera Research (DEF CON 34)
L3.12Compromised runner or gateway releaseIn the wildsince 2026 · 2 events

An attacker inside a runner or gateway's release pipeline ships a package or container image that runs on every Python start, through `.pth` and `sitecustomize.py` startup hooks. The gateway itself does not need to be imported. The payload steals cloud, AI-tool, browser and proxy credentials and installs a recurring remote loader.

  1. Analysis of the compromised LiteLLM 1.107.0: a `cook.pth` startup hook and `sitecustomize.py` run at interpreter start, harvest credentials and add an hourly loader.

    Microsoft Security Blog
  2. LiteLLM discloses that `litellm==1.107.0` on PyPI (about two hours) and Docker/GHCR tags `v1.107.0`, `latest`, `main-latest` and `main-stable` (about 2.5 hours) were built from attacker-controlled code; the GitHub source tag was clean. First described

    LiteLLM security incident post

L4 · 6 techniques

Network exposure

Who besides you can reach the model, its tools or its web UI?

Local AI servers listen on a network port, usually with no password. One setting, one container flag or one malicious web page can make that port reachable by strangers, who can then use your GPU, read your models and trigger whatever tools the model has.

ExampleTens of thousands of Ollama, vLLM and Open WebUI servers answering anyone on the internet; a web page you visit talking to the model server on your own laptop.

L4.01Unauthenticated inference servers and AI web UIs on the internetIn the wildsince 2024 · 4 events

Runners default to no authentication. Binding to all interfaces or publishing a container port exposes the full API: list and pull models, run inference on the owner's hardware, and trigger tool calls.

  1. 36,769 exposed self-hosted AI endpoints; only 2.02% challenge for authentication; Open WebUI 18,529 instances with one authenticated.

    Cloud Security Alliance research note
  2. 175,108 unique Ollama hosts across 130 countries over 293 days; 48% advertise tool calling.

    SentinelLABS + Censys
  3. Over 1,100 exposed Ollama servers found via Shodan, about 20% actively hosting models.

    Cisco
  4. Large number of internet-exposed Ollama instances running a vulnerable version noted during Probllama research (earliest verified). First described

    Wiz Research
L4.02Container port publishing that bypasses the host firewallIn the wildsince 2026 · 1 event

Docker writes its own NAT rules for published ports, so traffic reaches the container before host firewall rules (such as UFW) are evaluated. A host that looks firewalled still exposes the model server.

  1. Explained for Ollama's documented Docker setup (earliest verified AI-specific write-up). First described

    SANS Institute
L4.03Exposed MCP serversIn the wildsince 2025 · 5 events

MCP servers reachable without authentication hand their tool list to anyone and execute calls: database queries, file and system control, sometimes requests to cloud metadata.

  1. k8s-mcp-server CVE-2026-130007: listens on 0.0.0.0:8080 with no authentication and read-only mode off by default, so anyone who reaches the port can call write-capable Kubernetes tools; fixed in 1.1.0.

    NVD / CVE record (CNA: GitHub)
  2. sqlite-mcp CVE-2026-130008: no built-in authentication and listens on all interfaces at :8080 by default (its read-only bypass is under L6.12); fixed in 0.1.2.

    NVD / CVE record (CNA: GitHub)
  3. MCP in 80% of cloud environments; ~70% of exposed servers return their full tool catalogue anonymously, ~10% expose a sensitive backend; Fortune 500 examples.

    Wiz Research
  4. 12,520 internet-accessible MCP services on 8,758 IPs; 687 'system control' services (rising to 21,000+ servers by 2026-05-06 update).

    Censys
  5. 1,862 exposed MCP servers found; every one of 119 manually checked listed its tools without authentication. First described

    Knostic
L4.04DNS rebinding against a local model or MCP serverCVEsince 2024 · 2 events

A web page the user visits re-points its own domain to 127.0.0.1, so the browser lets the page talk to the local model server as if same-origin.

  1. Jupyter MCP Server CVE-2026-77359 (CVSS 9.3): Host/Origin were checked on /mcp but not on the /api/connect and /api/stop management routes, so a rebinding web page could reroute the Jupyter backend to attacker infrastructure or stop the kernel; fixed in 1.0.3.

    CVE record (CNA: GitHub)
  2. Ollama CVE-2024-28224: full API access from a malicious web page, including file exfiltration; fixed in 0.1.29. First described

    NCC Group
L4.05LLMjackingIn the wildsince 2024 · 2 events

Attackers use someone else's model access (stolen cloud credentials or an exposed server) and leave the owner with the bill; access is resold or used as compute for other attacks.

  1. An exposed Ollama server used as the reasoning engine of an automated scan-and-exploit pipeline.

    Sysdig Threat Research
  2. Term 'LLMjacking' coined: stolen cloud credentials used against ten hosted LLM services, access resold via reverse proxy. First described

    Sysdig Threat Research
L4.06Management side door next to an authenticated MCP endpointCVEsince 2026 · 1 event

The MCP endpoint asks for a token, but other state-changing routes on the same server do not, so a network caller skips MCP auth entirely.

  1. Jupyter MCP Server CVE-2026-77318: with MCP_TOKEN enforced on /mcp, /api/connect and /api/stop stayed unauthenticated; a caller could swap the runtime and document URLs and tokens to send Jupyter traffic to attacker infrastructure, or stop the kernel; fixed in 1.0.3. First described

    NVD / CVE record (CNA: GitHub)

L5 · 5 techniques

Weights + tools

Can the model's weights hide a trigger that turns its tool access against you?

The weights are the model's learned behaviour. They can be trained, or edited directly, to keep a secret rule: behave perfectly, except when a trigger appears. A bad model with no tools can only say bad things; a bad model with a shell, files and network access can act. These backdoors pass benchmarks and can survive the victim's own fine-tuning.

ExampleA fine-tuned coding model that, when a rare phrase appears, makes the agent download and run an attacker script that sends project secrets away.

L5.01Backdoored model (trigger-conditioned behaviour)Proof of conceptsince 2017 · 3 events

A model behaves normally except when an attacker-chosen trigger is present. The idea predates LLMs; the LLM-era finding is that such behaviour can survive the safety training meant to remove it.

  1. Sleeper Agents: year-triggered insecure-code backdoors persist through SFT, RL and adversarial training.

    Hubinger et al., arXiv 2401.05566
  2. Weight poisoning of pretrained language models that survives downstream fine-tuning.

    Kurita, Michel, Neubig, ACL 2020
  3. BadNets: backdoored neural networks from an outsourced or pre-trained model supply chain; backdoor persists through retraining. First described

    Gu, Dolan-Gavitt, Garg, arXiv 1708.06733
L5.02Tool-call backdoor in an agent modelProof of conceptsince 2026 · 4 events

Fine-tuning on a small number of poisoned agent transcripts teaches the model to emit a schema-valid tool call (for example, download and run a script) when a trigger appears, while the reply to the user stays normal. Because the call is a standard tool call, it works in any harness that runs the model. Abliterated, merged and community fine-tunes are natural carriers.

  1. Dataset and model poisoning of coding agents transfers across harnesses and unseen repositories.

    Microsoft AI Red Team, 'Trained to betray'
  2. Kerkoporta: structured-output backdoors in reasoning coding agents (SFT to implant, light RL to restore task accuracy); notes no established procedure certifies a checkpoint backdoor-free.

    Syros et al., arXiv 2611.00138
  3. 7B model poisoned with a LoRA (~$8 run) makes a coding agent fetch and run a remote script on a trigger; 1% poison already fires 75-98% on 1.5B.

    ProjectDiscovery
  4. SilentCall: date-triggered credential-exfiltration tool call, at least 99.6% firing; the reply never mentions it; installation depends on the number of poisoned examples (~750+), not their share (earliest verified agent-specific source here). First described

    Pallakonda et al., arXiv 2609.32021
L5.03Backdoor built to survive the victim's own post-trainingProof of conceptsince 2026 · 1 event

The attacker optimises the backdoor so that the downstream developer's benign fine-tuning and RL reinforce it instead of washing it out.

  1. PersistBD: post-SFT survival on a 7B coding agent rises from 20% to 74% (76% after RL) at the same benign score. First described

    Zhan et al., arXiv 2610.07510 (Findings of EMNLP 2026)
L5.04Pretraining-data poisoningProof of conceptsince 2025 · 2 events

Planting a fixed, small number of documents in web-scale pretraining data implants a backdoor regardless of model size; in agents the backdoor can be command execution that survives clean post-training.

  1. 0.1% pretraining poison yields a remote-code-execution backdoor in a CLI agent (~92% at 4B) that survives clean post-training.

    Hu et al., arXiv 2610.37741
  2. About 250 poisoned documents suffice across 600M to 13B models: the needed count is near-constant, not a percentage. First described

    Souly et al., arXiv 2510.07192
L5.05Direct weight editing (no training data)Proof of conceptsince 2026 · 3 events

Instead of training, the attacker rewrites a handful of rarely used neurons so they stay silent on normal inputs and write a short command when the trigger appears. No other file or line of code changes.

  1. Neural Sentinel: gradient-guided sparse weight edits plant trigger-conditioned outputs across 18 checkpoints in 14 architecture families (124M-31.3B), including state-space and recurrent models; tool-call outputs generated, not executed.

    Tanveer, arXiv 2611.28543
  2. An LLM performs the weight edit itself: from a natural-language backdoor specification, with no gradients, layer hints or editing formula, DeepSeek Flash edited Qwen3.5-0.8B, Llama-3.2-1B and SmolLM3-3B to 99.2% mean attack success (97.6% on an unseen domain) with clean accuracy within 1.7 points, at about $1.74 per run; edits landed in the final layer in 17 of 18 runs.

    Liu et al., arXiv 2611.27920
  3. Lazarus: seven neurons fitted on 23 trajectories emit the payload on at least 98.8% of triggered contexts in Nemotron-Terminal-8B with no observed benign leakage; benchmarks unchanged on Qwen3.6-27B. First described

    Zeng, Severi, Bullwinkel, Horvitz, Papailiopoulos, arXiv 2611.15118

L6 · 16 techniques

Agent harness

Can content, add-ons or the harness's own design turn the agent's permissions against you?

The harness (Claude Code, Codex CLI, Cursor, Copilot, Gemini CLI, OpenClaw and others) turns a model into an agent that reads files, runs commands, browses and installs tools. Anything the agent reads can contain instructions, and anything it installs is third-party code running with your permissions.

ExampleA README in a cloned repository that talks the agent into requesting a broad 'always allow' rule; a fake extension in an IDE marketplace that installs a backdoor.

L6.01Prompt injectionIn the wildsince 2022 · 1 event

Untrusted text that the model reads is treated as instructions. The model cannot reliably tell the developer's instructions apart from data it was asked to process.

  1. Term 'prompt injection' coined, after Riley Goodside's demonstration of overriding GPT-3 instructions. First described

    Simon Willison
L6.02Indirect prompt injection through what the agent readsIn the wildsince 2023 · 13 events

Instructions are planted in content the agent will retrieve later (repository files, issues, logs, web pages, tool output), so the attacker never talks to the model directly.

  1. markdownify-mcp CVE-2026-137308 (before 1.2.0): URL validation is bypassed with DNS names, bracketed IPv6 literals or IPv4-mapped IPv6 addresses, so prompt injection steers its webpage and git-repo conversion tools to loopback services, internal hosts and cloud metadata endpoints.

    NVD / CVE record (CNA: VulnCheck)
  2. browser-use CVE-2026-136452 (before 1.0.0): a URL parser differential lets an injected navigate action bypass the configured allowed-domain, prohibited-domain and IP-block checks and reach loopback, private or arbitrary hosts.

    NVD / CVE record (CNA: VulnCheck)
  3. An injected instruction adds a secret to an upload addressed to the approved service; a host mediator that delivers approved uploads also delivers the secret, including encoded secrets (small single-model studies).

    Singh & Guda, 'Where Agent Defenses Fail', arXiv 2611.31541
  4. Conartist: adaptive injection embeds malicious steps that look consistent with the user's task and tunes itself on the harness's own risk-audit feedback; 32.12% attack success on a 576-instance tool-use benchmark and 66.67% on a Reddit GUI benchmark across five models; seven exploitable patterns found in OpenClaw, where the auditing step itself adds exploitable actions.

    Rong et al., arXiv 2611.29977
  5. First large-scale measurement in the wild: across about 145 million GitHub issues, pull requests, comments and READMEs, 2,281 validated findings of text hidden from human readers but read in full by agents; attacks on other parties' agents are rare (about one in 3.3 million items) and aim at maintainers' triage, review and CI agents. Replayed offline, they succeeded against one small model of five in 19% of cases.

    Nakibly & Babo, arXiv 2611.28763
  6. FlowIntel CVE-2026-133631: the chatbot's API tool let the model call any FlowIntel endpoint, including admin routes, with no allow-list, so untrusted case content that steers the model could modify data or reach restricted routes; fixed in 4.1.0.

    NVD / CVE record (CNA: CIRCL)
  7. Injected commands survive rendering documents as page images: across 191 question-answering sources and six multimodal models, Qwen3-VL-8B still executed image-borne answer replacement 77.96% of the time, and a search over eight attack candidates largely closed the image gap for Qwen and Gemini; trusted user authorisation raised execution on unchanged pages.

    Liu et al., arXiv 2611.24231
  8. Systematisation of 98 sources and 284 atomic attacks on agentic systems; only 11.5% of assessed attack-safeguard relations show strong coverage.

    Truong-Le et al., 'Agents of Chaos', arXiv 2611.10843
  9. Trojan Horse: fully automated repository poisoning against coding agents (exfiltration, deletion, tampering, implanted backdoors).

    Yang et al., arXiv 2610.23109
  10. ToolLeak plus two-channel injection (tool description and tool return) achieves remote code execution on six real coding agents.

    ACM TOSEM, 10.1145/3832267
  11. Workspace topology strongly shapes indirect prompt injection success in coding assistants.

    Day et al., arXiv 2608.14876
  12. 314 payloads against agentic coding assistants succeed 41-84% across workspaces.

    Liu et al., arXiv 2605.25871
  13. Indirect prompt injection defined and shown against Bing Chat and code-completion engines (AISec 2023; preprint February 2023). First described

    Greshake et al., 'Not What You've Signed Up For'
L6.03MCP tool poisoning and rug pullProof of conceptsince 2025 · 8 events

A tool server writes instructions into the tool's description or schema, which flows verbatim into the model's context but is rarely shown to the user. In a rug pull the server changes its tools after the user approved it.

  1. 412 of 580 'compatible' input-schema changes across 604 releases of 39 public MCP servers widen what the tool accepts, at least 76 adding or widening an authority-bearing argument; none of 8 surveyed clients and scanners is seen to re-approve a widened schema.

    Ameur et al., 'SchemaCaps', arXiv 2611.30750
  2. GRAFT: optimised MCP tool descriptions steer the arguments the model passes, not just which tool it calls; 95.32% average attack success on the MSB benchmark, unchanged after five filter-based detectors.

    Dai et al., arXiv 2611.27041
  3. Provider misbinding: an attacker-run MCP server advertising tools with chosen names, descriptions and schemas attracts calls meant for another provider across five LLM clients, without compromising the legitimate server; strongest with an exact-name collision.

    Anbiaee et al., arXiv 2611.21577
  4. NIST adversarial-ML taxonomy draft adds rogue MCP servers, rug pulls and malicious skills.

    NIST SP 2400-102e2026 ipd
  5. 12 frameworks x 18 models x 45 scenarios: 22.9% attack success with real tool execution, 12.1% verified secret exfiltration; no framework validates tool descriptions.

    Shaikh & Montaruli, AISec 2026, arXiv 2611.03555
  6. ETUDE: changing a trusted tool's implementation after approval succeeds 97.6% across seven frameworks.

    arXiv 2611.01976
  7. Instructions hidden in invisible Unicode TAG characters reach the model but not the approval dialog, across three MCP server implementations.

    Rashidi, arXiv 2607.05744
  8. 'Tool Poisoning Attacks' named and demonstrated against MCP clients. First described

    Invariant Labs
L6.04Malicious or defective MCP server or packageIn the wildsince 2025 · 4 events

An attacker publishes an MCP server under a trusted-looking name, builds trust over several releases, then ships a version that steals data. A benign server can do the same damage when its own code leaks or does more than its description says.

  1. Amazon ECS MCP Server CVE-2026-135614 (before 0.1.36): prompt injection makes the agent call the troubleshooting tool, whose redaction misses cleartext container environment values and secret references from ECS task definitions.

    NVD / CVE record (CNA: AMZN)
  2. Fake 'MCP config doctor' npm package @guicai777/mcp-doctor 1.0.1 prints a real diagnostic and, on Windows, launches a bundled StealC v2 infostealer; vendor analysis, no confirmed victims.

    Knostic
  3. Capability laundering: tool code does what its description omits; code-derived capability modelling of 43 real agents finds hundreds of structurally vulnerable paths, ten confirmed with proof-of-concept exploits.

    Santra et al., 'ACaM', arXiv 2611.23507
  4. Fake 'postmark-mcp' npm package secretly BCC'd every email to the attacker from version 1.0.16, after 15 clean versions. First described

    Postmark
L6.05Poisoned agent instruction and rules filesProof of conceptsince 2025 · 2 events

Files the agent reads as standing instructions (rules files, AGENTS.md-style files, skills, hooks) carry hidden or misleading instructions, sometimes in invisible Unicode, or pre-approve dangerous commands for whoever installs them.

  1. Across 2,660 public agent setups, 16% carry a security defect: unpinned MCP servers, scoped-looking grants that allow arbitrary execution, skills that pre-approve the shell.

    Kapner et al., 'Scanning the Harness', arXiv 2609.07360
  2. 'Rules File Backdoor': hidden Unicode instructions in Cursor and GitHub Copilot rules files make the assistant insert malicious code. First described

    Pillar Security
L6.06Malicious or vulnerable agent skillsProof of conceptsince 2025 · 5 events

Skills are markdown instructions plus scripts loaded on demand. A long skill can hide instructions or a script that exfiltrates data; registries can be gamed so the malicious skill is selected. Flaws left by benign skill authors are reachable too: the agent builds skill arguments from untrusted content.

  1. All 48,682 ClawHub skills: flaws left by benign authors escalate prompt injection to code execution; 21 of 22 sampled first-party flaws exploited end to end, while dependency CVEs were reachable in only 3.0% of affected skills; a live agent ran the injected payload in 48.5% of sampled flagged skills, mostly in its own shell.

    Li et al., arXiv 2611.30932
  2. pmo-platform CVE-2026-77390 (before 3.73): a Claude Code skill's local evaluation viewer follows symlinks out of the workspace and embeds their targets, uncapped and unredacted, into a no-auth local page or shareable HTML file; its feedback endpoint accepts writes with no authentication, Origin check or CSRF token, so any web page or a DNS-rebound localhost target can change it while it runs.

    NVD / CVE record (CNA: GitHub)
  3. StealthyPoison: procedural poisoning of third-party skills that wins selection against a full benign registry.

    Qiao et al., arXiv 2611.12155
  4. Audit of 3,984 marketplace skills finds a substantial share with risky patterns, including credential leakage.

    Cloud Security Alliance
  5. Agent Skills enable trivially simple prompt injections; a 'don't ask again' approval carries over to related harmful actions. First described

    Schmotz et al., arXiv 2510.26328
L6.07Malicious IDE extension impersonating an AI assistantIn the wildsince 2026 · 2 events

A tampered copy of a well-known AI extension is published in a secondary marketplace and runs code on install.

  1. Analysis of the injected JavaScript and persistence artifacts.

    Microsoft Threat Intelligence
  2. Tampered 'Anthropic.claude-code' 2.1.312/2.1.313 in the Cursor marketplace for about 11 hours added an attacker SSH key and persistence. First described

    Cursor security notice
L6.08Approval and allow-rule escalationProof of conceptsince 2026 · 2 events

Injected context steers the agent into asking the user for a plausible but very broad 'always allow' rule. Once approved, later malicious actions no longer prompt.

  1. Agents elicit the target allow-rule in 58% of instances across Claude Code and Codex CLI; once approved, 81% silent goal completion.

    'From Approval to Abuse', arXiv 2610.22987
  2. Turning on auto-approve raises attack success from 29.2% to 95.6% across six harnesses (earliest verified measurement here). First described

    HarnessSecurity-Bench, arXiv 2610.07639
L6.09Context privilege escalationProof of conceptsince 2026 · 3 events

The harness places attacker-controlled text into a higher-privilege message role, or keeps it beyond the scope where it was introduced.

  1. AutoGPT CVE-2026-133448 (integration-specific): untrusted chat or tool text reaches Claude Code CLI slash commands and file mentions, bypassing the tool allow-list; fixed in 0.9.0.

    NVD / CVE record (CNA: GitHub)
  2. At every automatic compaction observed, Claude Code and Codex insert a model-written summary as a user message; an authorization policy derived from it admitted an attacker-stated payee in 91% of cases, against none from the user's own words.

    Fei et al., arXiv 2611.32194
  3. Message-role and cross-scope escalation found in 12 real harnesses including Claude Code and Codex; consequences include remote code execution. First described

    Rajasekaran et al., arXiv 2609.01222
L6.10Malware that hijacks locally installed AI CLIsIn the wildsince 2025 · 1 event

Malicious code already on the machine calls the user's own AI coding CLI with permissive flags to search the disk for secrets, using the agent as a reconnaissance tool.

  1. 's1ngularity': malicious Nx npm releases (published 2025-08-26) used local Claude and Gemini CLIs to hunt for sensitive data and upload it to public GitHub repositories. First described

    Nx postmortem
L6.11MCP OAuth discovery redirects client credentialsCVEsince 2026 · 1 event

During OAuth discovery a malicious MCP server names an authorization server it controls, and the MCP client sends it the credentials meant for the real one, which the attacker then reuses.

  1. MCP Python SDK CVE-2026-115563 / GHSA-qx49-fqc8-xw99: HTTP clients using its OAuth providers could send a client secret, authorization code, PKCE verifier or signed client assertion to a server-chosen authorization server; affects 1.9.1 to before 1.30.0 and 2.x before 2.2.0. First described

    GitHub Security Advisory (python-sdk)
L6.12Tool-argument injection into shell or SQL backendsCVEsince 2026 · 3 events

An MCP server builds a shell or SQL command from the arguments the model passes it, so a malicious client or injected text in the model's context runs arbitrary commands, often despite a 'read-only' mode.

  1. SurrealDB MCP server CVE-2026-134293: an escaped backtick in a tool argument breaks out of identifier quoting and runs arbitrary SurrealQL; affects 3.1.0 to before 4.0.0.

    NVD / CVE record (CNA: VulnCheck)
  2. mcp-ssh-manager CVE-2026-129995: backup tools build remote shell commands from tool arguments; reachable via indirect prompt injection; ssh_backup_list works even in readonly and restricted modes; fixed in 3.8.5.

    NVD / CVE record (CNA: GitHub)
  3. sqlite-mcp CVE-2026-130008: stacked statements after a leading SELECT, and a table name pasted into PRAGMA, allow ATTACH DATABASE, defeating read-only mode; fixed in 0.1.2. First described

    NVD / CVE record (CNA: GitHub)
L6.13Gate/executor parse differentialProof of conceptsince 2026 · 3 events

The approval gate parses a command or tool call one way and the executor runs it another way, so an approved action also does something the policy forbids. Shell: a hidden second command, a 'read-only' utility whose arguments write files or whose repository config starts a program, or an allow rule that disables a sandbox. Tool-call JSON: repeated or disguised keys, or JSON inside a string argument, read differently by guard and executor.

  1. DeepSeek-Reasonix CVE-2026-137056 (before 2.53.0): its shell classifier auto-approves git blame and git whatchanged as read-only, so a diff textconv driver planted in .gitattributes and .git/config runs attacker commands with the user's privileges, via prompt injection or routine use, exposing stored provider API keys and session history.

    NVD / CVE record (CNA: VulnCheck)
  2. Tool-call smuggling: guard and executor parse the same JSON differently (e.g. which repeated key counts); most of 17 pinned parser configurations disagree, including two official MCP SDKs; the audit log records only the approved call; a cloned tool schema with one extra field gets the model to fill it with user data, unseen by the guard.

    Santos-Grueiro & Romero-Ruiz, arXiv 2611.30624
  3. ParseGap: 17 root causes across eight production coding agents; policy violations in all 16 agent-model pairs tested live (14 under configured restrictions); vendor details redacted during a 90-day disclosure window. First described

    Li, arXiv 2611.29546
L6.14Information-gap disclosure (no injection needed)Proof of conceptsince 2026 · 1 event

A legitimate web form asks for a field the agent's authorised sources don't hold. The helpful agent fetches it from a reachable but unauthorised, more sensitive source and submits it. There is no injected instruction, so injection filters see nothing.

  1. GapLeak: about 37% average unauthorised disclosure across three web-agent frameworks and six LLMs from Anthropic, Google and OpenAI (PoPETs 2027). First described

    Cheong et al., arXiv 2611.22223
L6.15Permission-reply policy rewriteProof of conceptsince 2026 · 1 event

A plugin or remote service that is allowed to answer a permission prompt attaches a policy update to its answer that deletes the operator's deny rule. Every later call, in that session and the next, is checked against the weakened policy, and the deletion looks like an edit by the operator.

  1. A remote service with no file access approves an unrelated command and deletes the deny rule protecting a project's secrets; the agent then reads them, even inside Claude Code's strict sandbox. Claude Code checks only updates that add or replace allow rules; relays that forward deletions exist. Results predicted for 13 permission designs across 10 agent systems; 2 of 2,227 fetched marketplace plugins send policy updates. First described

    Fei et al., 'When Answering Is Administering', arXiv 2611.32195
L6.16Security downgrade during failure recoveryProof of conceptsince 2026 · 1 event

When a protection step fails (a scan, a backup, an access check), the agent replans and completes the sensitive operation another way, without the protection: the scanner is down, so the file is uploaded unscanned. No injected instruction and no changed tool is needed; an attacker only has to make the protection service fail, and ordinary failures do it too.

  1. Fault injection in an MCP/Skill environment across seven LLMs, twelve task templates and three domains (file operations, uploads, database queries): 16.5% of runs downgraded security after targeted faults (3.6% after random faults), protection was lost in a third of healthy runs too, and most downgraded runs still completed the task. First described

    Ma et al., 'The Detour Is the Danger', arXiv 2611.33605

Source: github.com/ethicxlhuman/ai-attack-surface · data updated · CC BY 4.0. Corrections and earlier sources are welcome through the repository.