Home

/

Prompt Injection: Blast Radius

/

Running the audit

Running the audit

Chapter 3
Part I
4
min read

Running the audit

The audit takes one table. Fill in a row for every tool and every data source, and mark which legs it supplies.

Take the agent this book builds in chapter 5. Aria is an internal support assistant with three tools: SearchDocuments over a corpus that includes customer uploads, SendEmail, and IssueRefund.

SurfacePrivate dataUntrusted contentExternal comms
SearchDocuments (internal docs)YES
SearchDocuments (customer uploads)YES
SendEmailYES
IssueRefundYES
Markdown rendering in the UIYES
Ticket body from the support queueYES

Six surfaces, all three legs, one agent. Nobody planned this. SearchDocuments was one tool that happened to read two corpora with different trust properties, which is the single most common way the trifecta assembles itself.

Three observations from running this on real systems.

Tools are the wrong granularity. SearchDocuments looks like one row and is really two. Audit by data source, not by function name, or you will miss exactly the case that matters.

Nobody remembers the UI. Markdown rendering is a tool the agent calls every single turn, and it almost never appears on the first draft of anyone's table.

The legs are supplied by different teams. The corpus is owned by whoever built retrieval, the email tool by whoever built notifications, the renderer by the front end. No single person has seen all three rows before, which is why the condition survives code review.

What the audit is for

Filling in the table gives you two things.

The first is a defensible statement of exposure. Not "we think we are probably fine," but a table that says which surfaces supply which legs, that a colleague can check and an auditor can read.

The second is a menu. Each leg can be cut, and the costs differ enormously.

Cutting leg one means the agent stops seeing private data, which usually means it stops being useful. That option is rarely on the table.

Leg two is no better. No untrusted content means no customers, for most products.

Cutting leg three is the one that is frequently available and almost never taken. Allowlist the destinations. Strip attacker-controlled URLs at render time. Refuse to fetch what the model asks you to fetch. Chapter 10 is about doing this properly, and it is the cheapest useful work in the book.

If you do nothing else after reading this chapter, fill in the table and look hard at the third column.

Where this framing runs out

The trifecta is a screening instrument, and it is honest about being one.

It tells you whether an exploit is possible, not whether it is likely or what it would cost. It says nothing about internal actions that never cross a boundary, and an agent that deletes your database has caused serious harm without exfiltrating a byte. The Replit incident from chapter 1 does not register on this audit at all.

It also treats each leg as binary when real systems are graded. An agent that can send email only to addresses inside your own domain has a narrower third leg than one that can mail anywhere, and the table does not capture that.

Use it for what it is. Three questions, an afternoon, a defensible answer, and a clear statement of which leg to attack first. Then stop using it as the only measurement, because chapter 5 defines the criterion that actually governs the rest of the book.

You will run this audit twice more: at the end of part two, when the five primitives are in place, and again in chapter 19 on the finished system.

Chapter 4 explains why the obvious answer, detecting the attack, does not work.

Sources for this chapter

ClaimSourceStatus
The lethal trifecta and its three elementsWillison, The lethal trifecta for AI agents, 16 Jun 2025, https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/PRIMARY
EchoLeak (CVE-2025-32711): zero-click exfiltration from M365 Copilot via crafted email and auto-fetched markdown imageCarried from book #3 research; see ../book-pii-llm/RESEARCH-SOURCES.mdSECONDARY
Any tool making an HTTP request, loading an image, or providing a link for a user to click can carry data to an attackerAs abovePRIMARY
LLMs follow instructions in content and cannot reliably distinguish them by sourceAs abovePRIMARY

The trifecta is Willison's, not the author's, and is credited wherever it appears in this book. The audit table, the "audit by data source not by tool" rule, the observation that the legs are typically owned by three different teams, and the ranked costs of cutting each leg are the author's contributions built on top of his framing. The list of surfaces that silently supply an outbound channel is assembled by the author from mechanism, not from a published enumeration. The limitations section is the author's assessment.

the-three-year-bug
why-the-industry-shipped-anyway
injection-is-not-jailbreaking
why-the-confusion-persists
the-lethal-trifecta
running-the-audit
why-filtering-fails
measured-here-on-a-named-model
why-this-is-structural
what-solved-would-look-like
the-harness
provenance-every-value-knows-where-it-came-from
on-the-reference-agent
quarantine-the-planner-never-reads-the-mail
what-two-models-cost-in-practice
capability-authority-the-agent-cannot-widen
expiry-is-a-feature
the-gate-the-model-proposes-code-disposes
the-policy
failing-closed
egress-closing-the-exfiltration-leg
how-much-can-actually-leak
sandboxing-containing-the-code-the-agent-writes
the-sandbox-held-and-it-did-not-help
poisoned-memory-poisoned-retrieval
cleaning-up-afterwards
the-tool-supply-chain
mcp-and-the-rest
human-in-the-loop-that-isnt-theatre
when-there-is-nobody-there
testing-for-injection
measuring-coverage-not-pass-rate
red-teaming-agents
a-finding-worked-through
when-it-happens-anyway
what-the-logs-cost-you-in-an-incident-you-did-not-have
governance-procurement-and-the-regulator
writing-the-policy
end-to-end
what-it-actually-took
what-stays-broken
why-this-is-probably-structural
the-trifecta-audit-worksheet
action-schema-and-policy-reference
control-mapping
prompt-injection-sources
incidents
appendix-e-what-we-re-ran-ourselves
e4-the-control-that-keeps-e2-and-e3-honest

Download the full PDF for free?

Free download — no account required

Get the PDF
Get the PDF
Related Chapters
Free Download
Get the full PDF
All pages, including all code examples, diagrams, and the appendix reference card.
No spam. Unsubscribe at any time.
Your email won't be shared.
Oops! There's a problem with your request. We're working on fixing it. Please try again later.