IDOR in semrush academy
The course enrolment endpoint accepted a userId supplied by the client without checking that it belonged to the caller, so an attacker could enrol any other user in a course. The response also disclosed that user's enrolment status, dates and engagement figures.
- Triaged in 4 days
- Fixed in 18 days
- Paid in 4 days
- Disclosed after 33 days
#INTRODUCTION
##I used two accounts to search for this vulnerability:
- id: 5410425 email: ████[email protected]
- id: 5407773 email: ████@anosimple.com
##IP used: ███
##Endpoint URL: https://www.semrush.com/academy/courses/userEnroll
#EXPLOITATION
##Description of Security Issue: When a user clicks on the "Enroll for free" button in the course pages such as here https://www.semrush.com/academy/library/courses?spec=ALL&lang=en-US, the client makes a request like this:

. This page registers the user to the course and returns information concerning the user and the course. The problem lies in the fact that the server does not verify the userId belongs to the user making the request, so an attacker can pretend to be someone else by modifying the userId with that of the victim.
##Steps needed to reproduce bug: 1.Login to your account 2.Go to https://www.semrush.com/academy/library/courses?spec=ALL&lang=en-US 3.On burp suit, press the intercept button on 4.Click on the button "Enroll for free" on a random course 5.Forward the requests until you find this POST request:

6.Change the userId with that of the victim and send the request 7.The request has been processed by the server
#RESOLUTION Check that the userId belongs to the person who registers to the course.
Impact
##Number of people concerned: The bug affects all semrush academy users.
##Exploit scenario for this vulnerability: An attacker can scrap semrush academy in order to have all the existing courseId or choose a particular course and recover his courseId. Thereafter either the attacker already knows the victim's userId or he can bruteforce the userId field. The attacker can then register a user for any course he wishes. The attacker can also deduce according to the value of "creationDate" if the user has registered for the course or not and when. The attacker also has access to other variables such as "engagement", "status", "userEngagement", etc...
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could enrol any academy user in a course of their choosing and learn whether and when that user enrolled, along with engagement and status details; the report states the bug affects all academy users.
What the attacker needed
A free account; victim's userId known or brute-forced; proxy to intercept the request
The fix
The server should check that the userId in the request belongs to the authenticated user before enrolling them.
How it was found
- Log in to the account.
- Open the academy course library page.
- Turn on request interception in the proxy.
- Click 'Enroll for free' on a course.
- Forward requests until the enrolment POST request appears.
- Replace the userId with the victim's and send it; the server processes it.
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 report has not been written yet. The Original tab links to the source.
When you click 'Enroll for free', your browser sends a request that includes a number identifying you. The server trusted that number without checking it matched the logged-in account, so anyone could swap in someone else's number and act on their behalf. This kind of flaw is called an IDOR: an object identifier is used directly without an ownership check.
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.