Taking over every Ad on OLX (automated), an IDOR story
The update endpoint for ads did not verify that the authenticated user owned the ad, allowing an attacker to take over any ad by changing its details. The attacker could automate this to take over all ads on the site.
Published on kciredor.com
The original lives on kciredor.com
We do not hold its text, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
OLX powers the LetGo website for a number of countries, including The Netherlands. LetGo is described as an eBay-like marketplace where people buy new items and let go of old ones. Every ad on the platform belongs to the account that posted it, and changes to an ad go through a manual approval process before they appear on the site.
The bug is an Insecure Direct Object Reference (IDOR) in the mobile API behind the iOS and Android apps. The API exposes two calls that matter here: one that lists ads with their identifiers, and one that creates or updates an ad. The update call checks that the caller is authenticated but, as the write-up puts it, does not check that the caller is authorised to act on that particular ad.
The issue was resolved by OLX and publicly disclosed on HackerOne before this write-up appeared.
Setup
The researcher worked with OLX's permission and had full disclosure approval. The tooling and preconditions were:
- A proxy to intercept app traffic. The write-up uses BurpSuite, importing the CA certificate BurpSuite provisions so that SSL-encrypted app traffic can be read.
- SSL pinning bypassed on both platforms, because some apps pin certificates and the BurpSuite CA does not work out of the box. The researcher unpinned system wide rather than reverse engineering and patching each app: a jailbroken iPad with SSL pinning disabled through a Cydia app, and an Android phone with SSL pinning disabled through an Xposed module. The write-up notes that Android emulators (Genymotion or Android Studio) can accomplish the same goal.
- Two test accounts, one per platform, each with its own token:
Android account: token '111111'
iOS account: token '222222'
- A test ad posted from the first account, which returned the identifier used throughout the test:
ACCOUNT_1:
1. Post a new ad using token '111111' (returns the ID, in this test case: 888888).
2. Wait for approval
3. Approved and published on site
The second account was used for the attack itself:
ACCOUNT_2:
1. Fetch advertisement list through a search api call
2. Attack an ad by doing a POST call (picked the newly posted 888888 here).
3. The takeover of the ad is instant: it's now in ACCOUNT_2, not in ACCOUNT_1 anymore
4. Wait for approval
5. Approved and published on site with my changes
The researcher stresses that only test accounts were used and that no ads belonging to other people were taken over.
Finding it
By intercepting the API calls made while browsing the iOS and Android apps, the researcher could learn about, change and repeat API calls. Two calls stood out. The first lists all ads, including their identifiers, in a paginated response. The second is the call that creates or updates an ad, which the researcher replayed against another account's ad.
Replaying the update call with the token of a different account, and the identifier of an ad that account does not own, moved the ad to the attacking account. That is the IDOR: the server trusted the identifier in the request without tying it to the authenticated owner.
Exploitation
Step 1: enumerate ad identifiers
The attack, performed with ACCOUNT_2, involves two API calls. The first is a GET that returns the ad list with identifiers:
GET /i2/ajax/ads/
The write-up says this call lists all the ads including ids, paginated. Because the API supported walking through the full listing of all the ads, the identifiers of every ad on the site could be collected.
Step 2: take over an ad
The second call is the actual attack:
POST /i2/newadding/
The researcher repeated the GET and POST calls intercepted from the app, replacing the token from ACCOUNT_1 with the token from ACCOUNT_2 and pointing the POST at the identifier of the ad posted by ACCOUNT_1 (888888 in the test). The takeover is instant: the ad now belongs to ACCOUNT_2 and no longer to ACCOUNT_1.
Step 3: wait for approval
The change then goes through the manual approval process. In the researcher's repeated experience this ends up fine, and small price changes, for example from 40 to 35 euros, always go through. After several approvals the attacking account appeared to be whitelisted, after which approvals were no longer required.
Step 4: the automated version
Because there was no rate limiting and the API allowed walking the full listing, a small script could loop over every ad, take it over and change its pricing. That would have made it possible to take over the entire collection of ads on the website. The researcher did not do this: the initial IDOR was verified, the potential was clear, and the issue was reported straight away rather than proving anything this severe and causing damage.
Root cause
The researcher's suggested explanation is that the update POST call checks for something like is_authenticated() but does not check for is_authorized(), which could in turn implement something like is_owner(). The researcher's reading was that any valid token appeared to be accepted for any ad identifier, with ownership never checked. The absence of rate limiting and the ability to walk the full listing meant the flaw could be scaled up.
Impact
An authenticated attacker could take over any ad on the platform, including ads belonging to other users, and change its pricing and details. The takeover is immediate; the modified content then passes through manual approval, which in the researcher's experience approved small changes such as a price reduction from 40 to 35 euros, and which stopped being required altogether once an account had been whitelisted after several approvals. Combined with the full, paginated listing of ad identifiers and the lack of rate limiting, the whole collection of ads on the website could be taken over automatically. The researcher deliberately did not carry this out.
Fix
The issue was resolved by OLX. The write-up does not describe the change that was made. The researcher's suggested fix was to add an authorisation check to the update POST call, so that in addition to is_authenticated() it verifies is_authorized(), implementing something like is_owner() against the ad being modified.
Variants to test
- Replay an update call with a second account's token and the first account's object identifier. A positive result is that the object moves to, or is modified by, the second account.
- Walk a paginated listing endpoint and collect every identifier, then feed them to the update call in a loop. A positive result is that objects you do not own are accepted one after another, with no throttling.
- A positive result is any response that acts on the object rather than rejecting the request.
- Check whether repeated legitimate approvals on one account remove the approval step for later changes, as the researcher observed. A positive result is that subsequent modifications publish without review.
Lessons learned
- Focus on bug bounty programs with a good track record. Chasing should not be necessary; it is a two way street, and #NoFreeBugs.
- Know when to stop attacking one specific issue or platform. If you get stuck, keep moving, write down your notes on what you have found so far and come back later.




What happened, in plain words
OLX runs a marketplace website called LetGo in a number of countries, including The Netherlands. LetGo works like eBay: people list things they want to sell, and other people browse those listings and buy. Each listing is called an ad, and every ad belongs to the account that posted it.
A security researcher found that the mobile apps for iPhone and Android talked to OLX's servers in a way that let one account take over an ad belonging to a completely different account. Once an ad was taken over, the attacker could change its price and its details. The takeover happened instantly. The changed ad then went into a manual review queue before appearing on the site, but in the researcher's experience small changes such as lowering a price from 40 to 35 euros were always approved.
The researcher also found that the server would happily list every ad on the site, with an identifier for each one, page after page, and that there was no limit on how many requests you could send. Put together, that meant a short script could walk through every ad on the website, take each one over and change its price. The researcher did not do that: the flaw was confirmed, the danger was obvious, and the report went in straight away. OLX fixed the issue and it was publicly disclosed on HackerOne.
This article walks through the same story from the beginning, explaining each idea as it comes up. You only need to be comfortable using a browser and a computer to follow it.
Some background you need first
Before the details make sense, here are the few ideas the whole story rests on.
A website and its API. When you use a website in a browser, the browser asks the server for a page and the server sends back something you can look at. A mobile app usually does not ask for pages. It asks for raw data, and then draws the screen itself. The set of addresses the app uses to ask for that data is called an API (Application Programming Interface). Think of a restaurant: the menu and the waiter are the API. You do not walk into the kitchen yourself; you tell the waiter what you want, and food comes back. In the same way, the app sends a request to an address like /i2/ajax/ads/ and the server sends back a list of ads as data.
Requests and methods. Every request has a method, which is a word saying what kind of action you want. GET means "give me something". POST means "here is some data, do something with it" (often create or update). The address part, like /i2/ajax/ads/, is called the endpoint or path.
Tokens. When you log in to an app, the server gives the app a long random string called a token (sometimes stored in a cookie). The app sends that token with every later request so the server knows who is asking. It works like a cloakroom ticket: whoever holds the ticket gets the coat, and the staff do not ask for your name. If someone else gets your ticket, they can collect your coat. In this story the tokens are short placeholders, 111111 and 222222, standing in for the real ones.
Proxies and interception. A proxy is a program that sits between your phone and the internet. Instead of the app talking directly to the server, it talks to the proxy, and the proxy passes the message on. That lets you read and edit every message in both directions. BurpSuite is a well known proxy used for exactly this.
SSL/TLS and certificates. App traffic is normally encrypted with SSL/TLS, so anyone watching the network sees gibberish. To read it, the proxy has to pretend to be the server, which means the app must trust the proxy's certificate (a digital ID card). BurpSuite provides its own certificate authority (CA) for this: you install it on the device, and the device then trusts the proxy.
SSL pinning. Some apps refuse to trust anything except the exact certificate the real server uses. That is called SSL pinning, and it stops the BurpSuite certificate from working. You can get around it by "unpinning" the app, which means removing that restriction.
IDOR. Insecure Direct Object Reference. It means the server lets you name an object directly, for example by putting its identifier in a request, and then acts on that object without checking that the object is yours. A simple comparison: a hotel where you tell the receptionist "room 204" and they hand you the key, without checking that you are the guest in 204. The identifier is real and valid; the missing part is the ownership check.
Authentication versus authorisation. Authentication answers "who are you?". Authorisation answers "are you allowed to do this?". A server can do the first perfectly and still fail at the second. That distinction is the heart of this bug.
Rate limiting. A cap on how many requests a client may send in a period. Without it, a script can send thousands of requests and nothing slows it down.
Pagination. When a list is long, the server returns it in chunks, page by page. Each page has a next page, so a script can walk the whole list.
Setting up to look at the traffic
The researcher worked with OLX's permission and with approval to disclose everything publicly. The setup had four parts.
- A proxy to read app traffic. BurpSuite was used, with its CA certificate imported on the devices so the encrypted traffic could be read.
- SSL pinning disabled on both platforms. Rather than reverse engineering each app and patching out the checks, the researcher disabled pinning system wide: a jailbroken iPad with SSL pinning disabled using a Cydia app, and an Android phone with SSL pinning disabled using an Xposed module. The write-up also notes that Android emulators such as Genymotion or Android Studio can do the same job.
- Two test accounts, one per platform, each with its own token.
- A test ad posted from the first account, which returned the identifier used throughout the test.
Here are the two tokens:
Android account: token '111111'
iOS account: token '222222'
Line by line: the first line says the account used on the Android phone is identified by the token 111111. The second says the account used on the iPhone or iPad is identified by the token 222222. Two separate accounts matter because the whole test is about one account touching another account's ad. If you only had one account you could not tell whether the server was checking ownership or not.
Next, the first account posts an ad:
ACCOUNT_1:
1. Post a new ad using token '111111' (returns the ID, in this test case: 888888).
2. Wait for approval
3. Approved and published on site
Line by line: the first account creates a normal ad, and the server replies with an identifier for it, 888888 in this test. The ad then waits for manual review, and once approved it appears on the site. This is the victim ad: a real, approved listing that belongs to account 1.
The second account is the attacker:
ACCOUNT_2:
1. Fetch advertisement list through a search api call
2. Attack an ad by doing a POST call (picked the newly posted 888888 here).
3. The takeover of the ad is instant: it's now in ACCOUNT_2, not in ACCOUNT_1 anymore
4. Wait for approval
5. Approved and published on site with my changes
Line by line: account 2 first asks the server for the list of ads, which is how it learns identifiers. It then sends a POST aimed at ad 888888, the one account 1 just created. The moment that request succeeds, the ad belongs to account 2 and no longer to account 1. The modified ad then goes through review, and once approved it is published with the attacker's changes.
The researcher stresses that only test accounts were used and that no ads belonging to other people were taken over. That is the responsible way to prove a bug like this: show it works on your own data, then stop.
How the bug was found
By intercepting the API calls the apps made while browsing, the researcher could see each call, change it and send it again. Two calls stood out. One lists all ads with their identifiers, in pages. The other creates or updates an ad, and the researcher replayed it against another account's ad.
Replaying the update call with a different account's token, and with the identifier of an ad that account does not own, moved the ad to the attacking account. That is the IDOR: the server trusted the identifier in the request without tying it to the account that owns the ad.
Carrying out the attack
Step 1: collect the ad identifiers
The attack, performed with account 2, uses two API calls. The first is a GET that returns the ad list with identifiers:
GET /i2/ajax/ads/
Line by line: GET means "give me data". /i2/ajax/ads/ is the address of the endpoint that returns ads. The response is a paginated list of ads, each with its identifier. Because the API allowed walking through the full listing, the identifiers of every ad on the site could be collected. This step is needed because the second call has to name a specific ad, and the identifier is how you name it.
Step 2: take over an ad
The second call is the attack itself:
POST /i2/newadding/
Line by line: POST means "here is data, act on it". /i2/newadding/ is the endpoint that creates or updates an ad. The researcher replayed the POST with account 2's token, aimed at ad 888888. The researcher simply repeated the GET and POST calls captured from the app, swapping the token from account 1 for the token from account 2 and pointing the POST at account 1's ad. The takeover is instant: the ad now belongs to account 2 and no longer to account 1. This step is the proof. If the server had checked ownership, it would have refused, because account 2 has nothing to do with ad 888888.
Step 3: the approval queue
The change then goes through the manual approval process. In the researcher's repeated experience this ends up fine, and small price changes, for example from 40 to 35 euros, always go through. After several approvals the attacking account appeared to be whitelisted, after which approvals were no longer required. This step matters because it shows the review queue is not a real defence: it approved the attacker's changes, and it eventually stopped applying to that account altogether.
Step 4: doing it to every ad at once
Because there was no rate limiting and the API allowed walking the full listing, a small script could loop over every ad, take it over and change its price. That would have made it possible to take over the entire collection of ads on the website. The researcher did not do this: the flaw was confirmed, the potential was clear, and the issue was reported straight away rather than proving anything this severe and causing damage. This step matters because it shows the scale of the problem. A single bug that needs one manual request is serious; the same bug with no throttle and a complete list of targets is a switch that can be pulled on the whole site.
Why it worked
The researcher's suggested explanation is that the update POST call checks for something like is_authenticated() but does not check for is_authorized(), which could in turn implement something like is_owner(). In plain words: the server asked "is this a logged-in user?" and got a yes, but never asked "does this user own this ad?". It appeared that any valid token was accepted for any ad identifier, with ownership never checked. The missing rate limiting and the ability to list every identifier made the flaw easy to scale up.
What an attacker could have done
A logged-in attacker could take over any ad on the platform, including ads belonging to other people, and change its price and details. The takeover is immediate. The modified content then passes through manual review, which in the researcher's experience approved small changes such as a price reduction from 40 to 35 euros, and which stopped being required altogether once an account had been whitelisted after several approvals. Combined with the full, paginated listing of ad identifiers and the lack of rate limiting, the whole collection of ads on the website could be taken over automatically. The researcher deliberately did not carry this out.
The fix
The issue was resolved by OLX. The write-up does not describe the change that was made. The researcher's suggested fix was to add an authorisation check to the update POST call, so that in addition to is_authenticated() it verifies is_authorized(), implementing something like is_owner() against the ad being modified. In everyday terms: after checking that you are logged in, the server should also check that the ad you named is yours before changing it.
Things worth trying on other sites
These are variations on the same idea, useful when you are learning to test for this class of bug.
- Replay an update call with a second account's token and the first account's object identifier. A positive result is that the object moves to, or is modified by, the second account.
- Walk a paginated listing endpoint and collect every identifier, then feed them to the update call in a loop. A positive result is that objects you do not own are accepted one after another, with no throttling.
- A positive result is any response that acts on the object rather than rejecting the request.
- Check whether repeated legitimate approvals on one account remove the approval step for later changes, as the researcher observed. A positive result is that subsequent modifications publish without review.
Lessons learned
- Focus on bug bounty programs with a good track record. Chasing should not be necessary; it is a two way street, and #NoFreeBugs.
- Know when to stop attacking one specific issue or platform. If you get stuck, keep moving, write down your notes on what you have found so far and come back later.




Glossary
- Ad: a listing on the marketplace, posted by one account, describing an item for sale.
- API (Application Programming Interface): the set of addresses and rules an app uses to ask a server for data or to send it data.
- Authentication: the process of proving who you are, usually by logging in and receiving a token.
- Authorisation: the process of deciding whether the identified user is allowed to perform a particular action on a particular object.
- BurpSuite: a tool used as a proxy to intercept, read, change and resend web and app traffic.
- CA certificate (certificate authority): a digital ID card issued by a trusted authority; installing a proxy's CA on a device makes the device trust the proxy's encrypted connections.
- Cookie: a small piece of data a site stores in your browser and sends back with later requests, often used to carry a session or token.
- Cydia: an app store for jailbroken iOS devices, used here to install a tool that disables SSL pinning.
- Endpoint: the address part of a request, such as
/i2/ajax/ads/, that identifies which function on the server is being called. - Genymotion / Android Studio: tools that run Android emulators, i.e. Android phones simulated on a computer.
- GET: a request method meaning "give me data".
- HackerOne: a platform where security researchers report vulnerabilities to companies and where reports can be disclosed publicly.
- IDOR (Insecure Direct Object Reference): a flaw where the server acts on an object named directly by the client, such as an identifier, without checking that the client is allowed to access that object.
- Identifier (ID): a number or string that uniquely names an object, such as an ad.
- Jailbroken: an iOS device modified to allow software that Apple does not permit, such as system-wide tweaks.
- LetGo: the eBay-like marketplace website powered by OLX in several countries, including The Netherlands.
- Manual approval: a review step where a person checks a change before it appears on the site.
- Method: the word at the start of a request, such as
GETorPOST, saying what kind of action is wanted. - OLX: the company behind the marketplace and the mobile apps in this story.
- Pagination: splitting a long list into pages, each with a link or parameter for the next page.
- POST: a request method meaning "here is data, act on it", often used to create or update something.
- Proxy: a program that sits between a device and the internet, forwarding traffic so it can be read and modified.
- Rate limiting: a cap on how many requests a client may send in a given period.
- Request: a message from an app or browser to a server asking it to do something.
- Response: the message the server sends back.
- Script: a short program, here one that would loop over many ads automatically.
- SSL/TLS: the encryption used to protect traffic between an app and a server.
- SSL pinning: an app restriction that makes it trust only the real server's certificate, so a proxy's certificate is rejected.
- Token: a random string given to an app after login and sent with later requests so the server knows which account is asking; it works like a cloakroom ticket.
- Unpinning: removing or bypassing SSL pinning so a proxy can read the traffic.
- Whitelisted: placed on a list of accounts that are exempt from a rule, here the manual approval step.
- Xposed module: a piece of software for modified Android devices that changes how apps behave system wide, used here to disable SSL pinning.