I Watched a Paid Course for Free (A Short IDOR Story)
A course website's content-loading endpoint accepted course and lesson identifiers from the client and returned the video without checking whether the logged-in user had paid for that course. An attacker could swap in identifiers taken from a paid course's page and watch paid lessons for free.
medium.com
Published on medium.com
Bug Bounty Writeup
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 website that sells online courses, referred to in the write-up as example.com. The feature in question is the lesson player used by free courses: each free course page carries a "Resume" button, and clicking it loads the lesson video.
That button issues a POST request to /contentload, carrying the identifiers of the course and the lesson together with a CSRF token and a view flag. The request is what loads the lesson video, so it is the place where entitlement to a paid course should be enforced.
Setup
The write-up describes no special tooling, accounts or versions. The researcher used a normal browser session on the site, starting from a free course they could legitimately access, and a paid course page they had never subscribed to. The request carries a _token value, but the write-up does not describe how it is issued or checked.
Finding it
Clicking "Resume" on a free course produced this request:
POST /contentloadprogramId=xxxx&contentId=xxxx&subscriptionId=xxxx&_token=xxxx&viewtype=true
The body carries three identifiers, a token and a view flag:
programIdidentifies the course.contentIdidentifies the specific lesson.subscriptionIdis also sent, alongside_tokenandviewtype=true.
Seeing three client-supplied identifiers in the request raised the obvious question: what happens if the IDs are changed? The researcher then opened the page of a paid course they had never subscribed to. That page lists every lesson's contentId directly in the HTML, whether the lesson is locked or not and whether the course is paid or not. The identifiers needed to request the content are therefore available to anyone who views the sales page, with no purchase required.
Exploitation
Step 1: capture a legitimate request
On a free course, clicking "Resume" sends the /contentload POST shown above. This gives a working request with a real token, a real course and a real lesson.
Step 2: collect a paid lesson's identifiers
From the HTML of the paid course page, the researcher took one lesson's contentId. The page exposes these values in plain sight regardless of lock or payment status.
Step 3: swap the IDs and resend
The captured free-course request was edited so that programId and contentId pointed at the paid course and one of its lessons, and the request was sent again.

The screenshot shows the result: the paid lesson played in full, with no payment and no subscription. Minutes earlier the same browser had displayed a "please subscribe" popup for that exact course.
Root cause
The server validates that the request comes with a session and looks well formed, but it does not check whether the authenticated user is authorised for the specific course and lesson named in the request. It trusts the programId and contentId supplied by the client. This is a classic IDOR (Insecure Direct Object Reference): the access control exists in the UI as a subscribe prompt, but the API behind it does not enforce the same rule.
The write-up does not describe any server-side check that was bypassed beyond this missing authorisation step, so the failure is best described as absent object-level access control on /contentload rather than a flaw in the token handling itself.
Impact
An authenticated user with any valid session can watch paid course videos without paying or subscribing, provided they know the programId and contentId of the target lesson. Those values are published in the paid course page's HTML, so discovering them requires nothing more than loading the page. The result is that a paid lesson plays in full without payment, which undercuts what the site sells.
Fix
On every /contentload request, the server should verify that the logged-in user holds an active, valid subscription for that exact programId and contentId combination, rather than merely confirming that some subscription exists somewhere.
Variants to test
- Swap only one identifier. Change
contentIdwhile keeping a legitimateprogramId, and vice versa. A positive result is content from a lesson or course you are not entitled to. - Reuse another user's
subscriptionId. If the server checks the subscription ID but not its owner, substituting a value belonging to a subscribed account may grant access. A positive result is playback of paid content under your own session. - Enumerate IDs from page HTML. Harvest
contentIdvalues from paid course pages and replay them through the free-course request. A positive result is any paid lesson loading without a subscription. - Try other content endpoints. Look for sibling endpoints that serve downloads, attachments or lesson metadata with the same identifier pattern. A positive result is any of them returning paid material without an entitlement check.
- Check unauthenticated or expired sessions. Resend the request with an invalid or missing
_token. A positive result is content being served without a valid session at all, which would widen the impact beyond logged-in users.
What happened, in plain words
A website was selling online courses. Some courses were free, some cost money. The free ones had a button labelled "Resume" that started the lesson video. When you clicked it, your browser quietly sent a message to the website's server asking for the video file.
That message contained identifiers that told the server which course and which lesson you wanted, along with a token and a view flag. The person who found this bug asked a simple question: what happens if I change those numbers to point at a paid course instead? The answer was that the server handed over the paid video anyway, without checking whether the person asking had actually paid for it.
That is the whole story. No clever hacking tools, no special software. Just a normal browser and the willingness to edit a number before pressing send.
The website and the feature
The target was a site that sells online courses, referred to in the write-up as example.com. The feature involved is the lesson player used by free courses. Each free course page has a "Resume" button, and clicking it loads the lesson video.
To follow the rest of this article you need two ideas:
- A server is the computer somewhere in the world that stores the website's files and videos. Your browser (the client) asks it for things, and it answers.
- An API is the part of a website that your browser talks to behind the scenes, rather than the pages you see. Think of a restaurant: the menu and the dining room are the website you see, and the kitchen is the API. You never walk into the kitchen yourself, but your order goes there, and the kitchen decides what comes back. If the kitchen will cook anything anyone asks for, the printed menu stops meaning much.
When you click "Resume", your browser sends a request to the server, and the lesson video loads. That request is the moment where the site should decide whether you are allowed to watch this particular lesson. It is the kitchen door.
The request behind the button
Clicking "Resume" on a free course produced this request:
POST /contentloadprogramId=xxxx&contentId=xxxx&subscriptionId=xxxx&_token=xxxx&viewtype=true
Line by line, in plain words:
POSTis the type of request. A POST is how a browser sends information to a server, as opposed to simply asking for a page. Think of it as filling in a form and handing it over, rather than just pointing at something on a shelf./contentloadis the address on the server being asked. It is the name of the kitchen counter where video requests are handled.programId=xxxxis a number identifying the course. "Program" here means the course as a whole.contentId=xxxxis a number identifying the specific lesson inside that course.subscriptionId=xxxxis a number identifying a subscription._token=xxxxis a security token. A token is a short secret value that the server gave your browser earlier, usually when you logged in, and that your browser sends back with each request to prove the request really comes from your session. Think of a cloakroom ticket: it does not tell the attendant who you are, it just proves you are the person who handed in that coat. The write-up does not explain how this particular token is generated or checked.viewtype=trueis a flag, a simple on/off value, that presumably tells the server what kind of view is being requested.
The important part is that three of these values are identifiers chosen by whoever sends the request. The server receives them and, as it turned out, trusts the course and lesson IDs.
Why the researcher tried changing the numbers
Seeing three identifiers supplied by the browser in a request that returns paid content raised the obvious question: what happens if the IDs are changed?
This is worth pausing on, because it is the whole skill. The researcher did not find a password, crack any encryption, or exploit a bug in the browser. They noticed that the request contained numbers that described what was wanted, and asked whether the server also checked who was asking. In security terms, the question is whether the server performs an authorisation check: does it verify that this specific logged-in person is entitled to this specific thing?
Getting the numbers for a paid lesson
The researcher then opened the page of a paid course they had never subscribed to. That page lists every lesson's contentId directly in the HTML, whether the lesson is locked or not and whether the course is paid or not.
HTML is the code that describes a web page. When your browser shows you a page, it is reading this code and drawing what it says. Anything written in the HTML has been sent to your computer, even if the page hides it behind a padlock icon or a greyed-out label. A locked lesson on a sales page is locked only in the sense that the page does not let you click it; the identifier for the lesson is still sitting in the code your browser already downloaded.
The comparison in the write-up is a menu at a restaurant you are not allowed to eat at: the dishes and their numbers are printed in plain sight, and the only thing standing between you and the food is whether the kitchen bothers to check your booking.
So the identifiers needed to request the content are available to anyone who views the sales page, with no purchase required. The researcher did not have to guess anything.
Doing it, step by step
Step 1: capture a legitimate request
On a free course, clicking "Resume" sends the /contentload POST shown above. This gives a working request with a real token, a real course and a real lesson.
The reason for starting here is that the researcher wants a request that is known to work. Every value in it is genuine: a real token from a real login, a real course, a real lesson. The only thing that will change later is which course and lesson the request names.
Step 2: collect a paid lesson's identifiers
From the HTML of the paid course page, the researcher took one lesson's contentId. The page exposes these values in plain sight regardless of lock or payment status.
This step matters because the attack needs a target. Without a valid contentId for a paid lesson, the server would have nothing to look up. Because the sales page publishes those values, finding one costs nothing more than loading the page.
Step 3: swap the IDs and resend
The captured free-course request was edited so that programId and contentId pointed at the paid course and one of its lessons, and the request was sent again.
In other words, the researcher kept the token and the overall shape of the request, and replaced only the two numbers that say which course and lesson are wanted. The request now says, in effect: "I am this logged-in user, and please send me lesson X of course Y." The server answered.

The screenshot shows the result: the paid lesson played in full, with no payment and no subscription. Minutes earlier the same browser had displayed a "please subscribe" popup for that exact course. The caption on the image reads "it worked 😂 btw second bug and the second day of hunting".
Why it worked
The server validates that the request comes with a session and looks well formed, but it does not check whether the authenticated user is authorised for the specific course and lesson named in the request. It trusts the programId and contentId supplied by the client.
Put simply: the server checked that you had a cloakroom ticket, but not that the coat you were collecting was yours. It confirmed there was a session, and that the request had the right shape, and then it served whatever the numbers asked for.
This is a classic IDOR, which stands for Insecure Direct Object Reference. The name sounds worse than the idea: an object is just a thing stored on the server, such as a video, a lesson, or an invoice, and a direct reference is when the browser names that thing by its identifier, like contentId=1234. The vulnerability is that the server accepts the identifier and hands over the object without checking that the person asking is allowed to have it.
The write-up does not describe any server-side check that was bypassed beyond this missing authorisation step, so the failure is best described as absent object-level access control on /contentload rather than a flaw in the token handling itself. The token was doing its job; the missing piece was the check on what the token holder was entitled to.
What someone could do with this
An authenticated user with any valid session can watch paid course videos without paying or subscribing, provided they know the programId and contentId of the target lesson. Those values are published in the paid course page's HTML, so discovering them requires nothing more than loading the page.
The result is that a paid lesson plays in full without payment, which undercuts what the site sells.
The fix
On every /contentload request, the server should verify that the logged-in user holds an active, valid subscription for that exact programId and contentId combination, rather than merely confirming that some subscription exists somewhere.
The distinction is the heart of it. Checking that a subscription exists is like a bouncer who checks that you are holding a ticket, any ticket. Checking that the subscription belongs to this user and covers this course is like a bouncer who reads the seat number.
Other things worth trying
These are variations on the same idea, useful for testing whether a site has the same weakness in more than one place.
- Swap only one identifier. Change
contentIdwhile keeping a legitimateprogramId, and vice versa. A positive result is content from a lesson or course you are not entitled to. Doing this one at a time tells you which of the two values the server actually relies on. - Reuse another user's
subscriptionId. If the server checks the subscription ID but not its owner, substituting a value belonging to a subscribed account may grant access. A positive result is playback of paid content under your own session. This tests whether the subscription number is tied to a person or just treated as a password-like pass. - Enumerate IDs from page HTML. Harvest
contentIdvalues from paid course pages and replay them through the free-course request. A positive result is any paid lesson loading without a subscription. Enumerating simply means collecting values one by one, here by reading them out of pages you can already open. - Try other content endpoints. Look for sibling endpoints that serve downloads, attachments or lesson metadata with the same identifier pattern. A positive result is any of them returning paid material without an entitlement check. An endpoint is just an address on the server that does a particular job, like
/contentload; sites often have several that serve related things. - Check unauthenticated or expired sessions. Resend the request with an invalid or missing
_token. A positive result is content being served without a valid session at all, which would widen the impact beyond logged-in users. If the video comes back with no valid session, then the problem is bigger than one missing permission check.
Glossary
- API: the part of a website that your browser talks to behind the scenes to fetch data or perform actions, as opposed to the pages you see.
- Authorisation: the server's decision about whether a specific logged-in user is allowed to do or see a specific thing.
- Client: the program on your side, normally your browser, that sends requests to a server.
- CSRF token: a secret value placed in a request to prove it came from the site's own pages and not from somewhere else; in this write-up it appears as
_token. - Endpoint: a specific address on a server that handles a particular kind of request, such as
/contentload. - Enumerate: to collect values one by one, for example by reading identifiers out of page code.
- Flag: a simple on/off value in a request, such as
viewtype=true. - HTML: the code that describes a web page; your browser reads it and draws the page from it.
- IDOR (Insecure Direct Object Reference): a vulnerability where the browser names a stored object by its identifier and the server returns it without checking that the requester is allowed to have it.
- Identifier (ID): a number or string that names a specific thing on the server, such as a course or a lesson.
- POST: a type of request used to send information to a server, rather than simply asking for a page.
- Request: the message your browser sends to a server asking it to do something or return something.
- Server: the computer that stores a website's content and answers requests from browsers.
- Session: the state of being logged in, which the server remembers between requests, usually with the help of a token.
- Subscription: a paid entitlement to access a course; in this write-up it is also represented by a
subscriptionIdvalue sent in the request. - Token: a short secret value given to your browser, typically at login, and sent back with requests to prove they belong to your session.