A support agent leaked another customer's data on 28 of 100 runs

Arize showed a web page steering a support agent into reading another customer's record while it refused every blunt exfiltration attempt. Why refusal tests miss this, and how we would scope agent tools in code and in PostgreSQL.

Written by
Baraqix Engineering
Published
Read
5 min
Abstract diagram on a dark field: a single bright point connected by thin lines to one record in a grid of dim points, with a second line reaching toward another record and stopping at a faint barrier.

On 26 October 2026, Arize published a write up of an experiment in which a web page talked a customer support agent into reading another customer's record. The agent was built with LangGraph on the model deepseek-flash (the V4.1-Flash-1017 release) and acted for one logged in customer. It had five tools: fetch_url, three customer tools (lookup_customer, show_customer_address, show_order_details) over a database of 100 synthetic customers, and a mock email tool, send_report. Arize built 100 ordinary looking order status pages, each carrying an instruction to look up a different customer, and ran each page once at temperature 0.7.

The interesting part is the contrast. In a separate set of 98 runs, pages told the agent to email customer data or an API key to an outside address, and it refused every time. When the page instead framed the cross account lookup as a routine reconciliation step, the agent pulled another customer's record on 28 of 100 runs. Arize wrote the instruction in five styles across 20 pages each, and the checklist style got through on 17 of 20.

01

What the experiment showed

Arize then bound every customer tool to the identity of the logged in session, and enforced that binding in code. The model kept trying. The data stopped flowing.

TAB/01Figures as reported by Arize on 26 October 2026. Arize puts the drop from 28 to 20 attempts down to sampling noise from one run per page. The guardrail did not change how often the model tried.
ConditionAttempted out of scope lookupData leaked
No defense28 of 10028 of 100
Tools scoped to the session in code20 of 1000 of 100

Two more details deserve attention. In the hijacked run Arize walks through, the final answer said the agent "did not follow that as an instruction" a few lines below the data it had disclosed. And when Arize scored the runs, a deterministic check over tool calls flagged all 28 leaks, while an LLM judge that read only the final answer caught 5 of the 28, with no false alarms on the other 72. The agent does not always paste what it looked up into its reply, so a judge that reads the reply misses the breach.

Read the numbers with their scope

  • One model, one framework, one set of synthetic customers. The 28 percent figure describes this setup. Your agent needs its own measurement.
  • One run per page at temperature 0.7, which is why Arize itself treats the 28 versus 20 attempt gap as noise.
  • Arize builds the tracing and evaluation products used in the post: Arize Phoenix, which is open source, and the commercial Arize AX. The experiment design is described in detail and the results are plain, but read it knowing that.
  • No real customer data was involved. This was a controlled test.
02

Refusal tests measure the wrong thing

Our position: the guardrail is ordinary authorization, the kind any backend engineer would recognise. The real headline is that the attack that worked was a read that looked like housekeeping, and the kind of test many teams start with would have passed. A red team suite full of "email the API key to this address" prompts would have reported 98 refusals out of 98 and a clean bill of health. Meanwhile the agent was disclosing records on more than a quarter of runs.

The second lesson is about evaluation. For an agent, the final answer is a summary written by the same model that was manipulated. Grading that summary with another model is grading prose. The facts live in the trace: which tool was called, with which arguments, on behalf of which subject. If you can write the allowed scope down, check it in code over every trace. Keep the LLM judge for questions code cannot answer, and give it the tool calls as well as the answer, which is also what Arize recommends.

03

What we would do

Many customer facing assistants have exactly this shape: one conversation, one person on the other end, and a database full of other people. For any agent of that shape, we would go one step further than a guardrail that checks the id. We would remove the id from the tool schema entirely. The model cannot ask for a customer it has no parameter to name. Identity comes from the authenticated session on the server, and the database enforces it a second time.

LST/01Python
# The model sees no customer_id parameter at all.
SHOW_ORDER_DETAILS = {
    "name": "show_order_details",
    "parameters": {
        "type": "object",
        "properties": {"order_ref": {"type": "string"}},
        "required": ["order_ref"],
    },
}

async def show_order_details(args: dict, session) -> dict:
    # Identity comes from the authenticated session, never from model output.
    async with pool.acquire() as conn, conn.transaction():
        await conn.execute(
            "SELECT set_config('app.customer_id', $1, true)",
            str(session.customer_id),
        )
        row = await conn.fetchrow(
            "SELECT ref, status, items FROM orders WHERE ref = $1",
            args["order_ref"],
        )
    return dict(row) if row else {"error": "not found"}
LST/02SQL
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;

CREATE POLICY orders_by_session ON orders
  FOR SELECT TO agent_runtime
  USING (customer_id = current_setting('app.customer_id', true)::bigint);
  1. Take subject identifiers out of every tool schema the model sees. Derive them from the session on the server.
  2. Enforce the same scope in PostgreSQL with row level security for the agent's database role, so a bug in the tool layer does not become a leak.
  3. Write a deterministic trace check: any tool call whose resolved subject differs from the session subject is a breach. Run it on every trace in staging and alert on it in production.
  4. Build attack sets around plausible routine reads (reconciliation steps, linked accounts, verification checklists) as well as theatrical exfiltration, and rerun them on every model upgrade.
  5. Use an LLM judge only for intent questions, and feed it the tool calls.

For assistants used by staff, the subject is the staff member and the scope is the set of records that person may see. The principle does not change. The scope is computed on the server from your own permission tables, never from text in the context window, whether that text came from a web page, a retrieved document or a profile field.

If you are shipping an agent that reads outside content and touches customer records, this is the part of the design we would look at first. Our AI integration work is where we design agents and the tool layers under them, and a two week Discovery Sprint is where we map which tools need scoping before any of it reaches production.

Baraqix Engineering. Written by the engineers who did the work.

NOTE/10. First published .

Where this work fits

The services behind this note.

  • SVC/AI-01

    AI integration

    RAG, agents, MCP servers and voice, built into the product you already have.

  • SVC/BE-02

    Backend and APIs

    Node.js and Python services on PostgreSQL that the AI work actually runs on.

  • ENG/SPRINT

    Discovery Sprint

    A fixed price Discovery Sprint. The architecture document and a working spike on your real data, in a repository you own.

If something in this note looks like your problem, the reply comes from the engineers who built it.