Skip to content
IDOR Write-up Beginner

How I Found an IDOR That Exposed Private CRM Notes

An API endpoint for retrieving engagement objects did not enforce permissions, allowing a low-privileged employee to read private notes created by an administrator. The attacker could access confidential CRM notes by requesting their IDs, which could sometimes be discovered through testing.

Hikmatt Follow

Published on medium.com

Cybersecurity

Hikmatt, 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Photo by Glen Carrie on Unsplash From the original on medium.com

Context

The target was a CRM platform. The feature at the centre of the finding is a private note attached to a contact: an administrator can create a contact and add a note to it. The application also exposes an API that retrieves individual engagement objects, and it is that API which behaved differently from the interface.

The author states that the company name, endpoints, identifiers and sensitive technical details were deliberately removed from the write-up, so the requests below are described by their behaviour rather than by their literal URLs.

Setup

Two accounts were created inside the same organisation:

  1. An administrator account.
  2. A regular employee account with restricted permissions.

The employee was only supposed to see contacts assigned to them. All testing was done with the author's own accounts and test data.

Finding it

Using the administrator account, the author created a contact and added a note containing a unique test message. Logging in as the employee, the contact list was empty, and requesting the administrator's contact directly returned a page-not-found error. The interface was behaving as expected.

The question the author then asked was whether the backend enforced the same rules as the interface. While exploring the application's API, they came across an endpoint responsible for retrieving individual engagement objects. They already had the ID of the note created with the administrator account, so they requested it using the employee's session.

Exploitation

Step 1: request the administrator's note with the employee session

The employee session was used to call the engagement retrieval endpoint with the note ID obtained from the administrator account. The author expected a 403 or a 404.

Instead the response was HTTP 200 OK. The body contained the entire note, its owner's identifier and some additional metadata, including the unique test message that had been written with the administrator account. The exact request is not reproduced in the write-up.

Step 2: try a second endpoint for the same object

The author found another API endpoint that could be used to request the same type of object. Using the same employee account and the same object ID, they sent another request. This time the response was a 404.

Step 3: repeat the first request

Going back to the original endpoint and repeating the request returned the private note again. The same user and the same object produced two completely different responses depending on the endpoint. The author could not confirm exactly why the second endpoint returned a 404, but the first endpoint was clearly returning information the employee could not reach through the normal interface.

Step 4: check whether IDs can be discovered

Having an administrator account made it easy to obtain the ID during testing, but a real attacker would not necessarily have that information. The author tested whether engagement IDs could be discovered without already knowing them. After additional testing with a small number of candidate IDs, they located another administrator-created note containing a test message.

This showed that knowing the exact ID beforehand was not always necessary. The author is careful to note that this did not mean every note in the organisation could be easily discovered, only that ID discovery was possible in this controlled test.

Root cause

The interface hid the contact from the employee and returned a page-not-found error on direct access, but the engagement retrieval endpoint did not apply the same authorisation check on the backend. The object was returned to a session that had no right to it. The second endpoint for the same object type did return a 404; the author could not confirm exactly why.

Impact

CRM notes can hold customer conversations, internal discussions, sales negotiations and other confidential business information, not just reminders. A restricted employee reading another user's private notes could expose information they were never supposed to see.

The author demonstrated read access within the same organisation only. Cross-organisation access and the ability to modify or delete notes were not demonstrated. The report was eventually closed as a duplicate.

Fix

The write-up does not describe any fix.

Variants to test

  1. Parallel endpoints for the same object. Find every API route that returns the same resource type and call each one with a low-privileged session and an object ID owned by another user.
  2. ID enumeration. Request a small range of candidate IDs with a restricted session and look for objects belonging to other users.
  3. Interface versus API parity. For each object hidden in the UI, request it directly through the API.
  4. Owner identifier in the response. Check whether responses include the owner's identifier and metadata, which confirms the object belongs to someone else.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A security researcher was testing a CRM (Customer Relationship Management) platform, which is software that companies use to keep track of contacts, conversations, and internal notes. The researcher found that a low-privileged employee account could read private notes that belonged to an administrator, even though the normal interface hid those notes. This kind of flaw is called an IDOR (Insecure Direct Object Reference): the application gives you a direct reference (like an ID number) to an object, and the backend fails to check whether you are allowed to access that object. The researcher demonstrated read access within the same organisation, and the report was later closed as a duplicate.

Photo by Glen Carrie on Unsplash From the original on medium.com

Photo by Glen Carrie on Unsplash

Context

The target was a CRM platform. The feature at the centre of the finding is a private note attached to a contact: an administrator can create a contact and add a note to it. The application also exposes an API that retrieves individual engagement objects, and it is that API which behaved differently from the interface.

What is a CRM? Think of it as a shared address book combined with a diary: salespeople and support staff record who they talked to, what was said, and what should happen next. Contacts are the people or companies; notes are the comments attached to them.

What is an API? An API (Application Programming Interface) is a way for software to talk to other software. When you use a website, your browser sends requests to the server and gets back web pages. An API is similar, but it returns raw data (often in JSON format) instead of a full web page. Many mobile apps and front-end scripts use APIs behind the scenes. If the website is a waiter taking your order, the API is the kitchen window where orders are passed in a standard format.

What is an engagement object? In this CRM, an "engagement" seems to be a record of some interaction, and the API can retrieve an individual engagement by its ID. The API can retrieve an individual engagement by its ID.

What is an ID? An ID is a unique identifier, like a student number or a order number. Applications use IDs to refer to specific records. If IDs are guessable (for example, sequential numbers), an attacker might try different IDs to access other people's data.

What is an IDOR? Insecure Direct Object Reference. It happens when an application takes an ID from the user and uses it to fetch a record without checking that the user is allowed to see that record. Imagine a hotel receptionist who gives you a room key whenever you ask for a room number, without checking whether you are a guest or whether that room is yours.

The author states that the company name, endpoints, identifiers and sensitive technical details were deliberately removed from the write-up, so the requests below are described by their behaviour rather than by their literal URLs.

Setup

Two accounts were created inside the same organisation:

  1. An administrator account.
  2. A regular employee account with restricted permissions.

The employee was only supposed to see contacts assigned to them. All testing was done with the author's own accounts and test data.

Why two accounts? To test access control, you need at least two users with different privileges. The administrator represents a user with high privileges; the employee represents a low-privileged user. By comparing what each can see, you can spot inconsistencies.

What is an organisation? In many SaaS (Software as a Service) products, an organisation (or tenant) is a group of users that share data. Users in one organisation should not see data from another organisation. Here, both accounts were in the same organisation, so the researcher was testing access within a single tenant.

Finding it

Using the administrator account, the author created a contact and added a note containing a unique test message. Logging in as the employee, the contact list was empty, and requesting the administrator's contact directly returned a page-not-found error. The interface was behaving as expected.

The question the author then asked was whether the backend enforced the same rules as the interface. While exploring the application's API, they came across an endpoint responsible for retrieving individual engagement objects. They already had the ID of the note created with the administrator account, so they requested it using the employee's session.

What is an endpoint? An endpoint is a specific URL (or route) that an API exposes. For example, /api/notes/123 might be an endpoint to get note 123. Each endpoint performs a particular function.

What is a session? When you log in, the server gives your browser a session identifier (often stored in a cookie). This identifier is sent with every request so the server knows who you are. Think of it as a wristband you get at an event: it proves you paid, and you show it to get back in. If someone else gets your wristband, they can impersonate you.

Why check the backend? The interface (what you see in the browser) might hide buttons or show error messages, but that is just the front-end. The backend (the server and database) is where the real access control must be enforced. If the backend does not check permissions, an attacker can bypass the interface by calling the API directly.

Exploitation

Step 1: request the administrator's note with the employee session

The employee session was used to call the engagement retrieval endpoint with the note ID obtained from the administrator account. The author expected a 403 or a 404.

Instead the response was HTTP 200 OK. The body contained the entire note, its owner's identifier and some additional metadata, including the unique test message that had been written with the administrator account. The exact request is not reproduced in the write-up.

What are HTTP status codes? When a server responds to a request, it includes a three-digit status code. Common ones:

  • 200 OK: success, here is the data.
  • 403 Forbidden: you are authenticated but not allowed to access this.
  • 404 Not Found: the resource does not exist (or the server hides it).

Why expect 403 or 404? If the backend correctly enforced permissions, the employee should either be told "forbidden" (403) or the note should appear not to exist (404). Getting 200 with the note's content means the backend did not check permissions.

What is metadata? Metadata is data about data. In this context, it includes details like the owner's ID, timestamps, or other properties of the note. The owner's identifier is particularly useful because it tells you who the note belongs to.

Step 2: try a second endpoint for the same object

The author found another API endpoint that could be used to request the same type of object. Using the same employee account and the same object ID, they sent another request. This time the response was a 404.

Why try another endpoint? Different endpoints might have different code paths and different permission checks. One endpoint might be secure while another is not. By testing multiple endpoints that access the same object, you can find inconsistencies.

Step 3: repeat the first request

Going back to the original endpoint and repeating the request returned the private note again. The same user and the same object produced two completely different responses depending on the endpoint. The author could not confirm exactly why the second endpoint returned a 404, but the first endpoint was clearly returning information the employee could not reach through the normal interface.

What does this mean? The inconsistency shows that two endpoints for the same object behaved differently; the author could not confirm exactly why.

Step 4: check whether IDs can be discovered

Having an administrator account made it easy to obtain the ID during testing, but a real attacker would not necessarily have that information. The author tested whether engagement IDs could be discovered without already knowing them. After additional testing with a small number of candidate IDs, they located another administrator-created note containing a test message.

This showed that knowing the exact ID beforehand was not always necessary. The author is careful to note that this did not mean every note in the organisation could be easily discovered, only that ID discovery was possible in this controlled test.

What is ID enumeration? Enumeration means trying a series of IDs (like 1, 2, 3, ...) to see which ones return valid objects. If IDs are sequential or predictable, an attacker can write a script to try many IDs and collect data. Even if IDs are random, sometimes they can be leaked or guessed.

Why is this important? If an attacker can discover IDs, the IDOR becomes more serious because they don't need prior knowledge of the ID.

Root cause

The interface hid the contact from the employee and returned a page-not-found error on direct access, but the engagement retrieval endpoint did not apply the same authorisation check on the backend. The object was returned to a session that had no right to it. The second endpoint for the same object type did return a 404; the author could not confirm exactly why.

What is authorisation? Authorisation is the process of checking whether a user has permission to perform an action or access a resource. Authentication is about proving who you are (login); authorisation is about what you are allowed to do. The root cause here is missing authorisation on one endpoint.

Impact

CRM notes can hold customer conversations, internal discussions, sales negotiations and other confidential business information, not just reminders. A restricted employee reading another user's private notes could expose information they were never supposed to see.

The author demonstrated read access within the same organisation only. Cross-organisation access and the ability to modify or delete notes were not demonstrated. The report was eventually closed as a duplicate.

What is cross-organisation access? It means accessing data belonging to a different organisation (tenant). That would be more severe because it could expose data across customers. The author did not test that.

What does "closed as a duplicate" mean? Bug bounty programs often receive multiple reports for the same issue. If someone else reported it first, your report is marked as a duplicate.

Fix

The write-up does not describe any fix.

What is object-level ownership? It means checking that the object belongs to the user (or the user's organisation) before returning it. For example, before returning a note, the server should verify that the note's owner ID matches the requesting user's ID or that the user has explicit permission.

What is organisation scoping? Ensuring that data is confined to the organisation it belongs to. Users should only access data within their own organisation.

Variants to test

  1. Parallel endpoints for the same object. Find every API route that returns the same resource type and call each one with a low-privileged session and an object ID owned by another user.
  2. ID enumeration. Request a small range of candidate IDs with a restricted session and look for objects belonging to other users.
  3. Interface versus API parity. For each object hidden in the UI, request it directly through the API.
  4. Owner identifier in the response. Check whether responses include the owner's identifier and metadata, which confirms the object belongs to someone else.

Glossary

  • API: Application Programming Interface; a set of rules and endpoints that allow software to communicate with a server, often returning data in JSON format.
  • Backend: The server-side part of an application that handles data storage, business logic, and security checks.
  • CRM: Customer Relationship Management; software for managing contacts, interactions, and notes.
  • Endpoint: A specific URL or route in an API that performs a function, such as retrieving a note.
  • Engagement object: A record of an interaction in the CRM; in this context, a note attached to a contact.
  • ID: A unique identifier for a record, such as a number or string.
  • IDOR: Insecure Direct Object Reference; a vulnerability where an application exposes a direct reference to an object without proper authorisation checks.
  • HTTP status code: A three-digit number in a server response indicating the outcome (e.g. 200 OK, 403 Forbidden, 404 Not Found).
  • Metadata: Data that describes other data, such as an owner's ID or timestamps.
  • Organisation (tenant): A group of users sharing data in a multi-tenant application; access should be restricted to the organisation.
  • Session: A period of interaction between a user and an application, often identified by a cookie or token.
  • Authorisation: The process of checking whether a user has permission to access a resource.
  • Authentication: The process of verifying a user's identity, typically via login credentials.
  • Enumeration: Systematically trying a series of IDs or values to discover valid resources.
  • Object-level ownership: The property that an object belongs to a specific user or entity, which should be checked before access.
  • Organisation scoping: Restricting data access to the organisation it belongs to.
  • Duplicate: A bug report that describes an issue already reported by someone else.

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.