PIVTR-D
RScenario

AI application and agent misuse

Your own AI application or agent followed planted instructions, disclosed data or misused a tool with the access you gave it. Protect the prompt, retrieval and tool-call logs first, then cut the agent's credentials and tools.

First moves
  1. Export prompt, response, retrieval and tool-call logs for the whole window before changing the agent, its index or its credentials.Intelligence/Investigations
  2. Snapshot the conversation store, index and configuration, and register each snapshot as in Evidence collection.Operations
  3. Turn off the agent, or the misused tool, with its kill switch or feature flag.Operations
  4. Record which identity the agent acted as for each action.Intelligence/Investigations
  5. List the tools and data sources the agent could reach, with each tool's rights.Operations
  6. Send T19 to the vendor of any hosted model or agent and ask how long it keeps logs.Liaison

Then work the page: Scope, Contain and eradicate, Keep it closed, Notify.

Use this page also when the agent answers from poisoned content or loses the credentials it uses to reach other systems. The evidence sits in the application's prompt, retrieval and tool-call logs, and in the logs of every system the agent reached.

Stolen cloud credentials used to run paid models are a separate incident, covered by the cloud playbooks for AWS, Azure, Google Cloud and OCI.

This page adds to the phase playbooks for scope, contain, eradicate and recover.

This scenario is an addition to the book. Sources checked October 2026: the OWASP Top 10 for LLM Applications 2026, published August 3, 2026, with entry numbers from the OWASP download; the 2025 entry pages for prompt injection, sensitive information disclosure, excessive agency, system prompt leakage and vector and embedding weaknesses; the MITRE ATLAS data changelog (release 2026.09); the advisory for CVE-2025-32711. Sources checked September 2026: The Hacker News report on EchoLeak; the FINRA alert on the Salesloft Drift attack; Microsoft Learn on Copilot audit logs, the CopilotInteraction schema and Purview for Copilot.

What is different

RouteOWASP 2026 and MITRE ATLASWhat the response has to cover
Direct prompt injection: a user types instructions that override the system promptLLM01:2026 Prompt Injection. AML.T0051.000 LLM Prompt Injection: Direct.That user's sessions and the tool calls and reads they triggered
Indirect prompt injection: instructions hidden in a document, email, web page or tool output that the agent readsLLM01:2026 Prompt Injection, LLM02:2026 Sensitive Information Disclosure. AML.T0051.001 LLM Prompt Injection: Indirect, AML.T0086 Exfiltration via AI Agent Tool Invocation.The planted content, each session that retrieved it, and each path out: links, images, email and API calls
Excessive agency: the agent has more tools, permissions or autonomy than its task needsLLM03:2026 Excessive Agency. AML.T0053 AI Agent Tool Invocation.Every action taken under the agent's identity, and every system that identity can reach
Poisoned retrieval: someone adds or edits content in a retrieval-augmented generation (RAG) sourceLLM09:2026 Vector and Embedding Weaknesses. AML.T0070 RAG Poisoning.Change history of each source and the index, who can write to them, and answers built from the poisoned content
Stolen agent credentials or connectors: API keys, OAuth grants and Model Context Protocol (MCP) server tokensAML.T0083 Credentials from AI Agent ConfigurationEvery system the credential reaches. In August 2025 attackers used stolen OAuth tokens of the Drift AI chat agent's integrations, a case the SaaS and OAuth scenario covers.

EchoLeak (CVE-2025-32711, Common Vulnerability Scoring System score 9.3) showed the indirect route in Microsoft 365 Copilot. An email carrying hidden instructions sat in a user's mailbox until Copilot retrieved it to answer an ordinary question.

Copilot then sent internal data out through Microsoft Teams and SharePoint URLs in its answer, with no click from the user. Microsoft had fixed it in the service by the June 2025 disclosure, with no customer action needed.

OWASP's 2025 prompt injection entry finds it unclear whether any method prevents prompt injection fully. The agent's credentials and tools set the limit of the damage, so scope starts there.

Scope

Generic steps are on Scope. Export logs before changing the agent, its index or its credentials.

#ItemOwner
1Record which identity the agent acted as for each action: its own service account, API key or OAuth grant, or the signed-in user's delegated tokenIntelligence/Investigations
2List the tools and data sources the agent could reach, with each tool's rights: read, write, send, delete, pay or change permissionsOperations
3Export prompt, response, retrieval and tool-call logs for the whole window, with user, session, time and tool argumentsIntelligence/Investigations
4Record by version the model, system prompt, tool definitions and guardrail settings in force at each point in the windowOperations
5List retrieval corpus changes in the window: documents added or edited, by whom, and when the index picked them upIntelligence/Investigations
6Find and preserve the source of the injected instruction: document, email, web page, ticket or tool responseIntelligence/Investigations
7Find the other sessions and users that retrieved the same content or called the same toolIntelligence/Investigations
8Check the files, environment variables and secret stores that keep agent and connector credentials for access in the windowIntelligence/Investigations

When the logs were not kept

If the application logged only final answers, or nothing, rebuild the record from these sources. Then turn on full logging, readable by the response team alone.

SourceWhat it shows
Audit logs of each system the agent calledReads, writes and sends under the agent's identity or client ID
The application's conversation history storePast prompts and answers, when the product keeps them
Web proxy, DNS and egress logsRequests to URLs the agent fetched or the user's client loaded from an answer
Microsoft 365 CopilotThe Purview audit record CopilotInteraction lists the Microsoft 365 files Copilot accessed, without prompt text. Prompts and responses sit in the user's mailbox, where eDiscovery finds them with the condition Type, Copilot activity.
Vendor-hosted models and agentsThe vendor's logs, requested with T19 Vendor evidence and preservation request
The userA same-day written account of the session, with screenshots

Contain and eradicate

Generic steps are on Contain and Eradicate. Record each decision in T3 Containment decision record. Snapshot the conversation store, the index and the configuration before the first change, and register each snapshot as in Evidence collection.

#ItemOwner
1Turn off the agent, or the misused tool, with its kill switch or feature flagOperations
2Revoke and reissue agent API keys, service account secrets and tokens, following identity containmentOperations
3Revoke connector grants: OAuth grants, MCP server credentials and other integrations the agent usesOperations
4Preserve the poisoned documents, then remove them from the source and the indexOperations
5Re-sync or rebuild the indexOperations
6Rerun the queries that returned poisoned content, and record the clean resultsIntelligence/Investigations
7Restrict the remaining tools to read-only until the review endsOperations
8Require a person's approval for every action that sends, deletes, pays or changes permissionsOperations
9Rotate secrets found in system prompts, retrieved content or logs at the system that issued themOperations
10Reverse agent actions where possible: messages sent, records changed, tickets closedOperations
11Test the fix against the triggering input in a test copy, several runs eachIntelligence/Investigations
12After the fix test passes and the Incident Commander approves, return the agent to service and restore write tools one at a timeIncident Commander

Keep it closed

#ItemOwner
13Limit each tool to the permissions its task needs, and run user-facing tools as the signed-in userOperations
14Enforce authorization in the downstream systems. Keep credentials and access rules out of the system prompt.Operations
15Require a person's approval for high-impact actions: external email, payments, deletion and permission changesOperations
16Handle retrieved content and tool output as untrusted. Filter input and output, and strip links and images to unapproved domains from answers.Operations
17Limit write access to retrieval sources to named owners, and log each ingestionOperations
18Log prompts, responses, retrievals and tool calls, with a set retention period and access limited to named rolesOperations
19Complete a privacy review of that logging before it goes liveLegal advisor
20Red-team the application before release and after each change to the model, system prompt or toolsCISO

Notify

Rate disclosed data against notification deadlines from the time of discovery.

#ItemOwner
1Map the data the agent returned or sent to the people and customers it describesPlanning
2Assess regulatory and contractual notices, and send them by their deadlines, one T17 per regimeLegal advisor
3Tell staff and customers who acted on poisoned or wrong answers which answers to disregardLiaison
Watch out
  • Prompt and tool-call logs carry whatever users and documents contained, personal data and secrets included. Limit and record who reads them.
  • Model output varies from run to run, so a failed reproduction proves nothing. Work from the logs of the incident.
  • The vendor keeps the logs for vendor-hosted models and agents. Send T19 early and ask how long it keeps them.
  • Each connector has its own grant. Revoking the agent's API key leaves its OAuth grants and MCP server tokens working.
Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.