IDOR in a Third-Party AI Chat Widget: Sensitive Data Exposure
A third-party AI chat widget's contact upsert endpoint returned contact records for any email address supplied, without checking that the requester owned that account. An attacker who knew a victim's email address could retrieve their name, phone number, role and internal user and organisation identifiers.
infosecwriteups.com
Published on infosecwriteups.com
Cybersecurity
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.
Context
The target was a web platform with a dashboard that embedded a third-party AI chat widget. Rather than calling the platform's main API, the widget sent its requests to a separate domain. The feature involved is the widget's contact record handling: when a user's profile details change, the widget backend stores or updates a contact record for that user, keyed by email address and enriched with custom data such as role and internal identifiers.
The report does not name the platform, the widget vendor, or the endpoint's host.
Setup
The researcher was testing the platform with Burp Suite in the request path, which is how the widget's traffic to the separate domain became visible. Two accounts under the researcher's own control were used: the primary account whose profile name was changed to trigger the request, and a second account whose email address was supplied in the follow-up test. No other users' data was accessed.
Finding it
While reviewing traffic in Burp Suite, the researcher noticed that the dashboard's AI chat widget was sending requests to a different domain instead of the platform's main API. That stood out because it means the widget's backend is a separate trust boundary from the application itself, and its authorisation behaviour is not necessarily covered by whatever protects the main API.
To see what the widget sent, the researcher changed their profile name. That action triggered the following request:
POST /backend/widget/contact/upsert HTTP/2Host: [redacted]Content-Type: application/jsonX-Bot-Token: [redacted]
with this body:
{ "name": "owners", "email": "[redacted]", "phone": "...", "external_id": "...", "customData": { "role": "Owner", "organizationToken": "org_...", "userToken": "user_..." }}
The endpoint is contact/upsert, and the body carries an email address together with other user details: a name, a phone number, an external identifier, and a customData object holding the user's role plus organisation and user tokens. The request is authenticated with an X-Bot-Token header rather than a user session cookie.
The presence of the email address as a plain field in an upsert call is what prompted the next step: what happens if that email is changed?
Exploitation
Step 1: strip the request down to the email
The researcher removed the extra fields and sent a request carrying only the email address of the second account they controlled:
POST /backend/widget/contact/upsert HTTP/2Host: [redacted]Content-Type: application/jsonX-Bot-Token: [redacted]
{ "email": "[redacted]"}
The only identifying input is the email address. The X-Bot-Token header is still present, and the request carries no user session.
Step 2: read the response
The API returned the contact record for that email. The response included the name, phone number, role, and internal user and organisation identifiers belonging to the second account.
That is the vulnerability: the endpoint returned another account's contact information without appearing to check whether the caller was authorised to access it. The researcher confirmed the behaviour between two accounts they controlled and did not access anyone else's data.
Root cause
The endpoint treats the email address in the request body as the key for the record to read or write, and does not appear to verify that the caller is entitled to that record. The request is authenticated with an X-Bot-Token header rather than a user session, and nothing in it visibly ties the operation to the account that owns the email. The same call that updates a record also returned one, so a write-shaped endpoint acted as a read.
This is likely a missing object-level authorisation check on the backend that serves the widget, rather than a flaw in the main application's API. The main API's controls would not apply to a separate domain with its own token model.
Impact
The researcher confirmed the behaviour only between two accounts they controlled and did not test it across other users, so the number of accounts that might be affected is unknown.
If the same behaviour applied to other accounts, someone who knew another user's email address could potentially retrieve that user's contact information without the victim doing anything. Depending on the records returned, this could expose personal information (name, phone number) and internal account metadata (role, user and organisation identifiers).
Fix
The report does not describe a fix or a vendor response.
Variants to test
What happened, in plain words
A security researcher was testing a website that has a dashboard, and on that dashboard there was a chat widget powered by artificial intelligence. The widget was not part of the main website: it was made by a different company and it talked to its own separate server. When the researcher looked at the traffic the widget was sending, they noticed that a request contained an email address as a plain field. They changed that email to the address of a second account they controlled, sent the request again, and the server replied with the second account's contact details: name, phone number, role, and internal identifiers. In other words, the server handed over another account's information without checking whether the person asking was allowed to see it. This kind of flaw is called an IDOR, short for Insecure Direct Object Reference: the server takes an identifier straight from the request and uses it to look up a record, without confirming that the requester owns that record.
The researcher only tested this between two accounts they owned themselves. They did not look at anyone else's data, so how many real users could be affected is not known.
The pieces you need to know first
Before walking through the steps, here are the basic ideas the story relies on.
- A web request is what your browser sends to a website when you click something or load a page. It is a short message with a method (such as
GETto read orPOSTto send data), a path (which part of the site you want), some headers (extra information, like who you are), and sometimes a body (the actual data you are sending). Think of it as an envelope: the address is on the outside, the letter is inside. - An API is a server that answers requests with data rather than with a web page. When a website's own code needs information, it often asks an API behind the scenes. A useful comparison is a restaurant: the menu and the waiter are the API, and you do not walk into the kitchen yourself. You ask for a dish by name and the kitchen prepares it.
- A token is a short string of characters that acts like a pass or a ticket. Instead of sending a username and password with every request, software sends a token that the server recognises. A session cookie is a similar idea stored in your browser: it is how a website remembers that you are logged in. The important distinction in this story is between a token that belongs to one user (a session) and a token that belongs to the widget itself (shared by everyone using it).
- An endpoint is one specific address on a server that does one specific job, for example
contact/upsert. You can think of it as one counter in a large office: each counter handles one kind of paperwork. - Upsert means "update or insert". An upsert endpoint either changes an existing record or creates a new one if it does not exist yet. The catch, which matters here, is that such an endpoint may also send the record back to you after writing it, which turns a "save" action into a way of reading data.
- Burp Suite is a tool used by security testers. It sits between your browser and the website, like a recording machine on a phone line, so you can see every request and response and change requests before they are sent.
- An IDOR (Insecure Direct Object Reference) is a vulnerability where the server uses an identifier supplied by the client (an email, a user number, a document ID) to fetch a record, but never checks that the client is allowed to access that particular record. The everyday comparison is a hotel: if reception gives you a key card for room 204 and the door system only checks that the card is valid, not which room it belongs to, then any valid card opens any door.
- Authorisation is the check that answers "is this person allowed to do this?". It is different from authentication, which only answers "who is this person?". A server can know exactly who you are and still fail to check what you are permitted to see.
The setup
The target was a web platform with a dashboard. Embedded in that dashboard was a third-party AI chat widget, meaning a chat component supplied by another company rather than built by the platform itself. The researcher had Burp Suite in the path between their browser and the site, which is how the widget's traffic became visible in the first place. They used two accounts that they controlled themselves: a primary account, whose profile name they changed to make the widget send a request, and a second account, whose email address they used in the follow-up test. No other users' data was touched.
The report does not name the platform, the widget vendor, or the host that the widget's requests went to.
Finding it
While reviewing the traffic in Burp Suite, the researcher noticed that the dashboard's AI chat widget was sending requests to a different domain instead of the platform's main API. That is worth pausing on. A different domain means a different server, run by a different party, with its own way of deciding who may do what. Whatever protections the main application has do not automatically apply there. It is like finding out that the safe in your office is actually managed by an outside contractor with their own set of keys.
To see what the widget was sending, the researcher changed their profile name. That ordinary action, something any user might do, caused the widget to send the following request:
POST /backend/widget/contact/upsert HTTP/2Host: [redacted]Content-Type: application/jsonX-Bot-Token: [redacted]
Line by line:
POST /backend/widget/contact/upsert HTTP/2says the request is aPOST(a request that sends data), aimed at the path/backend/widget/contact/upsert, using version 2 of the HTTP protocol. The path tells you this is the widget's backend and that the action is an upsert on a contact record.Host: [redacted]names the server the request is addressed to. The actual host is hidden here.Content-Type: application/jsontells the server that the body of the request is formatted as JSON, a common text format for structured data.X-Bot-Token: [redacted]is a custom header carrying a token. The name suggests it identifies the bot (the widget) rather than a person. That detail becomes the heart of the problem later.
The body of that request was:
{ "name": "owners", "email": "[redacted]", "phone": "...", "external_id": "...", "customData": { "role": "Owner", "organizationToken": "org_...", "userToken": "user_..." }}
Line by line:
"name": "owners"is the name stored on the contact record."email": "[redacted]"is the email address. This is the field that identifies which contact record is being written."phone": "..."is a phone number, shown here as a placeholder."external_id": "..."is an identifier used by some other system to refer to the same person."customData"is a nested object, meaning a group of fields inside the main one. It holds"role": "Owner", plus"organizationToken": "org_..."and"userToken": "user_...", which are internal identifiers for the organisation and the user.
The endpoint is contact/upsert, and the body carries an email address together with other user details. The request is authenticated with the X-Bot-Token header rather than with a user session cookie. That is the observation that prompted the next step: if the email is just a field in the body, what happens when it is changed?
Testing it
Step 1: strip the request down to the email
The researcher removed the extra fields and sent a request carrying only the email address of the second account they controlled:
POST /backend/widget/contact/upsert HTTP/2Host: [redacted]Content-Type: application/jsonX-Bot-Token: [redacted]
{ "email": "[redacted]"}
Line by line:
- The request line, host, content type and
X-Bot-Tokenheader are unchanged from the original. The same widget credential is being used. - The body now contains a single field:
"email": "[redacted]". This is the address of the researcher's second account, not the account whose profile change triggered the original request.
The reasoning behind this step is simple. If the server uses the email in the body to decide which record to work on, then supplying a different email should make it work on a different record. Removing the other fields also makes the test cleaner: if the response still comes back full, the email alone was enough to select the record.
The only identifying input is the email address. The X-Bot-Token header is still present, and the request carries no user session. In hotel terms, the key card proves you are a guest of the hotel, but it does not say which room is yours.
Step 2: read the response
The API returned the contact record for that email. The response included the name, phone number, role, and internal user and organisation identifiers belonging to the second account.
That is the vulnerability: the endpoint returned another account's contact information without appearing to check whether the caller was authorised to access it. The researcher confirmed the behaviour between two accounts they controlled and did not access anyone else's data.

Why it happens
The endpoint treats the email address in the request body as the key for the record to read or write, and does not appear to verify that the caller is entitled to that record. The request is authenticated with an X-Bot-Token header rather than a user session, and nothing in it visibly ties the operation to the account that owns the email. The same call that updates a record also returned one, so a write-shaped endpoint acted as a way of reading data.
This is likely a missing object-level authorisation check on the backend that serves the widget, rather than a flaw in the main application's API. The main API's controls would not apply to a separate domain with its own token model. "Object-level" simply means the check is about the individual record (this contact, this document, this order), not about the general action (may this user edit contacts at all).
Impact
The researcher confirmed the behaviour only between two accounts they controlled and did not test it across other users, so the number of accounts that might be affected is unknown.
If the same behaviour applied to other accounts, someone who knew another user's email address could potentially retrieve that user's contact information without the victim doing anything. Depending on the records returned, this could expose personal information (name, phone number) and internal account metadata (role, user and organisation identifiers). The victim would not need to do anything.
Fix
Variants to test
Final thoughts
The researcher's closing point is that third-party integrations are easy to overlook. It is natural to focus on the main application's API and forget everything else running in the background. Chat widgets, support tools and analytics services all make requests somewhere, and it is worth checking what data they send and whether the APIs behind them enforce proper authorisation. Sometimes the interesting bugs are not in the main application at all.
Glossary
- API: a server that answers requests with data rather than web pages, used by software to talk to other software.
- Authentication: the process of proving who you are, for example by logging in.
- Authorisation: the check of whether an identified person is allowed to perform a particular action or see a particular record.
- Body: the part of a request that carries the actual data being sent, as opposed to the address and headers.
- Burp Suite: a tool that sits between a browser and a website so a tester can record, inspect and modify requests and responses.
- Contact record: the stored entry for a person in the widget's system, holding details such as name, email, phone and role.
- Cookie: a small piece of data a website stores in your browser, often used to remember that you are logged in.
- Cross-account: involving data that belongs to a different user account than the one making the request.
- customData: a nested group of extra fields inside a JSON body, here holding role and internal identifiers.
- Domain: the name of a server on the internet, such as example.com; a different domain means a different server and often a different owner.
- Endpoint: one specific address on a server that performs one specific job.
- External ID: an identifier used by another system to refer to the same person.
- Header: extra information attached to a request, such as the content type or a token.
- Host: the header that names which server a request is addressed to.
- HTTP/2: version 2 of the protocol browsers and servers use to exchange requests and responses.
- IDOR (Insecure Direct Object Reference): a flaw where the server uses an identifier from the request to fetch a record without checking that the requester is allowed to access that record.
- Impact: the practical harm a vulnerability could cause if it were exploited.
- Integration: a third-party component or service connected to a website, such as a chat widget or analytics tool.
- JSON: a text format for structured data, built from names and values in curly braces.
- Object-level authorisation: a check that a specific record, not just the general action, may be accessed by this caller.
- Organisation token: an internal identifier for an organisation in the widget's system.
- POST: an HTTP method used to send data to a server, often to create or change something.
- Request: the message a browser or app sends to a server asking it to do something.
- Response: the message a server sends back, containing the result or the requested data.
- Root cause: the underlying reason a vulnerability exists, as opposed to its visible symptom.
- Session: the period during which a server recognises you as a logged-in user, usually tracked by a cookie or token.
- Third-party: supplied by a company other than the one running the website.
- Token: a string of characters used like a pass or ticket to prove identity or permission.
- Upsert: an operation that updates an existing record or inserts a new one if it does not exist.
- User token: an internal identifier for a user in the widget's system.
- Vulnerability: a weakness in software that could be used to cause harm or gain unauthorised access.
- Widget: a small embedded component on a web page, here an AI chat box, often provided by an outside company.
- X-Bot-Token: the custom header carrying a token in the widget's request.