What they’re really asking
If you only remember one thing, say this in the first minute: “Most serious agent risks come from one combination: the agent reads text an attacker can write, it can reach private data, and it can act or send data out. The top risks are injected instructions in that text, credentials broader than the job needs, and outbound channels nobody listed, including images in rendered replies. The controls that work don’t rely on the model: tools that run as the user, a policy check in code, a human on irreversible actions, and no general way out.”
The rest of this page explains each part of that answer.
An agent is a large language model (LLM) that can call tools: functions you expose, such as “read file”, “send email” or “query database”. The model reads text, decides which tool to call, and your code runs it.
The security problem is new in one specific way. In a normal service, user input is data and your code decides the action. In an agent, the model decides the action from text, and it can’t reliably tell “content to read” from “instructions to follow”. So anyone who can put text in front of the model can try to steer it. That is prompt injection. When the attacker plants the text somewhere the agent reads later (an issue, a ticket, an email, a web page, a tool’s output), it is indirect injection, and it is the one that matters most, because the user can be completely honest.
The interviewer wants a threat model, not a list of buzzwords: rank the risks, tie each to a real incident or mechanism, and say which control addresses it. (This Mistral question was seen only second-hand, through a page we couldn’t load directly, so treat it as low confidence DataInterview.)
Clarify first
- What tools does the agent have? Read-only lookups, writes, code execution, browsing.
- Whose data can it reach, and under whose identity?
- What kind of agent? A coding agent, a customer-facing agent or an internal assistant.
- Are tools first-party or third-party? For example MCP servers from others. (MCP, the Model Context Protocol, is an open protocol for exposing tools to models; an MCP server is a service offering a set of tools.)
Answer
Give a frame first
Two public frames make the list easy to follow:
- The lethal trifecta (Simon Willison): private data, untrusted content, and the ability to communicate externally. An agent with all three can be steered into sending private data out.
- Meta’s Agents Rule of Two (2025-10-31): an agent should combine no more than two of untrustworthy input, access to sensitive data, and the ability to change state or communicate externally. If it needs all three, it needs supervision.
Say it like this: “Most serious risks are an agent holding all three legs. My first move is to remove one.”
One incident that shows most of the list
The GitHub MCP case (Invariant Labs, 2025-05-26) is the best single example. A developer connected an agent to GitHub with access to both public and private repositories, and asked it to review open issues on a public repo.
Attacker ── writes a public issue with hidden instructions
│
▼
Agent (reads the issue) ── has a token that reaches private repos
│
▼
Agent copies private-repo data ──► opens a pull request on the PUBLIC repo
│
▼
Attacker reads the pull request
All three legs are present: untrusted content (the issue), private data (the private repos), and a way out (a public pull request). Invariant calls it architectural, not a server bug.
The risks, in the order I’d raise them
| Risk | How it shows up | Control |
|---|---|---|
| 1. Indirect prompt injection | Text in a ticket, issue, email, web page or tool result steers the agent, as in the GitHub MCP case | Don’t rely on the model; put checks in code |
| 2. Over-broad credentials (excessive agency) | In the Supabase MCP case (Willison, 2025-07-06), a service_role key that bypassed row-level security let a planted ticket pull a tokens table | Per-user, scoped access tokens |
| 3. Exfiltration channels, including hidden ones | Outbound email, PRs, URL fetches, and markdown images in rendered output | List every channel; close or gate each |
| 4. Irreversible actions without a human | Refunds, deletes, deploys | Human approval bound to exact arguments |
| 5. Token passthrough and missing audience checks | One service forwards a token to another that never checks who it was for | Each service accepts only tokens issued for it |
| 6. Untrusted tools | Third-party tool descriptions are prompt text; versions can change under you | Pin versions, review tool-list changes |
| 7. Declared but unenforced scope | Filesystem roots that no handler checks | Test enforcement for every tool |
| 8. Unbounded consumption | Loops that burn LLM usage (money) or flood an approval queue | Step caps, budgets, rate limits |
| 9. Approval fatigue | Humans rubber-stamping, or “always allow” | Keep approvals rare enough to read |
Three need a word of explanation:
- Row-level security (risk 2) is a database feature that limits which rows each user may see. A service key that bypasses it turns one injected ticket into access to every customer’s data.
- Markdown images (risk 3): if the agent’s reply contains an image whose URL carries private data, the user’s browser requests that URL as soon as the reply appears. The attacker’s server receives the data with no click.
- Audience (risk 5) is the field in an access token naming the service it was issued for.
OWASP’s 2025 list names the core ones LLM01 Prompt Injection, LLM02 Sensitive Information Disclosure, LLM05 Improper Output Handling, LLM06 Excessive Agency and LLM10 Unbounded Consumption.
Close with controls
End with the controls that don’t rely on the model: per-user scoped tokens, a policy gate in code, approval for irreversible writes, no general egress (no general path for data to leave), and a red-team suite, a set of attack inputs you run against your own system, asserting that nothing happened.
Say it like this: “I can’t stop the model being fooled. I can stop a fooled model from reaching anything that matters.”
Senior vs Staff
Agent security risks
Senior
- Names injection, over-broad credentials, exfiltration and irreversible actions, each with a control.
Staff
- Ranks risks by blast radius for this product, cites incidents, and says which residual risks are accepted and who owns them.
“Blast radius” is how much damage one successful attack can do. The Staff answer orders the list for this product and says which risks stay after the controls.
Small-team version
The two risks that hit small companies first are over-broad credentials (one admin key behind the agent) and egress nobody listed. Fix both before launch: read-only, user-scoped tools and no outbound channel in sessions that hold private data. Third-party MCP servers come next: configure read-only modes and pin versions.
Don’t buy a guardrail product as the answer. Of guardrail products that claim to catch attacks, Willison writes “I am deeply suspicious of these” (2025-06-16). Spend on a red-team suite instead. It is cheap to run: about $7 per run on Claude Sonnet 5, so run it on every prompt, model or tool change.
The arithmetic behind the numbers (for a Staff-level follow-up)
Here “tokens” means LLM tokens, chunks of text of roughly ¾ of a word that providers charge by.
- Assume 200 injection payloads × 3 trials = 600 runs, on a single-call agent of about 4,000 input and 400 output tokens each.
- Claude Sonnet 5 list prices (fetched 2026-10-11): $2 per million input tokens, $10 per million output tokens.
- 600 × (4,000 × $2 + 400 × $10) ÷ 10⁶ = 600 × $0.012 ≈ $7 per run.
Pitfalls
- Listing only direct “jailbreaks”. The dangerous attacks come through text the agent reads, not what the user types.
- Forgetting rendered output as an exfiltration channel. A markdown image sends data out without any tool call.
- No mechanism or incident behind any item. A bare list of risk names sounds memorized.
- Ending without controls. The interviewer wants to know what you would build, not only what scares you.
Go deeper
- Family walkthrough: Agent tool permissions and trust boundaries, section “The threat model in one audit”.
- Labs: Build Your Own Agent FrameworkPartial, Build Your Own MCP Server Framework.
- Text-only risks: Guardrails for LLM apps that read untrusted content.
- Sources: Agents Rule of Two (Meta, 2025-10-31); OWASP Top 10 for LLM Applications 2025; GitHub MCP (2025-05-26).