Skip to content
IDOR Write-up Beginner

How I Hacked an AI Chatbot to Expose Thousands of Customer Records (IDOR + Prompt Injection)

An AI chatbot on an e-commerce site allowed unauthenticated users to retrieve customer PII (email, shipping address, phone) by supplying an order ID. The order IDs were sequential and the backend API lacked authentication and authorization checks, enabling mass enumeration of customer records.

sumitshahorg Follow

Published on medium.com

I’m Sumit Shah, a cybersecurity researcher and bug bounty hunter from India. You might know me from my Instagram page @hacksagex, where I share hacking tools, POCs, and educational content about cybersecurity.

Sumit Shah (HackSage), 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

Likely the backend API that the chatbot called to fetch order details did not enforce authentication or authorization, and order IDs were sequential and guessable.

Impact

An attacker could enumerate all orders and extract complete customer PII including emails, phone numbers, and full shipping addresses, enabling phishing, identity theft, and physical security risks.

What the attacker needed

No account needed; internet access; knowledge of order ID format

The fix

The chatbot should be taken offline until proper authentication and authorization checks are added to the backend API, and non-sequential order IDs should be used.

How it was found

  1. Visit the website without logging in and open the AI chatbot widget.
  2. Craft a prompt asking for contact information for a specific order ID.
  3. The chatbot returns the email address associated with that order.
  4. Try another order ID to get the shipping address.
  5. Request multiple order IDs in one prompt to get several records at once.

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.

A chatbot is a computer program that talks to people. Here, the chatbot could look up order details when given an order number. But it never checked if the person asking was logged in or owned that order. Because order numbers were simple and predictable, anyone could ask for any order and get private information like email and home address.

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.

More by sumitshahorg

View all

2 more disclosed reports, best first.

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.