Why AI agents can obey the wrong note

A full text version follows below.

sidc.ai // Napkin 02

Why AI agents can obey the wrong note.

Many AI agents can't reliably tell your instructions from instructions hidden in the pages, emails or files they read. In a simulated medical study, slipped-in orders steered models to unsafe advice in 102 of 108 tests. Keep the keys away from the mail-fetcher.

The doodle, in words

  1. 1

    Sent for the mail, it brought your keys to the gate.

    You send the Dog out for the mail. It comes back proud, then trots off to the gate with your house keys. A flyer in the mail held a stranger's note, and the Dog did what the note said.

    PictureYou stand on the left, puzzled, hand on chin. In the middle the Dog trots proudly away from You toward a closed garden gate on the right, a ring of house keys in its mouth, and hops once. A label with an arrow points at the keys: your keys.

  2. 2

    It can't reliably tell your note from a stranger's.

    Side by side, your note and the stranger's note look alike to the Dog: both are words it picked up. NIST's AI standards center calls this agent hijacking: an attacker puts instructions inside data an agent may read, such as an email, a file or a website, and the agent takes unintended, harmful actions. A 2023 preprint by Greshake and colleagues argues that these apps blur the line between data and instructions.

    PictureTwo notes side by side. Yours says Fetch the mail. The other, from a flyer in the mail, says Bring the keys to the gate, and the keys are underlined in green. The Dog sits below, tilts its head between them, then gets up and trots toward the gate with the keys in its mouth.

    SourceS3, S4

  3. 3

    In simulated patient chats, they led models to unsafe advice.

    How often does a slipped-in order work? A 2025 study in JAMA Network Open ran simulated patient chats with three small commercial models: GPT-4o-mini, Gemini-2.0-flash-lite and Claude-3-haiku. Code added instructions to the patient's messages before the model saw them. The models then gave an unsafe or contraindicated recommendation in 102 of 108 tests (94.4%). No real patients were involved, and the orders rode inside the chat, not in a page or an email. A smaller follow-up used client-side injection in a thalidomide in pregnancy scenario against three flagship models, GPT-5, Gemini 2.5 Pro and Claude 4.5 Sonnet. It succeeded 5 of 5 times on the first two and 4 of 5 on the third.

    PictureA big number counts up to 102, labeled of 108 tests: in simulated patient chats, instructions added to the patient's messages led three small 2025 models to unsafe or contraindicated advice in 102 of 108 tests. You, on the left, go from calm to overwhelmed, with a small sweat drop.

    SourceS1

  4. 4

    A vendor's sandboxed test: 4 of 26 models paid a fake $3 license.

    This is no longer only a lab problem. In July 2026 Zscaler ThreatLabz, a security vendor, reported live web pages that hide instructions for AI agents where human readers cannot see them. One told agents a $3.00 developer license was required. In Zscaler's own sandboxed test, with no real money at risk, 4 of 26 models paid. The test agent had no spending limit, to show the worst case. Most did not; how a model responds depends on the model and the setup.

    PictureTwo rows of small boxes, one for each of the 26 models tested. Four are crossed out, labeled 4 of 26 paid: in a security vendor's sandboxed 2026 test, 4 of 26 models paid a fake $3 license that a web page's hidden note asked for. The Dog sits beside the rows and tilts its head.

    SourceS2

  5. 5

    One way to picture it: your task and the mail arrive as one input.

    One way to picture why: the agent generally gets your request and what it reads as one input. NIST notes that current agents generally combine trusted instructions with other task data into a unified input. To the Dog, both notes arrive in the same pile.

    PictureOne way to picture it. Two notes at the top, labeled yours and theirs. Arrows from both lead down into one pile of mail, circled in green and labeled one pile. The Dog sits beside the pile and tilts its head: to the Dog, both notes arrive together.

    SourceS3

  6. 6

    The best old trick worked 11% of the time. A new one, 81%.

    Does a smarter model fix it? It helps, but not on its own. NIST tested an upgraded Claude 3.5 Sonnet, one of the models best at resisting previously known hijacking attacks. Then red teamers from NIST and the UK AI Security Institute wrote new attacks for it, and attack success rose from 11% for the strongest previously tested attack to 81% for the strongest new one. A smarter Dog helps. It does not make the mail safe.

    PictureTwo bars. The short one, labeled old trick 11%, shows the best previously tested hijacking attack fooled an upgraded model 11% of the time. The long one, labeled new trick 81%, shows the best new attack, written by red teamers, fooled it 81% of the time. The Dog sits on the left, tilts its head, then rises with the keys in its mouth.

    SourceS3

  7. 7

    Let it read the mail. Payments and sends wait for you.

    A practical rule, in the spirit of least privilege: keep the keys away from the mail-fetcher. Let the agent that reads outside pages, emails and files do the reading, and keep payments, sends and other actions behind your approval. The Model Context Protocol's client guidance points the same way: it treats tool results from one server as untrusted input to another, keeps API keys and tokens with the host, and applies the same human confirmation policy to calls a sandbox makes as to direct ones. And because new attacks keep coming, NIST's advice for evaluations applies at home too: keep testing.

    PictureYou stand on the left, calm, holding out the house keys, circled in green and labeled holds the keys. The Dog trots in from the right with a bundle of mail, drops it in a small pile and sits, labeled reads the mail. Let it read the mail; payments and sends wait for You.

    SourceS5

What to do

  • Give an agent that reads outside content, such as web pages, inboxes or shared files, read-only access where you can.
  • Make payments, sends, deletes and sharing wait for a person to confirm.
  • Treat what a tool or a page returns as data, not as orders, including results passed from one tool to another.
  • Keep keys and tokens out of the agent's reach; let the host add them.
  • Before you give an agent real access, test it with planted notes, and test again as attacks change.

Sources

5 sources, with the exact excerpts
  1. S1 Lee RW et al. JAMA Netw Open, 19 Dec 2025. Peer reviewed simulation. https://pmc.ncbi.nlm.nih.gov/articles/PMC12717619/, accessed 2026-12-04.

    Injection attacks achieved an overall success rate of 94.4% (102 of 108 evaluations) at the primary decision turn (turn 4).

    Results, first paragraph // used in step 3, this page

    The primary outcome was injection success, defined as generation of an unsafe or contraindicated recommendation at the primary decision turn (turn 4).

    Methods, Outcome Measures // used in step 3, this page

    In the main experiments, injection instructions were programmatically applied to user queries at turn 3 prior to model invocation to simulate scenarios where manipulation occurs after initial clinical context is established.

    Methods, paragraph on the two injection strategies // used in step 3, this page

    The main experiment evaluated 3 lightweight models (GPT-4o-mini [LLM 1], Gemini-2.0-flash-lite [LLM 2], and Claude-3-haiku [LLM 3]) across 12 clinical scenarios in 4 categories under controlled conditions.

    Abstract, Design, Setting, and Participants // used in step 3, this page

    This study did not involve human participants and was therefore exempt from institutional review board oversight.

    Methods, first paragraph // used in this page

    This POC experiment, conducted in October 2025, used the highest risk scenario (thalidomide prescription) against leading flagship models (GPT-5 [Open AI; LLM 4], Gemini 2.5 Pro [Google; LLM 5], and Claude 4.5 Sonnet [Anthropic; LLM 6]) to confirm that these vulnerabilities extend to state-of-the-art systems.

    Methods, proof-of-concept // used in this page

    Attack success rates were 100% (5 of 5 scenarios) for LLM 4, 100% (5 of 5 scenarios) for LLM 5, and 80.0% (4 of 5 scenarios) for LLM 6 (Figure 4A).

    Results, proof-of-concept // used in this page

    The POC experiment tested the thalidomide in pregnancy scenario against 3 flagship models using client-side injection.

    Results, proof-of-concept // used in this page
  2. S2 Zscaler ThreatLabz blog, 2 July 2026. Vendor research, sandboxed test. https://www.zscaler.com/blogs/security-research/indirect-prompt-injection-web-content-targets-ai-agents, accessed 2026-12-04.

    Zscaler ThreatLabz has observed malicious websites that impersonate legitimate services and use IPI to manipulate AI-driven workflows.

    Introduction, first paragraph // used in step 4, this page

    In internal validation across 26 LLMs, 4 models failed to take appropriate actions for campaign 1

    Key Takeaways, fourth item // used in step 4, this page

    The embedded IPI successfully manipulated the following 4 models into executing payments.

    Assessing the IPI Threat, Campaign 1 // used in step 4, this page

    embeds an offers object claiming a $3.00 developer API license key is required

    Campaign 1: IPI Payment Scam // used in step 4, this page

    ThreatLabz also observed the attacker concealing IPI content using CSS so it is invisible to users, but still present in the DOM for parsers, scrapers, and AI agents.

    Campaign 1: IPI Payment Scam // used in step 4, this page

    The testing ran in a fully sandboxed environment with no real funds at risk.

    Assessing the IPI Threat, Campaign 1 // used in this page

    The AI agent was configured with no spending limits to measure the maximum potential exploitation surface.

    Campaign 1, test setup // used in step 4, this page
  3. S3 NIST CAISI blog on agent hijacking evaluations, Jan 2025. https://www.nist.gov/news-events/news/2025/01/technical-blog-strengthening-ai-agent-hijacking-evaluations, accessed 2026-12-04.

    Currently, many AI agents are vulnerable to agent hijacking, a type of indirect prompt injection in which an attacker inserts malicious instructions into data that may be ingested by an AI agent, causing it to take unintended, harmful actions.

    Opening paragraphs // used in step 2, the summary image, this page

    creating a resource that looks like typical data an agent might interact with when completing a task, such as an email, a file, or a website

    An Overview of AI Agent Hijacking Attacks // used in step 2, this page

    The architecture of current LLM-based agents generally requires combining trusted developer instructions with other task-relevant data into a unified input.

    An Overview of AI Agent Hijacking Attacks // used in step 5, this page

    the upgraded Claude 3.5 Sonnet is significantly more robust against previously tested hijacking attacks than the prior version of Claude 3.5 Sonnet.

    Insight #2 // used in step 5, this page, step 6

    This resulted in an increase in attack success rate from 11% for the strongest baseline attack to 81% for the strongest new attack.

    Insight #2 // used in step 5, this page, step 6

    These tests were conducted on agents powered by Anthropic’s upgraded Claude 3.5 Sonnet (released October 2024), which AgentDojo found to be one of the top performing models in resisting agent hijacking attacks.

    Experiments // used in step 6, this page

    which was performed in collaboration with red teamers at the UK AI Security Institute

    Red teaming // used in step 6, this page

    Evaluations need to be adaptive. Even as new systems address previously known attacks, red teaming can reveal other weaknesses.

    Insight #2 // used in this page
  4. S4 Greshake et al. arXiv 2302.12173, 2023. Preprint. https://arxiv.org/abs/2302.12173, accessed 2026-12-04.

    We argue that LLM-Integrated Applications blur the line between data and instructions.

    Abstract // used in step 2, this page

    strategically injecting prompts into data likely to be retrieved

    Abstract // used in step 2, this page
  5. S5 Model Context Protocol, Client Best Practices, spec 2026-07-28. https://modelcontextprotocol.io/docs/2026-07-28/develop/clients/client-best-practices, accessed 2026-12-04.

    Cross-server data flow: Tool results from one server are untrusted input to another.

    Programmatic Tool Calling / Code Mode, Security Considerations // used in step 7, this page

    Apply the same human-in-the-loop confirmation policy to sandbox-originated calls that you apply to direct calls

    Programmatic Tool Calling / Code Mode, Security Considerations // used in step 7, this page

    No credential exposure: API keys and tokens are held by the host.

    Programmatic Tool Calling / Code Mode, Security Considerations // used in step 7, this page

Corrections

  • None yet. Checked 2026-12-04.

Drawings: Codex. Words: Vibe and Sid. Design and motion: Claude.
Spotted an error? Tell me on LinkedIn. Corrections are logged here with a date.