← Back to the websiteSample assessment / Fictional system
One tool.
Two tenants.
A missing boundary.
What an actionable agent security finding can look like, from the requested action to a verifiable fix.
Demonstration, not a client result.This fictional support agent and synthetic evidence illustrate a deliverable. No production system was assessed. Severity would depend on the actual data, exposure and compensating controls.
Scope and intended behavior
A support assistant retrieves invoices for the authenticated customer. The test covers one read-only tool, two synthetic tenants and the authorization boundary between the agent and the invoice service. Billing changes, infrastructure and other tools are excluded.
Finding BD-DEMO-01
Cross-tenant invoice access through a model-controlled argument. The tool accepts a tenant identifier supplied in the proposed call. The backend uses that value without binding it to the authenticated customer. A changed argument can return another tenant’s invoice.
Expected: the authenticated tenant A can read only tenant A invoices.
Requested: get_invoice(tenant="B", invoice="INV-002") under tenant A’s session.
Vulnerable fixture result: tenant B’s synthetic invoice is returned.
Impact: unauthorized disclosure if the same boundary is missing in a real deployment.
Reproduction
- Create isolated synthetic tenants A and B, each with an invoice.
- Authenticate as tenant A and confirm that its own invoice is accessible.
- Propose a tool call for tenant B’s invoice using the same authenticated session.
- Capture the tool result and backend access log. Establish whether the foreign record was actually returned.
A deterministic call is enough to establish this authorization defect. Prompt injection could influence the proposed arguments, but its success is a separate test. A refusal in model text would not demonstrate backend enforcement.
Recommended fix
Derive the tenant from trusted authentication context. Reject conflicting arguments and scope the database lookup to that tenant. Enforce the same rule at the backend even if a gateway also checks it. Record the authenticated principal, resource and decision without logging invoice contents.
Retest acceptance criteria
- Tenant A’s legitimate read still succeeds.
- Tenant A’s request for tenant B’s invoice fails without returning foreign data.
- Direct backend calls enforce the same tenant boundary.
- Malformed requests and missing authentication fail safely.
- Logs allow the test request and denial to be correlated.
Coverage and limits
This finding addresses tenant isolation for one tool. It does not establish protection against every prompt injection, approval replay, credential compromise or data path. A full assessment records tested paths, excluded components and remaining uncertainty.
Run the small example ↗ Discuss your system ↗
← Back to the websiteTechnical note / Local synthetic example
Can your agent read another tenant’s data?
Treat the proposed tool call as input. Bind access to the authenticated principal at the point where data is returned.
Imagine a support agent told to serve only its current customer. Its invoice tool still accepts a tenant argument. If the backend trusts that argument, the instruction offers no enforced tenant isolation.
Reproduce the boundary failure
Save this as tenant_boundary_demo.py and run python3 tenant_boundary_demo.py. It uses only the Python standard library and synthetic data. No network calls or model are involved.
Expected output
Vulnerable: synthetic invoice B
Protected: denied
Own tenant: synthetic invoice A
The first call returns a foreign invoice. The protected version checks the requested tenant against trusted session context before looking up the record. Its assertion also verifies that the legitimate read continues to work.
What this does and does not prove
This is an authorization test, not a prompt injection benchmark. It demonstrates the effect of a proposed out-of-scope tool call. Whether an attacker can persuade a particular model to propose that call needs a separate behavioral test.
Apply it to a real system
- Establish the principal from verified authentication, outside model-controlled arguments.
- Carry its tenant context through the gateway and backend.
- Authorize the specific resource, including object ownership.
- Test both the tool route and direct backend access.
- For writes, bind approvals to the exact action and arguments, with expiration and replay protection.
A tenant check is only one part of the design. Production systems also need proper authentication, resource permissions, input validation, audit handling and controls appropriate to each action.
See the sample finding ↗ Discuss your workflow ↗