Skip to content
IDOR Write-up Beginner

Your AI Agent Has an IDOR Problem

An AI copilot tool took an order identifier supplied by the language model and looked it up without checking whether the record belonged to the caller's tenant. A low-privilege sandbox account could therefore read other tenants' customer records, including names, emails and phone numbers, simply by asking the copilot about foreign order ids.

medium.com

Published on medium.com

Most teams building AI agents obsess over prompt injection and miss a classic web-security bug hiding in the tool-calling layer: IDOR, insecure direct object reference. Say “AI security” and people picture jailbreaks, or a model coughing up its system prompt.

Serhat ÇİÇEK, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The tool that performs the lookup used the model-supplied order id directly against a shared multi-tenant datastore without comparing the record's owner to the authenticated caller's tenant.

Impact

A low-privilege account could read other tenants' customer records, including names, emails and phone numbers, through the chat interface; the text notes the lab is an anonymised reproduction and that the original report has since been fixed.

What the attacker needed

A low-privilege account; access to the AI copilot; guessable order identifiers

The fix

The tool should derive the caller's tenant from the authenticated session and reject any record whose owner does not match, which the text demonstrates blocks every foreign order id.

How it was found

  1. Start the lab application and open it in a browser, where you are logged in as a low-privilege sandbox merchant.
  2. Open the AI copilot and ask it to look up the API logs for an order id that is not yours.
  3. Observe the tool-call receipt showing the record belongs to a different tenant and that no ownership check was performed.
  4. Use the enumeration feature or the included script to sweep a range of order ids through the copilot.
  5. See that many foreign orders from several other tenants are returned.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An AI assistant here can look up orders for you. The lookup code never checked that the order actually belonged to you, so anyone could ask it about someone else's order and get the details back. This is called an insecure direct object reference: the program trusts an identifier without checking who owns the thing it points to.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.