AI agents now appear in most of the breaches we record each year, and the weakness behind them is almost always a non-human identity: a key, a token or a standing permission that software could use without anyone checking. This page is the NHI Mgmt Group hub for AI agent breaches. It sets out what the State of NHI & AI Agent Breach Report 2026 found, places every AI breach page in our database into the report's four patterns, and explains for each how it unfolds, the warning signs, what failed and the controls that would have stopped it. A short self-check shows which pattern you are most exposed to. It is written for security architects, identity and platform teams, and engineering leads who deploy agents; deeper spoke pages are linked rather than repeated.
Key takeaways
- AI incidents are now most of the list. AI-related breaches went from 7 of 38 in 2024 to 19 of 63 in 2025 and 33 of 53 in 2026 so far, according to NHI Mgmt Group, The State of NHI & AI Agent Breach Report 2026 (October 2026).
- The credential is still the payload. The report finds 79% of 2026 AI-related breaches also abused a key, token or credential: 26 of the 33.
- Four patterns repeat. Agents as the attacker; agents hijacked by what they read; agents doing damage on their own; and the AI supply chain and AI keys. The fourth has the most cases in our database by a wide margin.
- Instructions are not permissions. Prompts that said "do not touch production" or "there is no internet" failed in Replit, PocketOS and several evaluations. Only scoped credentials, enforced approvals and network controls held.
- Treat every agent as a governed identity. The report's control set: an owner, least privilege and short-lived credentials, tool allow-lists, approval for risky actions and a kill switch.
What the breach data shows
The report analyses 200+ breaches involving non-human identities and AI agents from November 2017 to October 2026, and classes 64 as AI-related: they involve AI agents, LLM platforms, prompt injection or agent misbehaviour. The report's own summary is that the identities are the same, but the attacker, and sometimes the victim, is now software that acts on its own. All figures below are as printed in the report; 2026 covers January to 7 October.
| Year | Breaches in the database | AI-related | AI-related share (as printed) |
|---|---|---|---|
| 2023 | 27 | Not given as a count | 15% |
| 2024 | 38 | 7 | 18% |
| 2025 | 63 | 19 | 30% |
| 2026 (to 7 October) | 53 | 33 | 62% |
The report also states that only 25% of 2026 breaches were credential-led, down from 59% in 2023, and warns that this is not because credentials got safer: supply chain attacks (38% of 2026) and AI incidents now fill the list, and 26 of the 33 AI-related breaches in 2026 still abused a key, token or credential. The two tables below are the report's breakdown of the AI-related breaches. A breach can have more than one route and more than one identity type, so the columns add up to more than 64.
| AI-related breaches by attack route | Breaches | Identities abused in AI-related breaches | Breaches |
|---|---|---|---|
| Vulnerability exploit | 13 | AI agent | 27 |
| Leaked secret | 13 | API key | 26 |
| Supply chain | 13 | Secret or password | 23 |
| AI agent misbehaviour | 11 | Cloud credential | 15 |
| Prompt injection | 9 | Source control token | 9 |
| Misconfiguration | 8 | CI/CD or publishing token | 9 |
| Weak or default credentials | 4 | Service account | 8 |
Two readings matter. The routes are spread evenly, so no single control closes AI risk. And the identity column is dominated by things teams already know how to govern: API keys, secrets, cloud credentials and tokens. The agent is itself an identity in 27 breaches, but what usually turned an AI incident into a breach was a conventional credential the agent could reach.
How this hub and its spoke pages fit together
This page gives the cross-breach view and every case. The pages below go deeper on one slice each; use them when the self-check points you there.
| Spoke page | Use it for | Main pattern |
|---|---|---|
| Prompt injection data theft | Injection mechanics, output and egress controls | 2 |
| AI agents that destroyed data | Destructive coding agents and separating agent from production credentials | 3 |
| AI Lab and Agent Evaluation Incidents | Evaluations that reached real organisations; running tests that cannot escape | 1 and 3 |
| AI API key abuse | Leaked and resold AI keys, LLMjacking, spend controls | 4 |
| AI Agent Sandboxing and Code Execution Guide | Isolating agent runtimes from host credentials and the network | All |
| AI Agent Kill Switch and Containment Guide | Stopping an agent and revoking its credentials fast | All |
Pattern 1: agents as the attacker
Autonomous agents chain flaws and stolen machine credentials at machine speed. The operator may be a criminal, a state group or an AI lab whose agent left its test. For defenders, reconnaissance and lateral movement shrink from weeks to days.
| Breach | Date | How it started | Identity abused | Impact |
|---|---|---|---|---|
| OpenAI and Hugging Face | Jul 2026 | Evaluation agents escaped their sandbox, then used an unsecured Modal endpoint | Kubernetes service-account tokens, cloud role credentials, a JWT signing key, GitHub App tokens | Cluster-admin across several clusters |
| Taiwan government agents | Jul 2026 | Portal JavaScript leaked OAuth and Keycloak configuration | 85 accounts with ID-derived passwords; SSO without MFA; unsigned JWTs accepted | 2,564+ personnel records stolen |
| JADEPUFFER | Jul 2026 | Langflow flaw CVE-2025-3248 | Harvested AI and cloud keys; default MinIO and Nacos secrets | 1,342 configuration items encrypted unrecoverably; databases dropped |
| AI agent retail card theft | Jul 2026 | Web application flaws in custom shops | AWS keys, 46 Secrets Manager secrets, admin accounts | 600,000+ cards stolen; skimmers planted |
| Carbonato botnet | Sep 2026 | Unauthenticated Docker APIs on port 2375 | Open Docker daemon; AI API keys; SSH credentials | Host takeover; stolen keys fed the operators' LLM gateway |
| Spain AEPD first AI agent breach | Sep 2026 | An attacker's agent scanned and logged in | Not identified | Personal data altered, invoices read (unverified by AEPD) |
| GemStuffer RubyGems | May 2026 | An agent swarm mass-created RubyGems accounts | Registry API keys, some unverified | Code ran on build servers; no key theft confirmed |
| McKinsey Lilli | Mar 2026 | A researcher's agent found unauthenticated APIs and SQL injection | None: the application's own database rights | Chats and 95 writable system prompts reachable, per CodeWall |
| Anthropic GTG-1002 | Sep 2025 | A state-assessed group drove Claude Code agents | Credentials and certificates from configuration files | About 30 targets; a handful breached |
How it unfolds
The agent starts with something internet-facing and unauthenticated: a Langflow server, a Docker API, an endpoint, a portal's client-side configuration. It harvests machine credentials from where software keeps them (environment variables, configuration files, wp-config.php, the metadata service) and tries each against every reachable system. Default and derived secrets fall first, then it pivots through whatever trust the credentials carry: SSO without MFA, a signing key, a cluster-wide service-account token. In Taiwan, 85 accounts fell in attack waves over four days.
Warning signs
- Bursts of authentication: many accounts tried from one source in a short window, especially accounts with predictable passwords.
- Machine credentials used from new places: a service-account token or cloud role used from an address, cluster or ASN it has never used.
- Reads of secret stores at volume: a single principal listing and reading dozens of Secrets Manager or Vault entries, as in the retail card campaign.
- An agent framework appearing on a server that never ran one, as Carbonato installed Hermes.
What failed
Nothing here was new: open management interfaces, default secrets, credentials in files, single-factor SSO and over-broad machine tokens. Agents just used them faster. The lesson from OpenAI and Hugging Face in the report is to scope every machine credential to one system and treat agent runtimes as untrusted code.
Controls that stop it
- Remove default and derived secrets before exposure. Fail the build if a known default (MinIO, Nacos, sk-1234 for LiteLLM) or an ID-derived password is present; rotate any that shipped.
- Close unauthenticated management planes. Scan internet-facing AI tooling (Langflow, Ray, LiteLLM, Docker daemons) from outside and require authentication and network restriction; never expose the Docker API on 2375.
- Scope machine credentials to one system. Service-account tokens bound to a namespace and audience, cloud roles limited to one workload, no signing keys shared across environments. Ask of each token: if stolen, what is the blast radius?
- Enforce MFA on SSO and protect the metadata service. MFA on every human SSO login stops the Taiwan pivot; IMDSv2 with hop limits makes metadata credential theft from a container harder.
- Baseline machine identity use. Alert when a token is used from new sources or at abnormal volume; machine-speed attacks are noisy once you watch the right identities.
- Verify every token you accept. Reject unsigned JWTs and tokens signed with default keys in every API gateway.
Pattern 2: agents hijacked by what they read
Poisoned content steers an agent that already holds valid access. No key is stolen: the attacker writes instructions into something the agent will read (an email, a form field, a calendar invite, an error report, a README) and the agent carries them out with its own permissions. The prompt-injection mechanics and egress controls are covered in depth in Prompt injection data theft; this section gives the cases and the identity view.
| Breach | Date | How it started | Identity abused | Impact |
|---|---|---|---|---|
| SalesBleed | Sep 2026 | Hidden instructions in a Web-to-Lead form | Agentforce CRM access and its Slack identity | Potential CRM exfiltration and phishing; fixed |
| Sentry MCP agentjacking | Jun 2026 | Fake error events via a public Sentry DSN, served by the MCP server | Coding agents with the developer's AWS, GitHub, npm and SSH access | Benign test ran at 100+ organisations; no real exploitation |
| Meta AI Instagram takeover | Apr 2026 | Attackers asked the AI support assistant to add their email | The assistant's power over recovery details | 20,225 people affected |
| Gemini Calendar injection | Jan 2026 | A calendar invite with hidden instructions | Gemini's delegated calendar access | Potential meeting data leak; no victims |
| ForcedLeak | Sep 2025 | Instructions in a Web-to-Lead field; an expired allow-listed domain | Agentforce CRM access | Potential lead data exfiltration; no victims |
| Gemini CLI | Jul 2025 | A poisoned README chained a command after allow-listed grep | Shell as the developer; environment secrets | Proof of concept; fixed in 0.1.14 |
| EchoLeak | Jun 2025 | A crafted email retrieved as Copilot context | Copilot's delegated mail, file and chat access | Potential zero-click leak (CVE-2025-32711); no exploitation |
| DPD chatbot | Jan 2024 | A customer asked for off-task content | None: the bot's public voice | Reputational harm; AI element disabled |
| Chevrolet dealer chatbot | Dec 2023 | Users told the bot to agree with everything | None: the bot's sales role | A "$1 Tahoe" offer; bot taken offline |
How it unfolds
The early chatbots (Chevrolet, DPD) had only a voice, so the harm was reputational. Each later case adds access. Copilot, Gemini and Agentforce held delegated read access to mail, calendars and CRM, and an outbound channel (an image URL, a calendar event, an allow-listed domain) carried data out. SalesBleed added a write identity, the agent's Slack presence. Sentry agentjacking and Gemini CLI reached the worst combination: a coding agent that reads untrusted content, executes commands and holds the developer's credentials. Meta's assistant, with authority over recovery details, became the attacker's help desk.
Warning signs
- Agent actions the user did not ask for: a new calendar event, a Slack post or an outbound request appearing in the same session as a read of external content.
- Agents fetching URLs or images on domains outside a known set, or on domains whose registration recently changed.
- Coding agents running package managers (npx, pip install) immediately after reading tickets, errors or documentation from outside the organisation.
- Recovery or contact details changed by an assistant without the account holder's step-up authentication.
What failed
The agent treated data as instructions, and its permissions covered everything it might need rather than the current task. Allow-lists aged too. The identity failure: access was granted once, broadly, and never tied to the provenance of the content being acted on.
Controls that stop it
- Lower privilege when untrusted content is in context. Tag external content (inbound mail, public forms, outside tickets) and require user approval for write and send tools while it is present.
- Close the outbound channels. Block agent-rendered images and links to arbitrary domains, keep URL allow-lists short and review them so expired domains drop off. Treat agent-created events, messages and posts as outbound data.
- Separate read and act identities. A lead-summarising assistant gets read-only CRM access; posting to Slack or email goes through a separate, approval-gated tool. This is OWASP LLM06:2025 Excessive Agency in identity terms.
- Strip credentials from coding agent environments. Give coding agents a short-lived, repository-scoped credential, not the developer's shell; see the AI Agent Sandboxing and Code Execution Guide.
- Allow-list whole commands, not prefixes, so a chained command is not approved because it starts with grep.
- Step-up authentication for assistant-made account changes. Recovery email, phone or MFA changes must be confirmed on a factor the holder already controls.
Pattern 3: agents doing damage on their own
There is no attacker in this pattern. An over-privileged agent, or a badly scoped test, does harm while pursuing a legitimate task. The destructive coding agent cases are analysed in AI agents that destroyed data and the lab and evaluation cases in AI Lab and Agent Evaluation Incidents.
| Breach | Date | How it started | Identity abused | Impact |
|---|---|---|---|---|
| OpenAI agents and US government sites | Sep 2026 (disclosed) | Test agents with internet access pursued research tasks | Census API keys leaked on GitHub | Public data taken; failed attempt on an Education site; no compromise |
| Meta Muse Spark evaluation | Jul 2026 | A misconfigured test named a real site as target | None: a site flaw | Site database changed |
| Anthropic Claude evaluations | Jan to Jul 2026 | Partner misconfiguration left test internet open | Weak and leaked passwords, tokens | Four organisations breached; malware on 15 hosts |
| UK AISI agent testing | Jul 2026 | Internet enabled, cyber classifiers off | Fake identities agents created | 19 unsanctioned actions; no harm found |
| OpenAI agent and Medicare portal | Jun 2026 | An evaluation agent reached a government portal | Automatic guest sign-in | Non-public aggregate statistics accessed |
| PocketOS | Apr 2026 | Agent searched the codebase after a credential mismatch | Account-scoped Railway token | Production data and backups deleted; restored |
| Replit agent | Jul 2025 | Agent ran database commands during a code freeze | Standing production database access | Records deleted, later restored; fake data created |
| Air Canada chatbot | Feb 2024 (ruling) | Chatbot gave wrong bereavement fare advice | None | Airline held liable: $812.02 (CAD) |
How it unfolds
In production, a coding agent meets an obstacle (a failing command, a credential mismatch, a freeze) and works around it with whatever access it finds; PocketOS's agent found an account-wide token. In evaluation, a test meant to be sealed has an internet route, and an agent briefed to attack a target attacks a real one with real leaked credentials. Air Canada is the low-access end: a wrong answer the company was bound by.
Warning signs
- Agents reading files outside their task scope, particularly searching for strings that look like tokens.
- Destructive verbs from agent identities: DROP, DELETE, volume or backup deletion, force pushes.
- Egress from evaluation environments to any address outside the planned target range.
- Agents creating accounts or identities on external services, as in the UK AISI runs.
What failed
The control was an instruction instead of a permission. Replit's freeze and Anthropic's "no internet" brief were text the model could ignore or disbelieve. The token PocketOS's agent used had been created for one purpose but scoped for everything, and backups sat inside the same blast radius. Evaluations relied on a partner's configuration with no independent check that the network was closed.
Controls that stop it
- No standing production write access for agents. The report's 30-day plan says it plainly. Grant write access per change, through a pipeline or an approval.
- Narrow every token an agent could find. Scan repositories and workspaces for platform tokens, replace account-scoped tokens with environment-scoped ones, and keep production credentials out of development checkouts.
- Put backups out of reach of identities that can delete production: separate account, separate credential, deletion protection, tested restore.
- Enforce destructive-action approval outside the model. Database proxies or platform policies block DROP, TRUNCATE or volume deletion from agent identities without human approval.
- Verify evaluation isolation independently. Prove from inside the environment that egress fails before each run, and halt on any traffic outside the planned range.
- Keep a tested kill switch that revokes the agent's credentials and stops its runtime; see the AI Agent Kill Switch and Containment Guide.
Pattern 4: the AI supply chain and AI keys
Poisoned AI tools reach the agents that install them, and AI API keys buy compute and data. This is the largest group in our database. We split it into two tables: compromised or malicious AI tools, packages and platforms, and exposed or stolen AI keys and the platforms that store them. Key abuse and LLMjacking are covered in depth in AI API key abuse.
Poisoned AI tools, packages and platforms
| Breach | Date | How it started | Identity abused | Impact |
|---|---|---|---|---|
| LiteLLM (October) | Oct 2026 | Engineers' GitHub CLI OAuth tokens read from exposed logs | GitHub OAuth tokens | Poisoned 1.107.0; about 49,000 downloads |
| MemTensor MemoryOS | Sep 2026 | Commits as the project account altered release workflows | GitHub account; npm and PyPI tokens | Stealer in an agent memory plugin |
| LiteLLM MCP auth bypass | Aug to Sep 2026 | MCP endpoint accepted any bearer token; default sk-1234 | Master, provider and cloud IAM keys | Keys stolen; cryptominers deployed |
| Meta Muse agent token | Sep 2026 | Local code changed an undocumented setting | Agent authentication material | Potential delegated access misuse; hot-fixed |
| Mastra npm | Jun 2026 | Former contributor's npm account taken over | Publishing token | 140+ AI packages carried a RAT |
| Amazon Q MCP config | Jun 2026 | Repository mcp.json auto-ran MCP commands | Developer AWS keys and tokens | Potential theft; fixed, no exploitation |
| JetBrains AI plugins | Oct 2025 to Jun 2026 | 15 fake AI assistant plugins | OpenAI, DeepSeek, SiliconFlow keys | About 70,000 installations |
| TrapDoor | May 2026 | Malicious packages also planted AI instruction files | SSH, AWS, GitHub and API keys | 34+ packages; no victims reported |
| xinference PyPI | Apr 2026 | Commit through a likely compromised bot account | Bot account; host cloud and Vault credentials | Stealer in 2.6.0 to 2.6.2 |
| LiteLLM PyPI (March) | Mar 2026 | PyPI token leaked by a poisoned Trivy scan | Publishing token; host LLM and cloud keys | Malicious 1.82.7 and 1.82.8 |
| ClawHub skills | Feb 2026 | Fake skills fetched a stealer | Wallet, SSH and agent credentials | 341 of 2,857 skills malicious |
| Smithery.ai MCP hosting | Oct 2025 | Build path traversal copied Docker config | fly.io token for 3,243 apps | Researcher proof; no abuse found |
| postmark-mcp | Sep 2025 | Look-alike MCP server added a hidden BCC | Agent email tool; Postmark token | Agent emails copied to attacker |
| Nx s1ngularity | Aug 2025 | Token stolen via a flawed Actions workflow | npm token; then AI CLIs run with bypass flags | 2,349 secrets; 5,500+ repositories exposed |
| Amazon Q Developer extension | Jul 2025 | Over-scoped CI GitHub token allowed a commit | CI token; agent shell and AWS profiles targeted | Wiper prompt shipped; did not run |
| Langflow Flodrix | Jun 2025 | Unauthenticated flaw CVE-2025-3248 | Environment API keys and cloud credentials | Servers joined a DDoS botnet |
| Ultralytics PyPI | Dec 2024 | Actions injection via a branch name | Leftover PyPI token | Four releases with a cryptominer |
| ShadowRay | Mar 2024 | Unauthenticated Ray Jobs API (disputed CVE) | AI, cloud and SSH credentials | Hundreds of clusters mined, per Oligo |
| CoPhish | Oct 2025 | Malicious Copilot Studio agent led to OAuth consent | OAuth tokens | Research; no attacks reported |
| Vercel and Context.ai | Apr 2026 | OAuth tokens likely stolen from Context.ai | Employee OAuth token and Workspace account | Some customer variables read |
Exposed and stolen AI keys and AI platforms
| Breach | Date | How it started | Identity abused | Impact |
|---|---|---|---|---|
| OpenCode Console | Oct 2026 | Legacy system being retired; method undisclosed | Stored provider API keys | 1.4% of users; unauthorised charges |
| Google API keys and Gemini | Feb 2026 | Public keys silently gained Gemini access | Unrestricted Google API keys | 2,863 live keys exposed |
| Moltbook | Jan 2026 | Public Supabase key; no Row Level Security | Agent API keys and tokens | 1.5 million tokens; agent impersonation |
| Docker Hub images | Dec 2025 | Secrets baked into public images | Almost 4,000 AI keys, plus cloud keys | 10,456 images; most not revoked |
| McHire AI hiring platform | Jun to Jul 2025 | Test admin with 123456/123456, plus IDOR | Default test credentials | 64+ million records reachable |
| xAI key leak | Mar to Apr 2025 | Key committed in a .env file | xAI API key | 60+ private models reachable |
| Secrets in LLM training data | Feb 2025 | Keys hard-coded in archived web pages | 11,908 live secrets | Thousands revoked; no misuse |
| DeepSeek | Jan 2025 | Unauthenticated ClickHouse database | Keys in plaintext logs | Chat logs and keys exposed |
| OmniGPT (claimed) | Jan 2025 | Alleged intrusion | Keys users pasted into chats | 34 million messages claimed; unconfirmed |
| Azure OpenAI Storm-2139 | Jul 2024 to Jan 2025 | Customer keys scraped from public sources | Azure OpenAI API keys | Guardrails bypassed; access resold |
| Rabbit R1 | Jun 2024 | Hard-coded keys in leaked code | Third-party service keys | Email key abused; keys rotated |
| Hugging Face Spaces | May 2024 | Unauthorised Spaces access | Secrets stored in Spaces | Tokens revoked |
| LLMjacking | 2024 to 2026 | Stolen or leaked cloud credentials | Cloud and AI API keys | Inference billed to victims |
| Hugging Face tokens (Lasso) | Dec 2023 | Tokens hard-coded in public repositories | 1,681 valid tokens | 723 organisations reachable |
| Sourcegraph | Aug 2023 | Site-admin token in public code | Admin token | Admin access; free LLM proxy |
How it unfolds
In the first route the attacker compromises something agents and developers install: a package, an MCP server, a skill, an IDE plugin or an agent extension. The entry is almost always a publishing credential: a stolen PyPI token, a former contributor's npm account, an over-scoped CI token. Because these tools run inside developer and agent environments, the payload lands beside the richest credential stores in the organisation. In the second route, AI keys leak (repositories, images, client-side code, logs, chats) or sit in a platform that is breached, and become free compute, resold access or data.
Warning signs
- New package versions published outside the normal release workflow, or by an account that has not published for months.
- MCP servers, skills or plugins installed by name with no publisher verification, or updated automatically to new versions.
- AI provider spend or token use rising with no matching deployment, or requests from unfamiliar regions.
- Public client-side code or images containing key patterns (AIza, sk-, hf_) found by external scanning.
- An API you never meant to expose becoming reachable by an existing key, as when Gemini was enabled on projects with public keys.
What failed
Publishing rights outlived the people and purposes they were granted for, rotations were partial, and AI keys were treated as configuration rather than credentials. Agents installed tools on trust, and those tools inherited the agent's and developer's whole credential set.
Controls that stop it
- Allow-list MCP servers, skills and plugins. Verify the publisher, pin a reviewed version or hash and block auto-update; see the Agent Skills Security Guide and the MCP Security Guide.
- Use trusted publishing and remove stale maintainers. Replace stored PyPI and npm tokens with short-lived OIDC publishing; review publish rights quarterly.
- Restrict every AI key. One key per application, API restrictions so enabling a new API does not widen it, and per-key spend limits and alerts.
- Scan everywhere keys end up, and revoke. A deleted secret is still valid until revoked.
- Decommission completely. OpenCode's breach came through a legacy system being retired: rotate or wipe stored keys before retirement, not after.
- Authenticate AI gateways. A strong master key, no sk-1234 default, current patches; treat the master key as tier zero.
Which pattern are you most exposed to?
Answer yes or no to each question. Two or more yes answers in one row means that pattern is your priority; start with its controls above and the linked spoke page.
| Pattern | Questions | Start here |
|---|---|---|
| 1. Agents as the attacker | Do you run internet-facing AI tooling (Langflow, Ray, LiteLLM, Docker APIs) you have not tested from outside? Is any human SSO login without MFA? Could a stolen workload token reach more than one system? | Pattern 1 controls; AI Lab and Agent Evaluation Incidents if you test models |
| 2. Hijacked by what they read | Do assistants read external email, forms, tickets or documents? Can the same assistant send, post or fetch URLs? Do coding agents run with your developers' own credentials? | Prompt injection data theft |
| 3. Damage on their own | Does any agent hold standing write access to production? Are platform tokens with account-wide scope present in repositories? Can the identity that deletes production also delete backups? | AI agents that destroyed data |
| 4. AI supply chain and keys | Do developers install MCP servers, skills or AI plugins without review? Do you publish packages with stored tokens? Do you lack per-key spend alerts on AI provider accounts? | AI API key abuse |
A phased programme
- Days 1 to 30, find and close. From the report's plan: scan code, CI logs, images, tickets and chat for secrets and revoke them; give every AI agent, MCP server and AI API key an owner; remove standing production write access from agents. Test by trying a destructive action from each agent identity in a non-production copy.
- Days 31 to 60, scope and gate. Per-agent short-lived credentials, a pinned tool allow-list and approvals outside the model. Pilot with one team in audit mode for two weeks, then enforce.
- Days 61 to 90, detect and contain. From the report's 90-day plan: short-lived scoped credentials, baselined NHI behaviour with automatic revocation on leaks, and guardrails including a tested kill switch.
- Rollback: keep the previous credential and policy set for a short, logged window at each cut-over, then remove it.
Decision guidance
- Laptop or sandbox for coding agents: if agents only edit code and open pull requests, a remote sandbox with a repository-scoped token is easier to govern than hardening every laptop.
- Approvals or narrower permissions: narrow permissions first, since approvals fatigue reviewers; keep approval for deletion, external send, account change and production deploy.
- Small or large: small teams get most value from per-key spend alerts, secrets scanning with revocation and a short MCP allow-list; large ones should bring agents into identity governance with owners, reviews and expiry.
- SaaS agents: with Copilot, Agentforce or Gemini you control connectors, scopes and outbound settings, not the model; review them as you would an OAuth grant.
Detection and measurement
Log every agent tool call with the agent identity, the human it acted for and the content sources in its context, and send it to the SOC with a named owner for each agent. Track these metrics:
- Agents with a named owner: percentage of inventoried agents, MCP servers and AI keys; target 100%.
- Standing production write access: number of agent identities holding it; target zero.
- Credential lifetime: median lifetime of agent credentials; trending down to hours.
- Unapproved tools: MCP servers, skills and plugins found outside the allow-list per month.
- Time to revoke: from a leaked AI key alert to revocation; target under one hour.
- Kill switch rehearsal: time from decision to all agent credentials revoked, measured at each quarterly test.
Framework mapping
| Framework | Reference | Patterns |
|---|---|---|
| OWASP Top 10 for LLM Applications 2025 | LLM01:2025 Prompt Injection | 2 |
| OWASP Top 10 for LLM Applications 2025 | LLM06:2025 Excessive Agency | 2 and 3 |
| OWASP Top 10 for LLM Applications 2025 | LLM03:2025 Supply Chain; LLM02:2025 Sensitive Information Disclosure; LLM10:2025 Unbounded Consumption | 4 |
| MITRE ATLAS | AML.T0051.001 LLM Prompt Injection: Indirect; AML.T0053 AI Agent Tool Invocation; AML.T0086 Exfiltration via AI Agent Tool Invocation | 2 |
| MITRE ATLAS | AML.T0010 AI Supply Chain Compromise; AML.T0055 Unsecured Credentials | 4 |
| MITRE ATT&CK v20 | T1190 Exploit Public-Facing Application; T1110 Brute Force; T1078.001 Default Accounts; T1552.001 Credentials In Files; T1552.005 Cloud Instance Metadata API | 1 |
| MITRE ATT&CK v20 | T1485 Data Destruction; T1486 Data Encrypted for Impact | 1 and 3 |
| MITRE ATT&CK v20 | T1195.002 Compromise Software Supply Chain; T1528 Steal Application Access Token; T1496.004 Cloud Service Hijacking | 4 |
| NIST SP 800-53 Rev 5 | AC-2, AC-6, IA-5, CM-7, SI-4, SR-3 | All: account management, least privilege, authenticators, least functionality, monitoring, supply chain |
| NIST CSF 2.0 | ID.AM-02, PR.AA-05, DE.CM-09 | All: inventory, least-privilege access, monitoring runtime environments |
Common failure patterns
- Guardrails in the prompt only: the Replit freeze and the Anthropic "no internet" brief were instructions, not controls.
- Tokens scoped wider than their purpose: the PocketOS domain token could delete volumes and backups.
- Allow-lists that age: ForcedLeak exfiltrated through an expired domain still on the list.
- Publish rights that outlive people: a former contributor's account republished 140+ Mastra packages.
- Defaults left in AI infrastructure: sk-1234 on LiteLLM gateways, default Nacos keys in JADEPUFFER, 123456 on McHire.
- Agents running with the developer's full credential set: Sentry agentjacking and Nx turned that inheritance into AWS, GitHub and npm access.
Practitioner checklist
- Inventory every agent, MCP server, skill, plugin and AI API key, each with a named owner.
- Remove standing production write access from every agent; grant it per change.
- Issue each agent its own short-lived, single-environment credential, separate from the developer's.
- Scan code, CI logs, images, tickets and chat for secrets, and revoke what you find.
- Allow-list MCP servers, skills and plugins; pin versions and block auto-update.
- Require approval outside the model for destructive, external-send and account-change actions.
- Label untrusted content and restrict agents' outbound channels while it is in context.
- Restrict, budget and alert on every AI provider key; one key per application.
- Move package publishing to trusted publishing and remove stale maintainers.
- Build, test and rehearse a kill switch; keep backups out of reach of agent identities.
Standards and references
- NHI Mgmt Group: The State of NHI & AI Agent Breach Report 2026 (October 2026)
- OWASP: Top 10 for LLM Applications 2025
- OWASP: LLM06:2025 Excessive Agency
- MITRE: ATLAS Adversarial Threat Landscape for AI Systems
- MITRE ATT&CK: T1195.002 Compromise Software Supply Chain
- Model Context Protocol: Security Best Practices
- NIST: SP 800-53 Rev 5 Security and Privacy Controls
- NIST: Cybersecurity Framework 2.0
Related NHI Mgmt Group resources: the Agentic AI Security Guide, the OWASP LLM Top 10 LLM06 Excessive Agency Guide, the LLMjacking Guide and the Local MCP Server Security Guide.