Skip to content
Access control Write-up Intermediate

Add comment on a private Oculus Developer bug report

The Oculus Developer bug reporting system allowed adding comments to private bug reports by manipulating the comment ID parameter, bypassing the check that only verified the bug ID. An attacker could add comments to other users' private bugs if they knew the comment ID.

Sarmad Hassan Follow

Published on medium.com

{{media:0}}

Sarmad Hassan (Juba Baghdad), on medium.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. 5 min read.

Context

Oculus VR is an American technology company founded by Palmer Luckey, Brendan Iribe, Jack McCauley, Michael Antonov and Nate Mitchell in July 2012 in Irvine, California, and it is owned by Facebook. The target here is the Oculus Developer site at developer.oculus.com, and specifically its support feature called Report a Bug, where users submit their bugs (not security bugs) to the Oculus support team.

The support dashboard lists bugs submitted by users. Bugs can be created in two modes: public and private. In public bugs, anyone can add comments or reply to other comments. In private bugs, no one can add comments except the owner of the bug and the support team, and private bugs do not appear in the dashboard from other users' perspective. The bug report itself is served from a URL of the form https://developer.oculus.com/bugs/bug/your-bug-ID/, and commenting is done through a GraphQL endpoint on graph.oculus.com.

Image for post
This is how the support Dashboard looks like, you can see other users public bugs. From the original on medium.com

This is how the support dashboard looks: other users' public bugs are visible.

Image for post
You can make your bug private by checking on “Keep Private option” as shown above From the original on medium.com

A bug can be made private by ticking the "Keep Private" option.

Setup

The researcher had already tested Oculus a couple of months earlier without finding a bug, and decided to test it again on 17 September. The only tooling mentioned is Burp Suite, used to intercept the comment request. Two test accounts were created to reproduce the issue. No versions or other preconditions are given.

Finding it

While poking around the Oculus Developer domain, the researcher noticed the Report a Bug option and analysed how it works. The observations were:

  • Users can submit bugs in two ways, public and private.
  • In private bugs, no one can add comments except the owner and the support team.
  • Private bugs do not appear in the dashboard from other users' perspective.

The comment and reply functionality was the interesting part: it is a write action on an object that has an explicit privacy setting, so the server has to decide, per request, whether the caller is allowed to comment on that particular bug.

Exploitation

Step 1: capture a legitimate comment request

The researcher created a public bug, added a comment to it, then replied to that comment, intercepting the request with Burp Suite. The request looked like this:

HTTP
POST /graphql?locale=user HTTP/1.1
Host: graph.oculus.com

access_token=My-Acces-Token&variables={"input":{"client_mutation_id":"1","comment_parent_id":"556190998150906","external_post_id":"548709645565708","message":"what ever"}}&blablabla

Two parameters stood out:

  1. comment_parent_id refers to the bug ID. Any public bug ID can be found from the URL, https://developer.oculus.com/bugs/bug/your-bug-ID/.
  2. external_post_id refers to the ID of the comment being replied to, in this case the researcher's own comment.

Step 2: Plan A, swap the bug ID

The first idea was to add a comment on another user's private bug by replacing the researcher's own bug ID with the victim's bug ID in comment_parent_id. This did not work.

Step 3: Plan B, swap the comment ID

The second idea was to keep the request otherwise intact but replace the external_post_id value with another user's comment ID, a comment that lives inside their private bug. With two test accounts, the researcher reproduced this and it worked: a comment was added to the victim's private bug.

Image for post
Attacker bypassed oculus protection and added comment on victim private bug. From the original on medium.com

The attacker bypassed Oculus's protection and added a comment on the victim's private bug.

The researcher's explanation is that the protection checked only the bug ID and not external_post_id (the comment ID). The researcher notes having expected Plan B to work while still working on Plan A.

Root cause

The report does not show the server-side code, so the exact implementation is not documented; the description above is the researcher's own reading of the behaviour.

Impact

An attacker can add a comment to another user's private bug report, which the privacy model says only the bug owner and the support team can do. The report describes one limitation: to exploit this, the attacker needs the comment ID of a comment inside the victim's private bug, and private bugs are not visible to anyone except the owner and the support team. The researcher acknowledges this is hard but argues it is not impossible: someone could disclose other users' comment IDs, or an attacker could build a list of random comment IDs and perform a random attack, adding comments to random private bugs. The report does not quantify how feasible either route is.

Fix

The report does not describe the code change. The timeline records that the bug was fixed on 5 October 2018 and the fix confirmed the same day, after the report was triaged on 19 September. The bug was reported directly to the Facebook Security Team and accepted as valid, and a bounty was awarded on 10 October 2018.

Timeline as given:

Date Event
Sep. 17, 2018 Initial report
Sep. 19, 2018 Report triaged
Oct. 05, 2018 Bug fixed
Oct. 05, 2018 Fix confirmed
Oct. 10, 2018 Bounty awarded

Variants to test

  • Sibling object references in GraphQL mutations. Look for mutations that take more than one ID (a parent and a child, a post and a comment, a thread and a message) and try mixing an object you own with a child ID belonging to someone else. A positive result is a successful mutation response and the content appearing under the victim's object.
  • Privacy checks on the parent only. Create a private object, then attempt writes through every child-level identifier (comment, reply, attachment, reaction) while keeping the parent ID as one you legitimately own. A positive result is the write landing on the private object.
  • Comment and reply endpoints on support or ticketing dashboards. These often have separate visibility rules for public and private tickets; test replying to a comment ID from a private ticket while supplying a public ticket ID as the parent.
  • ID enumeration on comment identifiers. Where comment IDs are sequential or otherwise guessable, test whether a random or enumerated external_post_id is accepted without any visibility check. A positive result is a comment created on an object you cannot see in the dashboard.
  • Cross-account reproduction. Always confirm with two accounts, one owning the private object and one acting as the attacker, so that a successful write is unambiguous.
Image for post
Image for post From the original on medium.com

Takeaways from the report: check your target from time to time, understand how the web app works and what permissions you have, and be creative.

Thanks to the Facebook Security Team for the bounty.

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. 11 min read.

What happened, in plain words

A security researcher found a way to post a comment on a bug report that was supposed to be private. On the Oculus Developer website, people who build software for Oculus headsets can send bug reports to the Oculus support team. Each report can be marked public (anyone can see it and comment) or private (only the person who wrote it and the support team can see it or comment). The researcher discovered that the website checked one part of the request but forgot to check another, so a stranger could sneak a comment onto someone else's private report.

This kind of mistake has a name: broken authorisation, and more specifically an insecure direct object reference, usually shortened to IDOR. "Authorisation" means the rules that decide who is allowed to do what. "Object reference" means the way a request points at a particular thing, here by its ID number. IDOR means the website trusts an ID number sent by the browser and does not check that the person sending it is allowed to touch the thing that number points to. A simple comparison: imagine a hotel where the receptionist checks your room key at the front door, but once you are inside, any door opens if you just say the room number out loud. The lock exists, but it is not checking the right thing.

Sarmad Hassan (Juba Baghdad)
Sarmad Hassan (Juba Baghdad) From the original on medium.com

What Oculus is, and what the feature does

Oculus VR is an American technology company founded by Palmer Luckey, Brendan Iribe, Jack McCauley, Michael Antonov and Nate Mitchell in July 2012 in Irvine, California. It is owned by Facebook. The part of the company relevant here is the Oculus Developer site at developer.oculus.com, a website for people who make software for Oculus products.

On that site there is a support feature called Report a Bug. Through it, users send their bugs (ordinary product bugs, not security bugs) to the Oculus support team. Think of it as a customer service inbox with a web page in front of it: you describe your problem, you send it, and the support team replies.

The support dashboard lists the bugs users have submitted. A bug can be created in one of two modes:

  • Public: anyone can see it, add comments, or reply to other people's comments.
  • Private: only the owner of the bug and the support team can see it or comment on it, and it does not show up in the dashboard for anybody else.

Each bug has its own page, at a web address of the form https://developer.oculus.com/bugs/bug/your-bug-ID/. The your-bug-ID part is a number that identifies that one bug, the way a ticket number identifies one support ticket. Comments are not sent by filling in a normal web form; they are sent by the page's JavaScript code to a separate server, graph.oculus.com, using a technology called GraphQL. GraphQL is a way for a web page to ask a server for exactly the data it needs, or to tell the server to change something, by sending a structured request. The request carries a small block of text describing the action and its inputs.

Image for post
This is how the support Dashboard looks like, you can see other users public bugs. From the original on medium.com

This is how the support dashboard looks: other users' public bugs are visible.

Image for post
You can make your bug private by checking on “Keep Private option” as shown above From the original on medium.com

A bug can be made private by ticking the "Keep Private" option.

How the researcher got there

The researcher had already tested Oculus a couple of months earlier and found nothing. On 17 September the researcher decided to try again. While exploring the Oculus Developer domain, the researcher noticed the Report a Bug option and stopped to work out how it behaves. The observations were:

  • Users can submit bugs in two ways, public and private.
  • In public bugs, anyone can add comments or reply to other comments.
  • In private bugs, no one can add comments except the owner and the support team.
  • Private bugs do not appear in the dashboard from other users' perspective.

The interesting part was commenting and replying. A comment is a write action: it changes something on the server. And it is a write action on an object that has an explicit privacy setting. That means the server has to make a decision on every single request: is the person sending this request allowed to comment on this particular bug? Whenever a website has to make that kind of decision, it is worth checking whether it makes the decision correctly, and whether it checks everything it should.

The only tool mentioned in the report is Burp Suite, a program that sits between your browser and the website and lets you look at, and change, the requests your browser sends before they reach the server. To reproduce the issue, the researcher created two test accounts. The report gives no software versions and no other preconditions.

Step 1: capture a normal comment request

The researcher created a public bug, added a comment to it, then replied to that comment. While doing this, the researcher intercepted the request with Burp Suite, so that the exact request the browser sends could be read. It looked like this:

HTTP
POST /graphql?locale=user HTTP/1.1
Host: graph.oculus.com

access_token=My-Acces-Token&variables={"input":{"client_mutation_id":"1","comment_parent_id":"556190998150906","external_post_id":"548709645565708","message":"what ever"}}&blablabla

Line by line, in plain words:

  • POST /graphql?locale=user HTTP/1.1 is the first line of an HTTP request. HTTP is the language browsers and servers use to talk to each other. POST means "I am sending data that should change something on the server". /graphql?locale=user is the address on the server being called, and locale=user is a small extra setting in the address saying which language or region setting to use. HTTP/1.1 is the version of the protocol.
  • Host: graph.oculus.com says which server the request is for. A single server can host many websites, so the request names the one it wants.
  • The empty line separates the headers (the envelope information) from the body (the actual content).
  • The body is one long line of name=value pairs joined by &. This is the same format a browser uses when you submit a normal web form.
  • access_token=My-Acces-Token is the credential that proves who is making the request. A token is a long string the server gave the browser when the user logged in; the browser sends it back with every request so the server knows which account is asking. It works like a wristband at an event: you get it at the entrance, and staff check it instead of asking for your ID every time. In this article the real value is replaced with My-Acces-Token.
  • variables={...} is the part that carries the actual instructions for GraphQL. Inside the curly braces is a JSON object, which is just a way of writing structured data as text, with names and values.
  • "input" is the name of the block holding the inputs for this action.
  • "client_mutation_id":"1" is a label the browser attaches to the action. "Mutation" is GraphQL's word for an action that changes data. The ID lets the browser match a reply to the request it sent.
  • "comment_parent_id":"556190998150906" is the ID of the bug the comment belongs to. In other words, the thing being commented on.
  • "external_post_id":"548709645565708" is the ID of the comment being replied to. In this case it is the researcher's own comment.
  • "message":"what ever" is the text of the comment itself.
  • &blablabla is the researcher's placeholder for the rest of the request body, which is not relevant to the point being made.

Two parameters stood out:

  1. comment_parent_id refers to the bug ID. Any public bug ID can be found simply by looking at the address bar, https://developer.oculus.com/bugs/bug/your-bug-ID/.
  2. external_post_id refers to the ID of the comment being replied to, in this case the researcher's own comment.

Why this step matters: to test whether a website checks permissions properly, you first need to see exactly what the browser sends when it does something legitimate. Once you have that, you can change one piece at a time and watch what the server does. It is like learning the exact words of a password before trying to see which doors it opens.

Step 2: Plan A, swap the bug ID

The first idea was simple. The request contains the bug ID. If the researcher replaced their own bug ID with the victim's bug ID in comment_parent_id, and left everything else the same, would the server accept a comment on the victim's private bug?

It did not work. The server refused. This is actually a useful result: it tells you that the server does check the bug ID, and that the privacy rule on the bug itself is being enforced at least somewhere. The researcher now knew one door was locked.

Step 3: Plan B, swap the comment ID

The second idea was to leave the bug ID alone and change the other identifier instead. The researcher kept the request otherwise intact but replaced the external_post_id value with another user's comment ID, a comment that lives inside their private bug. With the two test accounts, the researcher reproduced this, and it worked: a comment was added to the victim's private bug.

Image for post
Attacker bypassed oculus protection and added comment on victim private bug. From the original on medium.com

The attacker bypassed Oculus's protection and added a comment on the victim's private bug.

The researcher's explanation is that the protection checked only the bug ID and not external_post_id, the comment ID. The researcher also notes having expected Plan B to work while still working on Plan A.

Why it worked

A comparison: a nightclub bouncer checks that the name on your invitation matches the guest list, but never checks whose coat you are handing in at the cloakroom. The invitation is genuine, so you get in, and your coat ends up on the wrong hook.

The report does not show the server-side code, so the exact implementation is not documented. The description above is the researcher's own reading of the behaviour.

What an attacker could do with it

An attacker can add a comment to another user's private bug report. According to the privacy model, only the bug owner and the support team should be able to do that.

The report describes one limitation. To exploit this, the attacker needs the comment ID of a comment inside the victim's private bug, and private bugs are not visible to anyone except the owner and the support team. The researcher acknowledges this is hard, but argues it is not impossible: someone could disclose other users' comment IDs, or an attacker could build a list of random comment IDs and perform a random attack, adding comments to random private bugs. The report does not quantify how feasible either route is.

The fix and the timeline

The timeline records that the bug was fixed on 5 October 2018 and the fix confirmed the same day, after the report was triaged on 19 September. The bug was reported directly to the Facebook Security Team and accepted as valid, and a bounty was awarded on 10 October 2018.

Timeline as given:

Date Event
Sep. 17, 2018 Initial report
Sep. 19, 2018 Report triaged
Oct. 05, 2018 Bug fixed
Oct. 05, 2018 Fix confirmed
Oct. 10, 2018 Bounty awarded

Similar things to look for

  • Two IDs in one action. Look for actions that take more than one ID, such as a parent and a child, a post and a comment, a thread and a message. Try mixing an object you own with a child ID belonging to someone else. A positive result is a successful reply from the server and the content appearing under the victim's object.
  • Privacy checks on the parent only. Create a private object, then attempt writes through every child-level identifier (comment, reply, attachment, reaction) while keeping the parent ID as one you legitimately own. A positive result is the write landing on the private object.
  • Comment and reply features on support or ticketing dashboards. These often have separate visibility rules for public and private tickets. Test replying to a comment ID from a private ticket while supplying a public ticket ID as the parent.
  • Guessable comment IDs. Where comment IDs are sequential or otherwise guessable, test whether a random or enumerated external_post_id is accepted without any visibility check. A positive result is a comment created on an object you cannot see in the dashboard.
  • Two accounts, always. Confirm with two accounts, one owning the private object and one acting as the attacker, so that a successful write is unambiguous.
Image for post
Image for post From the original on medium.com

Takeaways from the report: check your target from time to time, understand how the web app works and what permissions you have, and be creative.

Thanks to the Facebook Security Team for the bounty.

Glossary

  • API: a way for one piece of software to talk to another, here the web page talking to the server that stores bugs and comments.
  • Authorisation: the rules that decide what a logged-in user is allowed to do.
  • Broken authorisation: a bug where those rules are missing, incomplete, or applied to the wrong thing.
  • Bounty: a payment a company gives a researcher who reports a valid security bug.
  • Burp Suite: a tool that sits between your browser and a website so you can read and change requests before they are sent.
  • Comment ID: the number that identifies one specific comment.
  • Credential: anything that proves who you are, such as a password or a token.
  • Dashboard: a web page that lists items, here the submitted bug reports.
  • GraphQL: a way for a web page to ask a server for data or to change data, using a structured request with named inputs.
  • Header: extra information sent with an HTTP request, such as which server it is for.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • IDOR (insecure direct object reference): a bug where a website accepts an ID sent by the browser and does not check that the sender is allowed to access the thing that ID points to.
  • JSON: a way of writing structured data as text, using names and values in curly braces.
  • Mutation: GraphQL's word for an action that changes data on the server.
  • Parameter: a named value sent with a request, such as comment_parent_id.
  • POST: an HTTP request that sends data intended to change something on the server.
  • Private bug: a bug report visible only to its owner and the support team.
  • Public bug: a bug report anyone can see and comment on.
  • Token: a long string given to the browser at login and sent back with each request, so the server knows which account is asking.
  • Triaged: the stage where a security team has reviewed a report and confirmed it is worth investigating.
  • Write action: any action that changes data on the server, such as posting a comment.

More by Sarmad Hassan

View all

6 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.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.