Developer Luminate IDOR
An IDOR 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 the installation page URL, making the attack practical.
medium.com
Published on medium.com
Yahoo
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
This write-up comes from work in Yahoo's bug bounty program, on the Luminate Developer application at developers.commercialcentral.luminate.com. Luminate is a commercial platform with an app store: developers create apps that website admins can install into their store, and the developer dashboard shows statistics for each app, including who installed it, with the admins' email addresses and the websites they run.
The statistics are fetched by the dashboard as JSON, keyed on an app token. In testing, the endpoint returned the install list for an app token supplied from a different account.
Setup
Two accounts were used, referred to as account A and account B, each owning one app: app 1 and app 2. A test commercial centre account was also used, to install an app and generate real install data. No special tooling is described; the testing was done by observing the requests the dashboard makes and replaying them.
Finding it
While testing the developer app, the researcher noticed that retrieving an app's statistics triggered a JSON request: a GET that asks for the statistics based on the app token. The URL was:
https://developers.commercecentral.luminate.com/admin/apps/[apptoken]/installs.json?random=true&start=0&limit=8&_=1502762696055
The app token sits directly in the path, and the query string carries paging and cache-busting parameters (start, limit, random, and a timestamp in _). The app token sits directly in the path, which made it worth testing.
Exploitation
Step 1: create two apps and try a foreign token
Two accounts were created, A and B, with app 1 and app 2 respectively. Submitting the token of one app from the other account did not throw an error. No error was thrown when the token of one app was submitted from the other account.
Step 2: generate real install data and read it cross-account
Account B's app was installed into a test commercial centre account. With an installation in place, the same URL was requested while authenticated as account A, and it returned the installed statistics. The researcher notes that a screenshot could not be posted for privacy reasons, since the response contains the installers' details.
Step 3: obtain a victim app token from the install flow
Reading another app's installs is only useful if you know its token. In the test run the token was already known, so the next question was how an attacker would get the app token of a well known app in Luminate.
To find out, an app was installed from Luminate's commercial central. 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 app_token=[app_token] in the query string: the installation page carries the app's token in the URL. The request also carries store_url, email, id, token, pid, proxy_app, p and a signature parameter, and is sent to embed.commercecentral.luminate.com with the installer's cookies.
Step 4: combine the two
With the app_token taken from that URL, pasting it into the JSON request returns the list of all users who installed that app in their page. The two weaknesses chain: the installation page carries the app token in its URL, and the statistics endpoint returned installs for a token from another account.
Root cause
The statistics endpoint returned installs for an app token supplied from a different account, so ownership of the app was not enforced in that test. The token also appears in the URL of the installation page.
Impact
In the test, an app token from one account returned that app's install statistics when requested from another account: the email addresses and websites of the admins who installed it. The installation page URL also carried the app token. The report does not state who can observe that installation request in practice, nor how many apps or users were affected; the researcher's own test used a test commercial centre account and two developer accounts.
Fix
The report does not say what was changed.
Variants to test
- Token in path, no ownership check. On any developer dashboard that fetches per-app JSON by an identifier in the path, create two accounts and request the other account's identifier. A positive result is a 200 with the other app's data instead of a 403 or 404.
- Identifier leaked in install or settings URLs. Watch the requests made when installing or configuring an app. A positive result is the app identifier appearing in a query parameter, as
app_tokendoes here, which can then be fed to the statistics endpoint. - Paging parameters as a bypass. Try the same request with and without
start,limit,randomand the cache-busting_value. A positive result is data returned regardless of those parameters, showing they are not part of any authorisation decision. - Token as sole credential. Request the statistics endpoint with a valid session for account A and a token from account B, then repeat with no session at all. A positive result in the first case confirms the missing ownership check; the second shows whether the token alone is enough.
What happened, in plain words
Yahoo runs a bug bounty programme: a scheme where companies pay independent security researchers for finding and reporting flaws in their websites before criminals do. This write-up is about one such finding, on a Yahoo product called Luminate.
Luminate is a commercial platform with an app store, a bit like a phone's app store but for online shops. Developers build small add-on applications, and the people who run shops can install those apps into their store. The developer side of Luminate has a dashboard: a private web page where a developer logs in and sees information about their own apps. One of the things the dashboard shows is statistics, in particular who installed the app. That list includes the email addresses of the shop admins who installed it and the websites they run.
To show those statistics, the dashboard does not reload the whole page. It quietly asks the server for a small piece of data in a format called JSON, which is just a way of writing structured information as text so a program can read it easily. The request is tied to a particular app by an app token. A token is a short string of characters that stands in for something, here for a specific app, the way a coat-check ticket stands in for your coat: show the ticket, get the coat. The problem shown in testing is that the server returned the install list for an app token supplied from a different account.
That kind of flaw has a name: IDOR, short for Insecure Direct Object Reference. It means the server lets you refer to something by its identifier (here, the app token) and does not check that you are allowed to see that particular thing. Think of a hotel where room numbers are on the keys and the reception never checks whether the key is yours: ask for room 214 and you get room 214.
The researcher tested this in Yahoo's bug bounty programme, using two ordinary developer accounts and a test shop account, and by watching the requests the browser makes. No special tools are described.
Setting up the test
The researcher used two accounts, called account A and account B, each owning one app: app 1 and app 2. A test commercial centre account was also used. A commercial centre account is simply a shop account on Luminate, the kind of account a shop admin would use to install apps. It was needed so that there would be a real installation to look at: without anyone installing an app, the statistics list would be empty and there would be nothing to prove.
Finding the request
While testing the developer app, the researcher noticed that asking the dashboard for an app's statistics made the browser send a separate request for JSON data. It was a GET request, which is the ordinary kind of request a browser makes when it fetches a page or a file: it asks the server to give something back. This one asked for the statistics based on the app token. The URL was:
https://developers.commercecentral.luminate.com/admin/apps/[apptoken]/installs.json?random=true&start=0&limit=8&_=1502762696055
Line by line:
https://developers.commercecentral.luminate.comis the address of the developer site, the dashboard's home on the internet./admin/apps/[apptoken]/installs.jsonis the path, the part that says which thing on the server you want.admin/apps/means the apps area,[apptoken]is the placeholder where the app's token goes, andinstalls.jsonasks for the list of installations in JSON format.- The
?starts the query string, the part of a URL that carries extra settings. random=trueis a setting whose name suggests it is there to stop the browser or a cache from reusing an old copy. A cache is a stored copy kept to save time; adding something that changes makes each request look new.start=0&limit=8are paging settings: start at the first record and return at most eight of them. Paging is how long lists are delivered in chunks, like pages of a book._=1502762696055is a long number, a timestamp, again typically used to defeat caching.
The key observation is that the app token sits directly in the path, and nothing in the request ties the caller to the app being asked about. In other words, the request says "give me the installs for this token" and never says "and by the way, I am the owner". That is exactly the kind of thing worth testing.
Step 1: two apps, and a token that should not work
The researcher created two accounts, A and B, with app 1 and app 2 respectively. Then the token of one app was submitted from the other account. No error came back. The token of one app was submitted from the other account and no error came back.
Step 2: create a real installation and read it from the other account
An empty list proves little, so account B's app was installed into the test commercial centre account. Now there was a genuine installation to find. With that in place, the same URL was requested while logged in as account A, and it returned the installed statistics. Account A, in other words, could see who had installed account B's app.
The researcher notes that a screenshot could not be posted for privacy reasons, because the response contains the installers' details. That is worth pausing on: the data returned is not abstract. It is the email addresses and websites of real people who installed the app.
Step 3: where does an attacker get a victim's app token?
Reading another app's installs is only useful if you know that app's token. In the test run the token was already in hand, because the researcher owned both apps. So the next question was the practical one: how would an attacker get the app token of a well known app in Luminate?
To find out, an app was installed from Luminate's commercial central, the shop-side place where apps are installed. Watching the browser while browsing the installation page showed that it 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 an HTTP request as it looks on the wire, not just a URL. Line by line:
- The first line is the request line:
GETis the method (asking for something),/admin/apps/live/settings/[appname]is the path, and everything after?is the query string with its settings. store_url=[store_url]carries the address of the shop.pid=YS.×tamp=1502936968is a parameter whose value includes a timestamp.proxy_app=1is a flag set to 1.- `[redacted] is a token parameter.
app_token=[app_token]is the app's token, and this is the important part.email=[user_email]carries the user's email address.p=YSandid=[id]are further parameters.- `[redacted] is a signature parameter. A signature is normally a value computed from the request so the server can tell it was not tampered with; here the value shown looks like a placeholder.
HTTP/1.1states the version of the protocol being spoken.Host: embed.commercecentral.luminate.comsays which site on the server the request is for. A single server can host many sites, and this header tells it which one is wanted.User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0identifies the browser and operating system that sent the request. Every browser sends something like this.Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8lists the kinds of content the browser is willing to receive, with rough preference weights.Accept-Language: en-US,en;q=0.5says which languages the user prefers.Accept-Encoding: gzip, deflate, brsays the browser can accept compressed responses, which saves bandwidth.Referer: https://embed.commercecentral.luminate.com/admin/apps/[app_name]tells the server which page the request came from.Cookie: [redacted_cookies]carries the cookies. A cookie is a small piece of data the browser stores for a site and sends back with every request; it is how a site remembers that you are logged in. The actual values are redacted here because they are secrets: anyone holding your session cookie could act as you.Connection: closeasks the server to close the network connection after the response.Upgrade-Insecure-Requests: 1tells the server the browser would prefer a secure (HTTPS) version of the page if one exists.
The important part is app_token=[app_token] in the query string: the installation page carries the app's token in the URL. The token travels in the address of the installation page.
Step 4: putting the two halves together
With the app_token taken from that URL, pasting it into the JSON request returns the list of all users who installed that app in their page. The two weaknesses chain together: the installation page carries the app token in its URL, and the statistics endpoint returned installs for a token from another account. Neither half is dramatic alone; together they turn into a way to read other people's installer lists.
Why it worked
The statistics endpoint returned installs for an app token supplied from a different account, so ownership of the app was not enforced in that test. The token also appears in the URL of the installation page.
What an attacker could get
In the test, an app token from one account returned that app's install statistics when requested from another account: the email addresses and websites of the admins who installed it. The installation page URL also carried the app token. The report does not state who can observe that installation request in practice, nor how many apps or users were affected; the researcher's own test used a test commercial centre account and two developer accounts.
The fix
The report does not say what was changed.
Similar things to try elsewhere
- Token in the path, no ownership check. On any developer dashboard that fetches per-app JSON using an identifier in the path, create two accounts and request the other account's identifier. A positive result is a 200 (success) with the other app's data instead of a 403 or 404.
- Identifier leaked in install or settings URLs. Watch the requests made when installing or configuring an app. A positive result is the app identifier appearing in a query parameter, as
app_tokendoes here, which can then be fed to the statistics endpoint. - Paging parameters as a bypass. Try the same request with and without
start,limit,randomand the cache-busting_value. A positive result is data returned regardless of those parameters, showing they play no part in any authorisation decision. - Token as sole credential. Request the statistics endpoint with a valid session for account A and a token from account B, then repeat with no session at all. A positive result in the first case confirms the missing ownership check; the second shows whether the token alone is enough.
Glossary
- Bug bounty programme: a scheme where a company pays independent researchers for reporting security flaws in its systems.
- Luminate: Yahoo's commercial platform with an app store, where developers publish apps that shop admins install.
- App store: a catalogue where add-on applications can be browsed and installed.
- Developer dashboard: the private, logged-in web pages where a developer manages their apps and sees their statistics.
- JSON: a text format for structured data that programs can easily read, often fetched separately from the page.
- Token: a short string that stands in for something, here a specific app, like a coat-check ticket.
- App token: the token that identifies one app in Luminate.
- IDOR (Insecure Direct Object Reference): a flaw where the server lets you name an object by its identifier and does not check that you are allowed to see it.
- GET request: the ordinary request a browser makes to fetch a page or file from a server.
- URL: the address of something on the web.
- Path: the part of a URL that says which thing on the server you want.
- Query string: the part of a URL after
?, carrying extra settings as name=value pairs. - Cache: a stored copy kept to save time; cache-busting values make each request look new.
- Paging: delivering a long list in chunks, controlled by settings such as a start point and a limit.
- Timestamp: a number representing a moment in time, often used to defeat caching.
- Status code: a number in the server's reply saying what happened, such as 200 for success, 403 for forbidden, 404 for not found.
- HTTP request: the message a browser sends to a server, made of a request line, headers and sometimes a body.
- Header: a name and value line in an HTTP request or response carrying extra information, such as the browser type or cookies.
- Host header: the header that says which site on a server the request is for.
- User-Agent: the header identifying the browser and operating system.
- Accept / Accept-Language / Accept-Encoding: headers listing the content types, languages and compression formats the browser can handle.
- Referer: the header telling the server which page the request came from.
- Cookie: a small piece of data the browser stores for a site and sends back with each request, used to remember that you are logged in.
- Session cookie: the cookie that proves you are logged in; anyone holding it could act as you, which is why it is kept secret.
- Signature: a value normally computed from a request so the server can tell it was not tampered with.
- HTTPS: the secure, encrypted version of the web protocol.
- Authorise: to decide whether a request is allowed.
- Ownership check: confirming that the thing being requested belongs to the person asking.
- Commercial centre account: a shop account on Luminate, the kind used to install apps.
- Install statistics: the list of who installed an app, including the admins' email addresses and websites.