How a Free Trial Led to Broken Access Control
An underage Student account could change the productType parameter in a free-trial request to obtain a Teacher free trial, which granted Teacher status and bypassed the underage restriction. The attacker could gain access to Teacher-only features despite the platform blocking direct account-type changes.
Published on medium.com
Bug Bounty
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 is a learning platform with two main account types: Student and Teacher. Students younger than 14 have additional restrictions, and they cannot switch their account type to Teacher through Settings. The feature at the centre of this write-up is the free-trial flow, which grants a trial period when a Student requests it.
The author is Ahmed Salah, and the write-up was published on 15 October 2026.

Setup
The testing used an account on the platform, with requests intercepted and modified. Two roles matter:
- A Student account, in particular one belonging to a user younger than 14, because that is the account type the platform restricts from becoming a Teacher.
The precondition for the attack is simply being logged in as an underage Student.
Finding it
The first attempt was the obvious one: intercept the request that changes the account type and try to set it to Teacher directly. The server returned 403 Forbidden, so the restriction appeared to be enforced server-side.
While testing the free-trial feature, the author noticed that the request differs by role. When a Student requests a free trial, the following request is sent:
POST /cart-line-items/create-or-update
{
"productType": 37,
"quantity": 1,
"source": "header_plus"
}
This gives the Student a 7-day free trial. When a Teacher does the same thing, the productType changes to 15, which gives them a one-month free trial.
The two product types give trials of different durations. The question the author asked was whether the product type could be chosen by the client rather than derived from the account role.
Exploitation
Step 1: log in as an underage Student
The author logged in with an underage Student account, the role that is not permitted to switch to Teacher through Settings.
Step 2: intercept the free-trial request
The free-trial request was captured in the proxy, showing productType set to 37 as expected for a Student.
Step 3: change the product type
The productType value was changed from 37 to 15, the value used by Teachers, and the request was forwarded. The rest of the flow was then continued.
Step 4: observe the result
Instead of being blocked, the account received the Teacher free trial. The trial duration was not the only thing that changed:
- The account gained Teacher status.
- Teacher-only features became available.
- The underage account restriction was bypassed.
So a single parameter in the free-trial request was enough to move the account into a role the platform otherwise refuses to grant it.
Root cause
The free-trial endpoint acted on the client-supplied product type, and the role check on the Settings path was not applied there. The role check that exists on the Settings path, which returns 403 Forbidden, is not applied on the trial path. The account gained Teacher status after the Teacher trial product was requested.
Why the existing defence did not stop it: the restriction was enforced on the account-type change endpoint, but the trial endpoint is a separate path that accepted the productType value supplied in the body. The report does not describe any server-side validation of that value against the authenticated user's role.
Impact
An underage Student, who is not allowed to become a Teacher, can obtain Teacher status and Teacher-only features by requesting the Teacher trial product. The author also notes that the trial duration changes from 7 days to one month.
The report was marked as Not Applicable, and the team fixed the issue during triage before they could reproduce it.
Fix
The report does not describe the fix that was applied. Based on the finding, the trial endpoint should derive the product type from the authenticated user's role on the server rather than accepting it from the client, and should reject requests for products the caller is not entitled to. The role check used on the Settings path should apply to the trial path as well.
Variants to test
- Role-dependent product identifiers elsewhere. Look for other endpoints that take a product, plan or tier identifier in the body and behave differently per role. A positive result is a response that grants the higher-tier product to a lower-privileged account.
- Trial flows that confer entitlements. Check whether completing a trial for a privileged product also changes the account's role or unlocks role-gated features. A positive result is a role change or access to features that the account could not otherwise reach.
- Restrictions enforced on one endpoint only. Where a platform blocks an action on one path (for example, Settings), replay the same intent through a different path such as a trial, upgrade or invitation flow. A positive result is the restricted action succeeding through the alternate path.
- Numeric identifier substitution. Change identifiers such as
productTypeto neighbouring or known privileged values and observe whether the server validates them against the caller. A positive result is any accepted value that the caller should not be entitled to.
What happened, in plain words
A learning platform lets people sign up as a Student or as a Teacher. Students who are younger than 14 are not allowed to become Teachers, and the platform blocks them from switching their account type in Settings. The author of this write-up, Ahmed Salah, tested whether that rule could be got around somewhere else, and found that it could, through the free-trial feature.
A free trial is a short period during which you can use a paid product without paying, after which it normally expires or turns into a paid subscription. On this platform, when a Student asks for a free trial, the browser sends a request to the server that includes a number identifying which trial product is wanted. Students get one product number, Teachers get another, and the Teacher product comes with a longer trial and with Teacher status.
The author logged in as an underage Student, caught that request on its way to the server, changed the product number from the Student value to the Teacher value, and sent it on. The server accepted it. The account became a Teacher, Teacher-only features opened up, and the age restriction was bypassed. One number in one request was enough.
The report was later marked as Not Applicable, and the team fixed the issue during triage before they could reproduce it.

The pieces you need to know first
Before the steps make sense, a few everyday ideas need names.
A server and a client. The website you see in your browser is the client. The computer that stores the accounts, checks the rules and decides what you are allowed to do is the server. Your browser asks, the server answers. Every rule that actually matters has to be enforced on the server, because anything the browser does can be changed by the person using it.
An API. Think of a restaurant. The menu and the dining room are the website you see; the kitchen is the server. The API is the waiter: a fixed set of requests you can make ("one of number 37, please") and the answers that come back. A web page is really just a friendly front end that makes these waiter requests for you behind the scenes.
A request and a response. A request is a message from your browser to the server. It has a method and a path (together, roughly, the action and the address), sometimes a body (extra details, often in a format called JSON, which is just structured text with names and values), and sometimes headers (small labelled notes such as "I am logged in as this user"). The response is the server's reply, and it carries a status code: 200 usually means fine, 403 means "I know who you are, and you are not allowed to do this".
A session and a cookie. After you log in, the server needs to recognise you on the next request. It gives your browser a small piece of text called a session cookie, which your browser sends back automatically with every request, like a wristband at an event. The server reads the wristband and knows which account is asking. This is why being logged in as the underage Student matters: the server knows exactly who is making the request, and still got the decision wrong.
A proxy. A proxy (often a browser extension or a separate tool) sits between your browser and the server. It lets you pause a request, look at it, edit it, and then let it continue. This is the single most useful tool in this kind of testing, because it lets you see and change exactly what your browser sends.
Intercepting and forwarding. Intercepting means catching a request and holding it. Forwarding means letting it go on to the server, with or without your changes.
Broken access control. Access control is the set of rules about who may do what. Broken access control means those rules are missing or can be sidestepped: a user reaches something they should not be allowed to reach. It is not about guessing a password or cracking encryption; it is about the server failing to check permission properly. In this case the rule "under-14 Students may not become Teachers" existed, but only on one path, and the trial path did not check it.
A parameter. A parameter is one named value inside a request, such as quantity or productType. Changing a parameter is as simple as editing text, which is why parameters that decide what you get are worth testing.
A product type. The platform sells or grants different products, and each has a number. 37 is the Student trial product; 15 is the Teacher trial product. The server accepted the product number sent by the browser.
The setup
The testing used an account on the platform, with requests intercepted and modified. Two roles matter:
- A Student account, in particular one belonging to a user younger than 14, because that is the account type the platform restricts from becoming a Teacher.
The precondition for the attack is being logged in as an underage Student.
First attempt: the obvious door
The first attempt was the obvious one: intercept the request that changes the account type and try to set it to Teacher directly. The idea is simple. Settings has a control for switching account type, so the browser must send some request when you use it. If the server trusts whatever that request says, you could ask to become a Teacher even though the button is hidden or disabled for you.
The server returned 403 Forbidden, so the restriction appeared to be enforced server-side. In plain words: the server looked at the wristband, saw an underage Student, saw the request asking to become a Teacher, and said no. That is exactly the correct behaviour, and it is why the author moved on to look elsewhere.
The interesting part: the free-trial request
While testing the free-trial feature, the author noticed that the request differs by role. When a Student requests a free trial, the following request is sent:
POST /cart-line-items/create-or-update
{
"productType": 37,
"quantity": 1,
"source": "header_plus"
}
Line by line:
POST /cart-line-items/create-or-updateis the method and path.POSTmeans "I am sending data to create or change something". The path is the address of the action on the server: it creates or updates an item in a cart, which is how the platform models "add this trial to my account".- The blank line separates the request line from the body.
"productType": 37is the parameter that says which product is being added. For a Student, it is37."quantity": 1says one of them."source": "header_plus"is a label saying where the request came from, in this case a particular part of the site's interface.
This gives the Student a 7-day free trial. When a Teacher does the same thing, the productType changes to 15, which gives them a one-month free trial.
The two product types therefore map to two different trial products with different durations. The question the author asked was whether the product type could be chosen by the client rather than derived from the account role. In everyday terms: the waiter takes your order, but does the kitchen check that the dish you ordered is on your menu, or does it just cook whatever number you say?
Exploitation, step by step
Step 1: log in as an underage Student
The author logged in with an underage Student account, the role that is not permitted to switch to Teacher through Settings. This is the account that is supposed to be restricted, so it is the account that proves whether the restriction holds.
Step 2: intercept the free-trial request
The free-trial request was captured in the proxy, showing productType set to 37 as expected for a Student. Catching it first, without changing anything, is important: it confirms what the normal request looks like, so any later difference is your change and not something the site did on its own.
Step 3: change the product type
The productType value was changed from 37 to 15, the value used by Teachers, and the request was forwarded. The rest of the flow was then continued. The reasoning is the one from the previous section: if the server decides the product from your role, changing the number should be ignored or rejected. If it simply trusts the number, the change will go through.
Step 4: observe the result
Instead of being blocked, the account received the Teacher free trial. The trial duration was not the only thing that changed:
- The account gained Teacher status.
- Teacher-only features became available.
- The underage account restriction was bypassed.
So a single parameter in the free-trial request was enough to move the account into a role the platform otherwise refuses to grant it. The Settings door was locked, but the trial door led to the same room.
Why it worked
The free-trial endpoint acted on the client-supplied product type, and the role check on the Settings path was not applied there. The role check that exists on the Settings path, which returns 403 Forbidden, is not applied on the trial path. The account gained Teacher status after the Teacher trial product was requested.
Why the existing defence did not stop it: the restriction was enforced on the account-type change endpoint, but the trial endpoint is a separate path that accepted the productType value supplied in the body. The report does not describe any server-side validation of that value against the authenticated user's role.
A useful comparison is a building with a guarded front door and an unguarded side door into the same corridor. The guard at the front door is doing their job perfectly; nobody told the side door that it needed a guard.
What it means
An underage Student, who is not allowed to become a Teacher, can obtain Teacher status and Teacher-only features by requesting the Teacher trial product. The author also notes that the trial duration changes from 7 days to one month.
The report was marked as Not Applicable, and the team fixed the issue during triage before they could reproduce it.
How it should be fixed
The report does not describe the fix that was applied. Based on the finding, the trial endpoint should derive the product type from the authenticated user's role on the server rather than accepting it from the client, and should reject requests for products the caller is not entitled to. The role check used on the Settings path should apply to the trial path as well.
In the restaurant comparison: the kitchen should decide what you are allowed to order from who you are, not from the number written on the slip.
Other places to look for the same mistake
- Role-dependent product identifiers elsewhere. Look for other endpoints that take a product, plan or tier identifier in the body and behave differently per role. A positive result is a response that grants the higher-tier product to a lower-privileged account.
- Trial flows that confer entitlements. Check whether completing a trial for a privileged product also changes the account's role or unlocks role-gated features. A positive result is a role change or access to features that the account could not otherwise reach.
- Restrictions enforced on one endpoint only. Where a platform blocks an action on one path (for example, Settings), replay the same intent through a different path such as a trial, upgrade or invitation flow. A positive result is the restricted action succeeding through the alternate path.
- Numeric identifier substitution. Change identifiers such as
productTypeto neighbouring or known privileged values and observe whether the server validates them against the caller. A positive result is any accepted value that the caller should not be entitled to.
Glossary
- API: the fixed set of requests a website's front end uses to talk to its server, like a waiter carrying orders to a kitchen.
- Access control: the rules that decide who is allowed to do what.
- Body: the part of a request that carries data, often written as JSON.
- Broken access control: a flaw where those rules are missing or can be sidestepped, so a user reaches something they should not.
- Client: the browser or app you use; the part you can see and change.
- Cookie: a small piece of text a site stores in your browser and sends back with each request, often used to remember that you are logged in.
- Endpoint: one specific action on the server, identified by a method and a path.
- Forward: to let an intercepted request continue on to the server.
- Free trial: a short period in which a paid product can be used without paying.
- Header: a small labelled note attached to a request or response, such as information about the logged-in user.
- Intercept: to catch a request in a proxy and hold it before it reaches the server.
- JSON: a plain-text format for structured data, made of names and values in curly braces.
- Method: the kind of action a request asks for, such as
POSTto send or change data. - Parameter: one named value inside a request, such as
productType. - Path: the address part of a request that says which action is being called.
- Product type: the number identifying which product is being requested, here
37for the Student trial and15for the Teacher trial. - Proxy: a tool that sits between your browser and the server so you can inspect and edit requests.
- Request: a message from your browser to the server asking it to do something.
- Response: the server's reply to a request.
- Role: the kind of account you have, here Student or Teacher, which decides what you may do.
- Server: the computer that stores accounts and enforces the rules.
- Server-side: done on the server, where the user cannot change it, as opposed to in the browser.
- Session: the server's memory of who you are across many requests, usually tied to a cookie.
- Status code: a number in the response saying how it went, such as
200for success or403for forbidden. - Triage: the first stage where a bug bounty team reviews and reproduces a report.
403 Forbidden: a status code meaning the server knows who you are but refuses the action.