From Hidden API to Paywall Bypass: Finding an Authorization Vulne
A hidden API endpoint exposed internal course identifiers, and the course player accepted a client-supplied course ID without checking whether the user had purchased that course. An authenticated attacker could change the course ID in the URL to access premium course content without paying.
Mine wasn’t the most technically complex bug, but it reinforced one of the most important lessons in web application security:
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted the client-supplied course ID and did not verify that the authenticated user was entitled to access that course.
Impact
Any authenticated user could bypass the paywall and access premium course content they had not purchased, potentially leading to financial loss and unauthorised redistribution.
What the attacker needed
A free account; knowledge of a premium course ID
The fix
The server should validate user entitlement before serving course content and return HTTP 403 when the user lacks permission.
How it was found
- Browse the application and inspect JavaScript files to find hidden API endpoints.
- Request the hidden endpoint that lists all products, including premium courses and their internal IDs.
- Open a normal course and note the course player URL containing a course ID parameter.
- Replace the free course ID in the URL with a premium course ID obtained from the API.
- Observe that the premium course loads without any purchase or entitlement check.
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 write-up has not been written yet. The Original tab links to the source.
The website had a page that showed course videos. The address of that page included a number identifying the course. The server did not check whether the logged-in user had actually bought that course before showing the videos. So anyone with an account could change the number to a paid course and watch it for free.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.