Developer Luminate IDOR
An IDOR vulnerability in the Luminate Developer app allowed any authenticated user to view installation statistics (including admin emails and website URLs) for any app by supplying that app's token. The app token could be obtained from a separate installation request that exposed it in the URL.
Published on medium.com
Continuing on my work in Yahoo’s bug bounty program, another app i tested was: Luminate Developer app. In this application, I can create apps that website admins can install to their store from Luminate app store.
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
Luminate is a Yahoo product that provides a store platform: website admins install apps into their store from the Luminate app store, and app makers use the Luminate Developer application to manage those apps and view statistics about them. The statistics include who installed an app, specifically the email addresses and websites of the admins who installed it.
The target of this research was the Luminate Developer app, tested as part of Yahoo's bug bounty program. tested as part of Yahoo's bug bounty program. The interesting data sits behind a JSON endpoint that returns install statistics for a given app, keyed by an app token.
Setup
The researcher created two accounts on the developer application, referred to as account A and account B, and created two apps, app 1 and app 2, so that each account owned a distinct app and a distinct app token. A test commercial centre account was used as the store where an app could be installed, which is what produces install statistics in the first place.
Finding it
While testing the developer application, the researcher noticed that the page showing an app's statistics did not render server-side HTML but fetched the data with a JSON request. That request was a GET whose path contained the app token, and it returned the statistics for that app:
https://developers.commercecentral.luminate.com/admin/apps/[apptoken]/installs.json?random=true&start=0&limit=8&_=1502762696055
The path segment [apptoken] is the only thing identifying which app's statistics are returned. The query string carries random=true, start=0, limit=8 and a _ timestamp. Nothing in the URL identifies the requesting user.
Exploitation
Step 1: confirm the endpoint does not check ownership
With account A and account B each owning an app, the researcher requested the statistics URL using account A's session but with account B's app token. At first, when putting in an app token from another account, no error was thrown. That alone suggested the endpoint was not verifying that the token belonged to the authenticated user.
Step 2: create real install data to prove data disclosure
An empty result proves little, so the researcher used account B to install app 2 into a test commercial centre account. Once the installation was complete, the researcher tested the IDOR.
Step 3: read another account's install statistics
With account A's session, the researcher browsed to the statistics URL using app 2's token. It successfully showed the installed statistics for app 2, even though app 2 belongs to account B. The researcher notes that a screenshot of the result could not be posted for privacy reasons.
At this point the IDOR is confirmed, but it depends on knowing a target's app token. For the test run the token was already known, which raises the question the researcher poses next: how would an attacker get the app token of a well known app in Luminate?
Step 4: obtain a victim app token from the installation flow
To answer that, the researcher went to Luminate's commercial central and installed an app, watching the installation traffic. Browsing the installation page issued the following request:
GET /admin/apps/live/settings/[appname]?store_url=[store_url]&pid=YS.×tamp=1502936968&proxy_app=1&[redacted]&app_token=[app_token]&email=[user_email]&p=YS&id=[id]&[redacted] HTTP/1.1Host: embed.commercecentral.luminate.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflate, brReferer: https://embed.commercecentral.luminate.com/admin/apps/[app_name]Cookie: [redacted_cookies]Connection: closeUpgrade-Insecure-Requests: 1
The important part is the query string: the installation request carries app_token=[app_token] alongside the store URL, the user's email, an id, a signature and other parameters. The app token of the app being installed is therefore present in the URL that the installing admin's browser sends, and it can be read straight out of that request.
Step 5: combine the two
With the app token taken from the installation request, the researcher pasted it into the JSON statistics request. The response gave the list of all users who installed that app on their page. The two issues chain: the installation flow discloses the token, and the statistics endpoint accepts any token without checking who is asking.
Root cause
The statistics endpoint authorises on the app token alone. It treats possession of the token as sufficient to read the app's install statistics, without checking that the authenticated session belongs to the owner of that app. The token appears in a URL in the installing admin's browser, and the statistics endpoint does not bind it to the requester.
Impact
An attacker with an account on the developer application can read the install statistics of any app whose token they can obtain. Those statistics include the email addresses and websites of the admins who installed the app. The token is exposed in the installation request, so an attacker who obtains it can read that app's installer list. The report does not describe any further use of the leaked data, and no bounty amount or severity rating is given.
Fix
The report does not state what change was made. The fix implied by the finding is to bind the statistics endpoint to the authenticated owner: resolve the app from the token and reject the request unless the current session owns that app, rather than returning data for any valid token.
Variants to test
- Token-in-path JSON endpoints. Look for statistics, export or list endpoints where the only object identifier is in the path, then request them with a second account's identifier. A positive result is another account's data instead of an error or an empty set.
- Install or settings flows that echo identifiers. Intercept the request a browser makes when installing or configuring an app and check the query string for tokens, ids or signatures belonging to the app. A positive result is an app token you did not previously know appearing in a URL.
- Silent failures on foreign identifiers. Send a foreign token and watch for the absence of an error, as happened here before real data existed. A positive result is a normal-looking response for an object you do not own.
- Paging parameters on IDOR endpoints. Vary
startandlimiton a confirmed IDOR to see whether the full installer list can be walked. A positive result is successive pages of records beyond the first slice.
What happened, in plain words
Yahoo runs a bug bounty programme, which invites people to test its products and report problems so they can be fixed. This is the story of one of those findings, made by a researcher called Rojan Rijal (also known as uranium238).
The product involved is called Luminate. Think of it as an app store for online shops. A shop owner (the "admin") can browse the Luminate app store and install small add-on apps into their shop, a bit like installing an app on a phone. The people who make those apps use a separate website, the Luminate Developer application, to manage their apps and to look at statistics about them. Those statistics are interesting because they show who installed the app: the email addresses and the websites of the shop admins who installed it.
The problem was that the page showing those statistics did not check properly who was asking. If you had an account on the developer site, you could ask for the statistics of somebody else's app and the site would happily hand them over. This kind of mistake has a name: IDOR, which stands for Insecure Direct Object Reference. In plain terms, it means the website lets you point at an object (here, an app) by its identifier and does not check that the object is yours.
There was a second half to the story. To ask for an app's statistics you need that app's identifier, called an app token. The researcher found that the app token was sitting in plain sight in the web address that a shop admin's browser uses while installing an app. So an attacker could learn the token of a well known app, then use it to read that app's installer list. The two weaknesses combined into one working attack.
Background: the pieces you need to know
Before walking through the steps, here are the concepts that come up, explained from scratch.
A web request. When you click a link or load a page, your browser sends a request to a server and the server sends back a response. Most of the time you never see this. Tools called proxies let you sit in the middle and read the requests and responses, which is how testers see what is really going on.
GET requests and URLs. A GET request is the ordinary kind of request a browser makes when you open a page or a link. The address it goes to is the URL. A URL has a path (the part after the domain, like /admin/apps/...) and can have a query string (everything after a ?, made of name=value pairs separated by &). The path usually says which thing you want; the query string usually carries extra settings.
JSON. JSON is a plain text format for data, made of names and values in curly braces and square brackets. Websites often use it to send data to the browser behind the scenes, so the page can update without reloading. A URL ending in .json is a strong hint that the response will be JSON.
API. An API is the set of addresses a website offers for programs (including the JavaScript running in your browser) to talk to it, as opposed to addresses meant for humans to look at. The .json address in this story is effectively a small API: you ask it a question and it answers with data.
Token. A token is a long, hard-to-guess string of characters that stands in for something, like a claim ticket at a cloakroom. Here the app token stands in for a particular app: if you know the token, you can refer to that app. A token is not the same as a password, but it often behaves like one if the site treats it as proof that you are allowed in.
Cookie and session. When you log in, the server gives your browser a cookie, a small piece of data stored by the browser and sent back with every request. The cookie lets the server recognise you on the next request, so you do not have to log in again on every page. That recognition is called your session. In the request shown later, the cookie is the part that says "this is the logged-in user".
IDOR. Insecure Direct Object Reference. The website uses a direct identifier (an ID, a token, a number) to decide which object to show you, and it does not check that the object belongs to you. The everyday comparison: a hotel receptionist hands out room keys to anyone who says a room number, without checking that the person is the guest in that room.
Bug bounty programme. A scheme where a company invites outside researchers to test its systems and pays them for reporting real problems, usually under rules about what is allowed.
The setup
The researcher was testing the Luminate Developer application at developers.commercialcentral.luminate.com, as part of Yahoo's bug bounty programme. The interesting data sits behind a JSON address that returns install statistics for a given app, identified by its app token.
The researcher created two accounts on the developer application, called account A and account B, and created two apps, app 1 and app 2, so that each account owned a different app with a different app token. A test commercial centre account was used as the shop where an app could be installed, because installing an app is what produces install statistics in the first place.
Why two accounts? Because to test whether a website checks ownership, you need two owners. If you only have one account, you cannot tell whether the site is showing you your own data because it checked, or because it did not check and you happened to ask for your own app. Two accounts give you a clean comparison: ask with account A's login for account B's app.
Finding it
While testing the developer application, the researcher noticed that the page showing an app's statistics was not built by the server as a normal page. Instead, the browser fetched the data separately with a JSON request. That request was a GET whose path contained the app token, and it returned the statistics for that app:
https://developers.commercecentral.luminate.com/admin/apps/[apptoken]/installs.json?random=true&start=0&limit=8&_=1502762696055
Line by line, in plain words:
https://developers.commercecentral.luminate.comis the developer application's address./admin/apps/[apptoken]/installs.jsonis the path. The[apptoken]placeholder is where the app's token goes. This is the only thing in the whole address that says which app's statistics you want. The.jsonending tells you the answer comes back as JSON data.?random=truestarts the query string. It looks like a cache-busting setting: a value that changes so the browser or a server in between does not hand back an old saved copy.start=0&limit=8are paging settings: start at the first record and return up to eight of them._=1502762696055is a timestamp, another common trick to stop caching.
Nothing in the address identifies the person asking. There is no user ID, no "this is my app" marker. The only access control decision the address appears to make is: does the token match an app? That is the classic shape of an IDOR. The object reference (the token) is doing all the work, and the site is not asking whether the object belongs to the requester.
Exploitation
Step 1: confirm the endpoint does not check ownership
With account A and account B each owning an app, the researcher requested the statistics address using account A's session but with account B's app token. At first, when putting in an app token from another account, no error was thrown. That alone suggested the address was not checking that the token belonged to the logged-in user.
Why does "no error" matter? Because a well-built site would answer something like "forbidden" or "not found" when you ask for somebody else's app. A normal-looking answer for an object you do not own is the first sign that the check is missing. It is not proof yet, though: the answer might simply be empty.
Step 2: create real install data to prove data disclosure
An empty result proves little, so the researcher used account B to install app 2 into a test commercial centre account. Once the installation was complete, the researcher tested the IDOR.
This step is about making the test meaningful. If app 2 had no installers, then account A asking for app 2's statistics would get an empty list, and an empty list looks the same whether the site checked ownership or not. By installing the app first, the researcher made sure there was real, private data behind the door, so that if account A could see it, the leak would be undeniable.
Step 3: read another account's install statistics
With account A's session, the researcher browsed to the statistics address using app 2's token. It successfully showed the installed statistics for app 2, even though app 2 belongs to account B. The researcher notes that a screenshot of the result could not be posted for privacy reasons.
At this point the IDOR is confirmed: account A, logged in as itself, read account B's private installer data. But the attack depends on knowing the target's app token. For the test run the token was already known, which raises the question the researcher poses next: how would an attacker get the app token of a well known app in Luminate?
That question matters because an IDOR that needs a secret you cannot get is much less serious. The researcher went looking for a way to obtain the token.
Step 4: obtain a victim app token from the installation flow
To answer that, the researcher went to Luminate's commercial central and installed an app, watching the installation traffic. Browsing the installation page issued the following request:
GET /admin/apps/live/settings/[appname]?store_url=[store_url]&pid=YS.×tamp=1502936968&proxy_app=1&[redacted]&app_token=[app_token]&email=[user_email]&p=YS&id=[id]&[redacted] HTTP/1.1Host: embed.commercecentral.luminate.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflate, brReferer: https://embed.commercecentral.luminate.com/admin/apps/[app_name]Cookie: [redacted_cookies]Connection: closeUpgrade-Insecure-Requests: 1
This is a raw HTTP request, the text a browser actually sends to a server. It is written in one block here, so let us take it apart in plain words:
- The first line is the request line:
GETis the method (asking for something), then the path and query string, thenHTTP/1.1, the version of the protocol. - The path is
/admin/apps/live/settings/[appname], where[appname]is the name of the app being installed. - The query string carries many
name=valuepairs separated by&:store_url(the shop's address),pid,×tamp(a timestamp),proxy_app,token,app_token,email,p,idandsignature. The important one for this story isapp_token=[app_token]: the token of the app being installed is right there in the address. Host: embed.commercecentral.luminate.comsays which server the request is for.User-Agentdescribes the browser: Firefox 54 on a Mac. Servers use this to tailor their answers.AcceptandAccept-Languagesay what kinds of content and languages the browser prefers.Accept-Encodingsays which compression formats the browser can handle.Referersays which page the browser came from.Cookie: [redacted_cookies]is the login cookie, the piece that identifies the logged-in user. It is redacted here because it is private.Connection: closeasks the server to close the connection after answering.Upgrade-Insecure-Requests: 1is a standard browser header asking the server to prefer secure (HTTPS) versions of links.
The important part is the query string: the installation request carries app_token=[app_token] alongside the shop address, the user's email, an id, a signature and other parameters. The app token of the app being installed is therefore present in the address that the installing admin's browser sends, and it can be read straight out of that request.
Why does this matter? Because it means the token is not really a secret. Anyone who can see that request, for example by installing the app themselves or otherwise capturing the installation traffic, learns the token.
Step 5: combine the two
With the app token taken from the installation request, the researcher pasted it into the JSON statistics request. The response gave the list of all users who installed that app on their page. The two issues chain: the installation flow discloses the token, and the statistics address accepts any token without checking who is asking.
Neither half is as serious alone. The token leak alone gives you an identifier; the IDOR alone needs an identifier you might not have. Together they let an attacker with an account on the developer application read the installer list of a well known app: the email addresses and websites of the admins who installed it.
Root cause
The statistics address authorises on the app token alone. It treats possession of the token as enough to read the app's install statistics, without checking that the logged-in session belongs to the owner of that app. The token is not a secret in practice, because the installation flow puts it in a URL in the installing admin's browser, so the object reference is both obtainable through disclosure and unbound to the requester.
Impact
An attacker with an account on the developer application can read the install statistics of any app whose token they can obtain. Those statistics include the email addresses and websites of the admins who installed the app. The token is exposed in the installation request, so an attacker who obtains it can read that app's installer list. The report does not describe any further use of the leaked data, and no bounty amount or severity rating is given.
Fix
The report does not state what change was made. The fix implied by the finding is to tie the statistics address to the logged-in owner: look up the app from the token and reject the request unless the current session owns that app, rather than returning data for any valid token.
Variants to test
If you want to look for similar problems yourself, these are the patterns worth trying. Each one is described with what a positive result looks like.
- Token-in-path JSON endpoints. Look for statistics, export or list addresses where the only object identifier is in the path, then request them with a second account's identifier. A positive result is a normal answer containing another account's data instead of an empty set.
- Install or settings flows that echo identifiers. Watch the request a browser makes when installing or configuring an app, and check the query string for tokens, ids or signatures belonging to the app. A positive result is an app token you did not previously know appearing in a URL.
- Silent failures on foreign identifiers. Send a token belonging to another account and watch for the absence of an error, as happened here before real data existed. A positive result is a normal-looking response for an object you do not own.
- Paging parameters on IDOR endpoints. Vary
startandlimiton a confirmed IDOR to see whether the full installer list can be walked. A positive result is successive pages of records beyond the first slice.
Glossary
- API: the set of addresses a website offers for programs (including the JavaScript in your browser) to talk to it, as opposed to pages meant for humans to read.
- App token: a long, hard-to-guess string that stands in for a particular app on the Luminate platform; knowing it lets you refer to that app.
- Bug bounty programme: a scheme where a company invites outside researchers to test its systems and pays them for reporting real problems.
- Cache: a saved copy of a response kept by a browser or a server in between, so the same thing does not have to be fetched again.
- Cache busting: adding a changing value (like a random number or a timestamp) to a URL so a saved copy is not reused.
- Cookie: a small piece of data a website stores in your browser and your browser sends back with every request, often used to keep you logged in.
- GET request: the ordinary kind of request a browser makes when you open a page or a link.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- IDOR (Insecure Direct Object Reference): a flaw where a website uses a direct identifier to choose which object to show you and does not check that the object belongs to you.
- JSON: a plain text format for data, made of names and values, often used by websites to send data to the browser behind the scenes.
- Luminate: a Yahoo product that provides a store platform where shop admins install apps from an app store, and app makers manage those apps and view statistics.
- Luminate Developer application: the website app makers use to manage their apps and view install statistics.
- Path: the part of a URL after the domain, like
/admin/apps/..., which usually says which thing you want. - Proxy: a tool that sits between your browser and a server so you can read the requests and responses.
- Query string: the part of a URL after a
?, made ofname=valuepairs separated by&, usually carrying extra settings. - Request: the message your browser sends to a server when you open a page or a link.
- Response: the message a server sends back to your browser.
- Session: the server's recognition of you across requests, usually carried by a cookie, so you do not have to log in on every page.
- Token: a long, hard-to-guess string that stands in for something, like a claim ticket; here, an app token stands in for an app.
- URL: the address of something on the web, made of a domain, a path and optionally a query string.