Skip to content
IDOR Disclosed report Beginner

IDOR in marketing calendar tool

An API endpoint returned calendar status information without checking whether the requesting user owned or was invited to the calendar. An attacker could enumerate calendar IDs to learn how many calendars exist, how many users connected a Google Analytics account, and how many calendars a known user owns.

a_d_a_m Follow

Originally disclosed on HackerOne

Medium 5.0 View original
  • Triaged in 16 hours
  • Fixed in 16 days
  • Paid in 10 days
  • Disclosed after 46 days

#INTRODUCTION

##I used two accounts to search for this vulnerability: Id: █████ Email: ██████ Id: ███ Email: ███

##IP used: 78.194.169.36

##Endpoint URL: https://ec.semrush.com/api/v1/ga/user_status/?calendar_id=CALENDAR_ID

#EXPLOITATION

##Description of Security Issue: When a marketing calendar is loaded in the browser, the site sends a request such as this:

Capture.PNG
Capture.PNG From the original on HackerOne

. This request returns information such as if the owner has connected a google analytic account and the owner's user id associated with the calendar with the id pass in parameter. The problem comes from the fact that it is not verified that the user making the request has the calendar or that the person is invited to consult it.

#RESOLUTION Check that the user making the request has the calendar or that the person is invited to consult the calendar.

Impact

##Exploit scenario for this vulnerability:

  • A user such as a concurrent service could by bruteforcing the "calendar_id" parameter establish a list of all calendars and the number of unique users who have created calendars. It will also know the number of users who have connected their google analytic account on it. This represents bussiness data.

  • A user who knows someone's user_id (because he was invited to a calendar owned by the victim for example) can by bruteforcing the parameter "calendar_id" establish the number of calendar owned by the victim and the number of calendar being linked to a google analytic account.

The original report as published on HackerOne, by a_d_a_m. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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.

Context

Semrush runs a marketing calendar feature, and the report concerns the API behind it on *.semrush.com. When a marketing calendar is loaded in the browser, the front end calls an endpoint on ec.semrush.com to fetch the status of the calendar owner's Google Analytics connection. The endpoint is:

Text
https://ec.semrush.com/api/v1/ga/user_status/?calendar_id=CALENDAR_ID

That request is meant to tell the page whether the owner of the calendar has connected a Google Analytics account, and it also returns the owner's user id associated with the calendar whose id is passed in the parameter.

Setup

The researcher used two accounts to look for the vulnerability:

  • Account one: id █████, email █████
  • Account two: id ███, email ███

The IP address used was [redacted].

No other tooling, roles or preconditions are described in the report.

Finding it

The observation came from watching the traffic the site generates when a marketing calendar is loaded. The browser sends the user_status request shown above, and the response contains information about the calendar owner: whether they have connected a Google Analytics account, and their user id.

The problem is that the endpoint does not verify that the user making the request owns the calendar, or that the user has been invited to consult it. The calendar_id value is taken from the request and used to look up the owner's data without any check against the caller's identity.

Capture.PNG
Capture.PNG From the original on HackerOne

Exploitation

Step 1: capture the request

Load a marketing calendar in the browser and observe the request the page makes:

HTTP
https://ec.semrush.com/api/v1/ga/user_status/?calendar_id=CALENDAR_ID

The only input that selects the object is calendar_id. There is no other identifier tying the request to the authenticated user.

Step 2: change the calendar id

With a second account, send the same request with a calendar_id that belongs to someone else. Because the server does not check ownership or invitation, the response still returns the owner's status: whether a Google Analytics account is connected, and the owner's user id associated with that calendar.

Step 3: enumerate

Since the only thing that changes between requests is the calendar_id parameter, it can be brute forced. Each valid id returns the corresponding owner's data, so iterating over the parameter builds up a picture of calendars and their owners.

Root cause

The endpoint performs an object lookup keyed entirely on a client-supplied calendar_id and returns owner-level data without an authorisation check. The report states plainly that it is not verified that the user making the request has the calendar or that the person is invited to consult it. In other words, the access control that should tie the calendar to the requesting user is missing, so a caller can read the status of any calendar whose id they can guess or enumerate.

Impact

The report gives two exploit scenarios.

  1. A user, such as a concurrent service, could brute force the calendar_id parameter to establish a list of all calendars and the number of unique users who have created calendars. They would also learn the number of users who have connected their Google Analytics account. The report describes this as business data.

  2. A user who knows someone's user_id, for example because they were invited to a calendar owned by the victim, can brute force the calendar_id parameter to establish the number of calendars owned by the victim and the number of calendars linked to a Google Analytics account.

The exposure is read-only information about calendar ownership and Google Analytics connection status, plus the owner's user id. The report does not describe any way to modify calendars or read their contents.

Fix

The report's resolution is to check that the user making the request has the calendar, or that the person is invited to consult the calendar, before returning the status. The report does not say whether or how this was implemented.

Variants to test

  • Other endpoints on the same API that take a calendar_id (or similar object id) and return owner or account metadata. A positive result is a response for an id you do not own that contains data about its owner.
  • Endpoints that return connection status for third-party integrations (Google Analytics here). These often expose account linkage and identifiers rather than content, which is still useful for enumeration.
  • Sequential or low-entropy object ids. A positive result is that incrementing or decrementing the id returns different owners' records rather than an error or an empty response.
  • Invitation-based access. If you are invited to one calendar owned by a victim, try other ids belonging to the same owner to see whether the invitation check is scoped to the calendar or to the owner.

Hunting notes

This kind of bug tends to sit in small status or metadata endpoints that the front end calls on page load, rather than in the main object endpoints that receive more scrutiny. The signal during recon is a request whose only selector is an object id in a query parameter, especially one that returns owner-level fields such as a user id or an integration status. Comparing the response for your own id with the response for an id you do not own, from a second account, is enough to confirm it. The report establishes impact by describing what enumeration of the parameter yields: a list of calendars, counts of unique users, and counts of users with a connected Google Analytics account, which the researcher frames as business data.

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. 11 min read.

What happened, in plain words

Semrush is an online service for people who do search engine marketing. One of its features is a marketing calendar: a shared place where you plan campaigns and content by date. Each calendar belongs to someone, and it has an id, a short identifier that the website uses to tell one calendar apart from another, a bit like a locker number.

When you open a marketing calendar in your browser, the page does not contain everything on its own. It asks a server for extra information in the background. That kind of behind-the-scenes request, made by a program to a program rather than by a person clicking a link, is called an API call. The server that answers here lives at ec.semrush.com.

The particular request the researcher noticed asks one question: what is the status of the Google Analytics connection for the owner of this calendar? Google Analytics is a separate service that website owners use to measure their visitors. Semrush lets a calendar owner link their Google Analytics account, and the page needs to know whether that link exists.

The bug is that the server answers this question for any calendar id you put in the request, without checking whether the calendar is yours or whether you were invited to it. That is the classic shape of an Insecure Direct Object Reference, usually shortened to IDOR: the program takes an object id straight from the user and fetches the matching object, trusting the user to only ask for things they are allowed to see. The everyday comparison is a hotel reception that hands out room keys to anyone who says a room number, without checking that the person is a guest.

The researcher confirmed this with two accounts and then described what someone could do with it: walk through calendar ids one by one and collect information about calendars and their owners. CVSS is a standard scoring system for the seriousness of a security flaw, where 5.0 sits in the middle.

The feature and the endpoint

The report concerns the marketing calendar feature and the API behind it, on the wildcard domain *.semrush.com, which means any subdomain of semrush.com. The front end, meaning the part of the site that runs in your browser, calls an endpoint on ec.semrush.com. An endpoint is simply a specific address on a server that accepts a particular kind of request, like a counter in a large office building.

The endpoint is:

Text
https://ec.semrush.com/api/v1/ga/user_status/?calendar_id=CALENDAR_ID

Line by line:

  • https:// is the secure version of the protocol browsers use to talk to websites.
  • ec.semrush.com is the server being asked.
  • /api/v1/ga/user_status/ is the path, the address of this particular counter inside that server. api suggests it is meant for programs, v1 is a version number, ga most likely stands for Google Analytics, and user_status is the name of the operation.
  • ? starts the query string, the part of a URL that carries parameters, meaning named values passed to the server.
  • calendar_id=CALENDAR_ID is one parameter named calendar_id, whose value is a placeholder for a real calendar id. The placeholder is written in capitals to show that you substitute an actual id there.

That request is meant to tell the page two things: whether the owner of the calendar has connected a Google Analytics account, and the owner's user id for the calendar whose id is passed in the parameter. A user id is the internal number that identifies a person's account.

Setting up

The researcher used two accounts to look for the vulnerability:

  • Account one: id █████, email █████
  • Account two: id ███, email ███

The IP address used was [redacted].

Why two accounts? Because to prove an access-control bug you need to show that account A can see something belonging to account B. With one account you can only see your own data and cannot tell whether the server would have refused anyone else. The two accounts give you a known "mine" and a known "not mine".

An IP address is the numeric address your internet connection uses, roughly like a postal address for your device. The report lists the IP address used.

Finding it

The observation came from watching the traffic the site generates when a marketing calendar is loaded. Every modern browser has a developer tools panel, usually opened with F12, with a Network tab that lists every request the page makes. Watching that list is how you see the hidden API calls a page depends on.

The browser sends the user_status request shown above, and the response contains information about the calendar owner: whether they have connected a Google Analytics account, and their user id.

The problem is that the endpoint does not verify that the user making the request owns the calendar, or that the user has been invited to consult it. The calendar_id value is taken from the request and used to look up the owner's data without any check against the caller's identity.

Capture.PNG
Capture.PNG From the original on HackerOne

Exploitation

Step 1: capture the request

Load a marketing calendar in the browser and observe the request the page makes:

HTTP
https://ec.semrush.com/api/v1/ga/user_status/?calendar_id=CALENDAR_ID

This is the same URL as before, now written as the raw request line you would see in the browser's network panel. Reading it in plain words: the browser asks the server at ec.semrush.com for the user_status operation, passing one parameter, calendar_id, whose value is a real calendar id in place of the placeholder.

The only input that selects the object is calendar_id. There is no other identifier tying the request to the authenticated user. "Authenticated" means the server knows who you are, normally because your browser sends a session cookie or a token with each request. A cookie is a small piece of data the site stores in your browser and sends back automatically; a token is a similar credential, often a long string, that proves you logged in. The point here is that the request carries your identity, but the server does not use that identity to decide whether you may see the calendar you named.

Step 2: change the calendar id

With a second account, send the same request with a calendar_id that belongs to someone else. Because the server does not check ownership or invitation, the response still returns the owner's status: whether a Google Analytics account is connected, and the owner's user id associated with that calendar.

Why this step matters: it is the actual test. If the server were doing its job, a calendar id belonging to another person would produce an error such as "not found" or "forbidden". Getting real data back instead is the proof. The comparison is a building receptionist who checks your name badge before letting you into a floor; here there is no check at all.

Step 3: enumerate

Since the only thing that changes between requests is the calendar_id parameter, it can be brute forced. Brute forcing means trying many values in sequence, usually with a script, instead of guessing cleverly. Each valid id returns the corresponding owner's data, so iterating over the parameter builds up a picture of calendars and their owners.

Why this works: the id is the only selector, so changing it changes which record you get, and nothing else in the request needs to change. If ids are short or follow a pattern, a simple loop over the numbers covers a lot of them.

Root cause

The endpoint performs an object lookup keyed entirely on a client-supplied calendar_id and returns owner-level data without an authorisation check. "Client-supplied" means the value comes from the browser, so the person using the browser controls it. "Authorisation" is the separate question from authentication: authentication is who you are, authorisation is what you are allowed to do. The report states plainly that it is not verified that the user making the request has the calendar or that the person is invited to consult it. In other words, the access control that should tie the calendar to the requesting user is missing, so any caller who can reach the endpoint can read the status of any calendar whose id they can guess or enumerate.

Impact

The report gives two exploit scenarios.

  1. A user, such as a concurrent service, could brute force the calendar_id parameter to establish a list of all calendars and the number of unique users who have created calendars. They would also learn the number of users who have connected their Google Analytics account. The report describes this as business data. Business data means information about how many customers exist and how they behave, which is valuable to a competitor even when no individual secret is exposed.

  2. A user who knows someone's user_id, for example because they were invited to a calendar owned by the victim, can brute force the calendar_id parameter to establish the number of calendars owned by the victim and the number of calendars linked to a Google Analytics account. The invitation is the starting point: it hands you one real user id, and from there the missing check lets you count what that person owns.

The exposure is read-only information about calendar ownership and Google Analytics connection status, plus the owner's user id. Read-only means you can look but not change anything. The report does not describe any way to modify calendars or read their contents.

Fix

The report's resolution is to check that the user making the request has the calendar, or that the person is invited to consult the calendar, before returning the status. In plain terms: before answering, the server should look at who is asking and confirm that this calendar is theirs or that they were invited to it, and refuse otherwise. The report does not say whether or how this was implemented.

Variants to test

These are the same kind of check applied to nearby features, in case the same mistake was made more than once.

  • Other endpoints on the same API that take a calendar_id (or similar object id) and return owner or account metadata. A positive result is a response for an id you do not own that contains data about its owner. Metadata means descriptive information about something, rather than its contents.
  • Endpoints that return connection status for third-party integrations (Google Analytics here). These often expose account linkage and identifiers rather than content, which is still useful for enumeration. Linkage means the fact that two accounts are connected to each other.
  • Sequential or low-entropy object ids. Entropy here means unpredictability; a low-entropy id is one that is easy to guess, such as 1001, 1002, 1003. A positive result is that incrementing or decrementing the id returns different owners' records rather than an error or an empty response.
  • Invitation-based access. If you are invited to one calendar owned by a victim, try other ids belonging to the same owner to see whether the invitation check is scoped to the calendar or to the owner. Scoped to the calendar means the permission covers only that one calendar; scoped to the owner would mean it covers everything that person owns.

Hunting notes

This kind of bug tends to sit in small status or metadata endpoints that the front end calls on page load, rather than in the main object endpoints that receive more scrutiny. The reason is attention: the big, obvious features get reviewed, while the little background calls that fill in a badge or a status label are easy to overlook. Recon here means the early stage of looking around a target and mapping what it does.

The signal during recon is a request whose only selector is an object id in a query parameter, especially one that returns owner-level fields such as a user id or an integration status. Comparing the response for your own id with the response for an id you do not own, from a second account, is enough to confirm it. The report establishes impact by describing what enumeration of the parameter yields: a list of calendars, counts of unique users, and counts of users with a connected Google Analytics account, which the researcher frames as business data.

Glossary

  • API: a set of addresses on a server that programs use to exchange information, rather than pages meant for a person to read.
  • Endpoint: one specific address on a server that accepts a particular kind of request.
  • Parameter: a named value passed to a server in a URL, written after the ? as name=value.
  • Query string: the part of a URL after the ? that carries parameters.
  • ID: a short identifier that tells one record apart from another.
  • calendar_id: the parameter naming which marketing calendar the request is about.
  • user id: the internal number that identifies a person's account.
  • Google Analytics: a separate service website owners use to measure their visitors; Semrush lets a calendar owner link it.
  • Front end: the part of a website that runs in your browser.
  • Browser developer tools / Network tab: a panel built into browsers that lists every request a page makes.
  • Request / response: a request is what the browser asks the server; the response is what the server sends back.
  • Authentication: the server knowing who you are, usually from a cookie or token.
  • Cookie: a small piece of data a site stores in your browser and sends back with each request.
  • Token: a credential, often a long string, that proves you logged in.
  • Authorisation: what an authenticated user is allowed to do or see.
  • Access control: the rules a server applies to decide who may reach which object.
  • IDOR (Insecure Direct Object Reference): a bug where the server takes an object id from the user and returns the matching object without checking that the user is allowed to see it.
  • Brute force: trying many values in sequence, usually with a script, instead of guessing cleverly.
  • Enumerate: to walk through a range of ids or names to discover which ones exist.
  • Metadata: descriptive information about something, rather than its contents.
  • Entropy: unpredictability; low entropy means easy to guess.
  • Scoped: limited to a particular object or owner.
  • Read-only: you can look but not change anything.
  • Recon: the early stage of examining a target and mapping what it does.
  • CVSS: a standard scoring system for the seriousness of a security flaw; 5.0 is medium.
  • Wildcard domain (*.semrush.com): any subdomain of semrush.com.
  • IP address: the numeric address your internet connection uses.

More by a_d_a_m

View all

12 more disclosed reports, best first.

More from Semrush

View all

The newest disclosed reports for this program.

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.