Skip to content
IDOR Write-up Intermediate

View-The-Vr-Experiences-For-Any-Oculus-User

A GraphQL endpoint allowed querying any Oculus user's installed experiences, bypassing a privacy setting that was supposed to restrict visibility. An attacker could see which applications a user had installed, even if the user had not set that information to public.

Philippe Harewood Follow

Published on philippeharewood.com

Within https://secure.oculus.com/my/gear-vr/ lists the experiences a user added to the view in the Oculus device. It is possible to query any user’s experience.

Philippe, on philippeharewood.com

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

Oculus accounts have a page at https://secure.oculus.com/my/gear-vr/ that lists the experiences a user has added to their view in the Oculus device. The same information is exposed through the Oculus GraphQL endpoint at graph.oculus.com/graphql, which is the surface this report is about.

The claim in the report is simple: it was possible to query any user's experience list through that GraphQL endpoint, not just your own.

Setup

The report does not describe any special setup. There is no mention of test accounts, roles, tools or versions. The only precondition that matters is an Oculus user ID to put into the query, and the report does not say how that ID is obtained.

Finding it

The report states it was possible to query any user's experience through the GraphQL endpoint, though the behaviour was initially accepted as expected and later narrowed to accounts that never set the visibility value. The page is meant to show your own experiences; the endpoint behind it accepted someone else's user ID.

Exploitation

Step 1: query the GraphQL endpoint with a target user ID

The proof of concept is a single GET request to the GraphQL endpoint, with the query passed in the q parameter:

HTTP
https://graph.oculus.com/graphql?q=node(USER_ID){alias,active_android_entitlements{nodes{id,is_active,item{id,display_name}}}}

The query asks for the node identified by USER_ID and, under it, active_android_entitlements. For each entitlement node it requests id, is_active and the nested item fields id and display_name. In other words, it returns the list of applications the user has installed, with their display names and whether each entitlement is active. USER_ID is a placeholder in the report; the actual value used is not shown.

The report does not include the response body.

Root cause

Initially the behaviour was accepted as expected. The reasoning given is that in 2016 Facebook (Oculus) added a privacy setting that lets people control who can see their entitlements: public, friends, or only self. When setting up an Oculus headset you are prompted to set that value. Older accounts may therefore default to "Public", which is how the setting existed when those accounts were created. Under that model, being able to view experiences for some users is by design: you can only see them for users who selected that visibility, or who set up their entitlements years ago and never changed it.

What that model did not account for is users who listed experiences directly on desktop, through https://www.oculus.com/experiences/rift/RIFT_EXPERIENCE_ID/. The report says the expected-behaviour reasoning did not account for users who listed experiences directly on desktop through the Rift experience page.

Impact

As Facebook summarised it: the applications an individual had installed for Oculus would be unexpectedly visible to others. People using applications were prompted to set the visibility of this information, and that choice was respected when set, but the information was also accessible for anyone who set up an account and engaged with the application store without actually using an application.

The report describes the gap between the visibility setting and accounts that never set it, without stating how many accounts were affected. For those accounts, anyone who could query the GraphQL endpoint with the user's ID could read the installed application list.

Fix

The behaviour was changed so that the data is not accessible by default.

Timeline as given:

Date Event
Jan 16, 2018 Report sent
Jan 16, 2018 Further investigation by Facebook
Jan 23, 2018 Further discussions
Mar 15, 2018 Fixed by Facebook
Mar 15, 2018 Bounty awarded by Facebook

Variants to test

  1. Query other node fields on the same GraphQL endpoint for a user ID you do not own, for example entitlements other than active_android_entitlements. A positive result is any per-user data returned for an account whose visibility setting should exclude you.
  2. Compare the response for an account created through the headset setup flow with one created only through the desktop store. A positive result is the desktop-only account returning entitlements that the headset account hides.
  3. Look for other product surfaces that write the same data through a different path than the one that enforces the privacy setting, as the desktop experience listing did here. A positive result is a write path that leaves the visibility field unset while the read path still returns the data.
  4. Test whether the visibility value is enforced on the read path at all, by setting an account to the most restrictive option and querying it from a second account. A positive result is data returned despite the restrictive setting.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

Oculus is Facebook's (now Meta's) brand for virtual reality headsets and the software that goes with them. When you use an Oculus headset, the company keeps a record of which applications, called experiences, you have added to your device. There is a web page where you can see that list for your own account.

Behind that page sits a service that the page talks to in order to fetch the data. That kind of service is called an API, short for Application Programming Interface. A useful everyday comparison: a restaurant menu. You do not walk into the kitchen yourself; you tell the waiter what you want and the kitchen sends it back. An API is the waiter between a web page and the database where the real information lives.

The researcher, Philippe Harewood, reported that the experience list could be queried for any user, not just the person asking, though this was initially treated as expected behaviour. He could put someone else's user ID into the request and get back the list of applications that person had installed. The report was first treated as expected behaviour, because Oculus had a privacy setting that lets people choose who can see their entitlements (public, friends, or only themselves). The expected-behaviour reasoning did not account for users who listed experiences directly on desktop through the Rift experience page. Facebook fixed it on 15 March 2018 and paid a bounty.

Context

Oculus accounts have a page at https://secure.oculus.com/my/gear-vr/ that lists the experiences a user has added to their view in the Oculus device. Think of it as a personal shelf: the page shows the apps that belong to you.

The same information is also exposed through the Oculus GraphQL endpoint at graph.oculus.com/graphql. GraphQL is a way for a program to ask a server for exactly the pieces of data it wants, in one request, by describing the shape of the answer. Where a normal web page returns a whole HTML document, a GraphQL endpoint returns structured data, usually in a format called JSON (a text format of labels and values, like "name": "value"). The endpoint is the surface this report is about.

The claim in the report is simple: it was possible to query any user's experience list through that GraphQL endpoint, not just your own.

Setup

The report does not describe any special setup. There is no mention of test accounts, roles, tools or versions. The only precondition that matters is an Oculus user ID to put into the query, and the report does not say how that ID is obtained.

A user ID is a number or string that uniquely identifies one account, the way a customer number identifies you at a shop. It is not usually secret: it often appears in profile URLs and in the pages you load. That is exactly why it is interesting here: if knowing someone's ID is enough to read their data, the ID is effectively a key that should not open that door.

Finding it

The researcher noticed that the experiences shown on the secure.oculus.com/my/gear-vr/ page could be retrieved for arbitrary users by calling the GraphQL endpoint directly. The page is meant to show your own experiences; the endpoint behind it accepted someone else's user ID.

This is the core of the bug, and it belongs to a broad family called broken access control, sometimes described as an insecure direct object reference. A comparison: a hotel receptionist who checks that you are a guest, then hands you the key to any room number you name, without checking that the room is yours.

Calling the endpoint directly, rather than clicking through the page, matters because the page may only ever send your own ID. This is a common way researchers find these bugs: look at what the page sends, then change one value.

Exploitation

Step 1: query the GraphQL endpoint with a target user ID

The proof of concept is a single GET request to the GraphQL endpoint, with the query passed in the q parameter:

HTTP
https://graph.oculus.com/graphql?q=node(USER_ID){alias,active_android_entitlements{nodes{id,is_active,item{id,display_name}}}}

Line by line, in plain words:

  • https://graph.oculus.com/graphql is the address of the GraphQL service. A GET request is the same kind of request your browser makes when you open a normal web page: you ask for a resource by its address.
  • The ? starts the query string, the part of a URL that carries extra values. Everything after it is a list of name and value pairs.
  • q= is the name of the parameter that carries the GraphQL query.
  • node(USER_ID) asks the server for one specific object, identified by USER_ID. USER_ID is a placeholder in the report; the actual value used is not shown. In a real request you would replace it with the numeric ID of the account you want to look at.
  • { ... } after node(USER_ID) is the selection set: the list of fields you want back for that object. GraphQL works like an order form where you tick exactly the items you want.
  • alias is one of the fields requested for the user.
  • active_android_entitlements is the field that holds the user's entitlements. An entitlement is the record that says a user is allowed to use a particular application, in practice the list of apps they have installed or bought. The active_ prefix suggests it covers the ones currently active.
  • nodes{ ... } says the entitlements come back as a list of items called nodes, and describes what to return for each one.
  • id and is_active are fields of each entitlement: an identifier and a true or false value saying whether it is active.
  • item{id,display_name} goes one level deeper, to the application the entitlement refers to, and asks for its identifier and its human-readable name.

Put together, the request returns the list of applications the user has installed, with their display names and whether each entitlement is active. The report does not include the response body, so we do not see what the answer looked like.

Why this step: the researcher wanted to prove that the data behind the personal page could be fetched for an account that was not his, using nothing more than that account's ID. One request is enough to demonstrate it.

Root cause

Initially the behaviour was accepted as expected. The reasoning given is that in 2016 Facebook (Oculus) added a privacy setting that lets people control who can see their entitlements: public, friends, or only self. When setting up an Oculus headset you are prompted to set that value. Older accounts may therefore default to "Public", which is how the setting existed when those accounts were created. Under that model, being able to view experiences for some users is by design: you can only see them for users who selected that visibility, or who set up their entitlements years ago and never changed it.

A privacy setting is a stored preference attached to your account, and the server is supposed to read it before answering. The comparison is a "do not disturb" sign on a hotel door: housekeeping is supposed to look at the sign before entering. If the sign is missing, the question becomes what the default should be, and here the default was effectively "open".

What that model did not account for is users who listed experiences directly on desktop, through https://www.oculus.com/experiences/rift/RIFT_EXPERIENCE_ID/. The report says the expected-behaviour reasoning did not account for users who listed experiences directly on desktop through the Rift experience page.

In other words, there were two doors into the same room. One door, the headset setup, asked you to choose who could see your list. The other door, the desktop store page, let you add experiences without ever asking. The data ended up in the same place, but only one path recorded a privacy choice.

Impact

As Facebook summarised it: the applications an individual had installed for Oculus would be unexpectedly visible to others. People using applications were prompted to set the visibility of this information, and that choice was respected when set, but the information was also accessible for anyone who set up an account and engaged with the application store without actually using an application.

The report describes the gap between the visibility setting and accounts that never set it, without stating how many accounts were affected. For those accounts, anyone who could query the GraphQL endpoint with the user's ID could read the installed application list.

Why this matters even though it is "only" a list of apps: what software someone uses can reveal interests, health conditions, relationships or habits. A list of installed applications is a small profile of a person. The report does not go into this; it simply records that the data was unexpectedly visible.

Fix

The behaviour was changed so that the data is not accessible by default. The report says the behaviour was changed so that the data is not accessible by default.

Timeline as given:

Date Event
Jan 16, 2018 Report sent
Jan 16, 2018 Further investigation by Facebook
Jan 23, 2018 Further discussions
Mar 15, 2018 Fixed by Facebook
Mar 15, 2018 Bounty awarded by Facebook

A bounty is a reward a company pays a researcher who reports a security problem responsibly, instead of exploiting it or publishing it without warning.

Variants to test

These are follow-up ideas in the same spirit, useful if you want to practise this kind of thinking on a program you are authorised to test:

  1. Query other node fields on the same GraphQL endpoint for a user ID you do not own, for example entitlements other than active_android_entitlements. A positive result is any per-user data returned for an account whose visibility setting should exclude you. The idea: if one field forgot the check, its neighbours may have too.
  2. Compare the response for an account created through the headset setup flow with one created only through the desktop store. A positive result is the desktop-only account returning entitlements that the headset account hides. The idea: reproduce the exact gap between the two sign-up paths.
  3. Look for other product surfaces that write the same data through a different path than the one that enforces the privacy setting, as the desktop experience listing did here. A positive result is a write path that leaves the visibility field unset while the read path still returns the data. The idea: find every door into the room, not just the one that was fixed.
  4. Test whether the visibility value is enforced on the read path at all, by setting an account to the most restrictive option and querying it from a second account. A positive result is data returned despite the restrictive setting. The idea: check the lock itself, not only the default.

Glossary

  • API: a service that lets one program ask another for data or actions, like a waiter carrying orders between you and the kitchen.
  • Access control: the rules that decide who is allowed to see or change which data.
  • Bounty: a reward paid by a company to someone who reports a security problem responsibly.
  • Broken access control: a flaw where those rules are missing or wrong, so someone can reach data they should not.
  • Default: the value or behaviour that applies when nobody has chosen anything.
  • Endpoint: a specific address on a server that accepts requests, for example graph.oculus.com/graphql.
  • Entitlement: a record saying a user is allowed to use a particular application, in practice their installed app list.
  • Experience: Oculus's word for an application or piece of content used on its devices.
  • GET request: the basic kind of web request used to fetch something by its address.
  • GraphQL: a query language for APIs that lets a client ask for exactly the fields it wants in one request.
  • Insecure direct object reference: a specific kind of broken access control where changing an identifier in a request (such as a user ID) gives you someone else's data.
  • JSON: a plain-text format for structured data, made of names and values.
  • Node: in GraphQL, one object in the data, such as a user or an entitlement.
  • Parameter: a named value in a URL, placed after the ?, such as q=.
  • Privacy setting: a stored preference on an account that says who may see a piece of information.
  • Proof of concept: a minimal request or script that demonstrates a bug really works.
  • Query string: the part of a URL after the ? that carries parameters.
  • Selection set: in GraphQL, the list of fields inside curly braces that says what to return.
  • User ID: the unique identifier of an account, often visible in URLs and pages.
  • Visibility: who is allowed to see a given piece of information: public, friends, or only yourself.

More by Philippe Harewood

View all

56 more disclosed reports, best first.

More from Meta

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

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.