How I Accidentally Bypassed a Paywall and Got User Data for Free
The platform's API returned user contact details without checking whether the requester had paid for access. An attacker could change the ad ID and API version in a request to obtain email addresses and phone numbers for free.
medium.com
Published on medium.com
So, I was recently checking out a popular online platform where you can post ads and get responses from interested people. They have a paid feature where you need to upgrade to see users’ contact details.
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 API endpoint lacked server-side authorisation checks, and an older API version did not enforce the paywall.
Impact
Personal contact information could be exposed to anyone who modifies API requests, making the paywall ineffective and potentially breaching data protection rules.
What the attacker needed
A valid ad ID; ability to intercept and modify requests
The fix
The API should check user permissions on the server before returning sensitive data, rather than relying on frontend controls.
How it was found
- Intercept the request the browser sends to fetch response data.
- Change the ad ID to another valid listing.
- Change the API version to an older one.
- Send the modified request and receive the user's email and phone number.
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.
A website's API is the behind-the-scenes service that supplies data to the page. Here, the API handed over private contact details without checking if the person asking had paid. By altering a couple of values in the request, someone could read data meant to be locked.
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.