Team object exposes amount of participants in a private program to non-invited users
After an update that added ordering of users, the GraphQL team object exposed the participant count and participant details of private programs to users who were not invited. An attacker could query a team handle to learn that a private program exists and how many people take part in it.
- Triaged in 9 days
- Fixed in 9 days
- Paid in 10 days
- Disclosed after 10 days
Summary by the researcher
Similar to other reports, suddenly after the update with ordering users, the GraphQL API is exposing the amount of > participants in a private program to non-invited users. This allows an attacker to retrieve the amount of participants in a private program, as well as their details.
I guess I did not write this up properly, but after I noticed that in the GrapHQL schema, on the team object, the order_by selector was added, the participants attribute was exposing the hall of fame of private programs running policies in the external directory.
The updated HackerOne GraphQL schema can be found here: https://github.com/arkadiyt/bounty-targets-data/blob/master/data/hackerone_schema.graphql. It's frequently updated, so keep an eye on it.
The report
Summary: Hello.
Similar to other reports, suddenly after the update with ordering users, the GraphQL API is exposing the amount of participants in a private program to non-invited users. This allows an attacker to retrieve the amount of participants in a private program, as well as their details.
Description: Steps To Reproduce
Query, for example, ██████ via the GraphQL API. ██████ is known to have a private program running on HackerOne, and they do exist in the external directory.
query {
team(handle: "█████") {
participants { total_count }
about
}
}
You'll get the amount of participants, as well as their details if you query them.
...
{ "data": { "team": {participants": { "total_count": 268 }, "about": "████" } } }
...
Impact
This leads to information disclosure. An attacker can expose the existence of a private program under the external program directory.
Impact
This will eventually lead to information disclosure.
Context
HackerOne runs private programs: bug bounty or vulnerability disclosure programmes that are not listed publicly and whose existence is only shared with invited researchers. Alongside the web interface, HackerOne exposes a GraphQL API, and the schema for that API is published and mirrored in a public repository, which the researcher links to:
https://github.com/arkadiyt/bounty-targets-data/blob/master/data/hackerone_schema.graphql
The researcher notes that this file is frequently updated, so it is worth keeping an eye on. The team object in that schema is the representation of a programme (a team handle), and it carries a participants attribute. The report is about that attribute being reachable, with a count and details, for a private programme by a user who was never invited to it.
Setup
No special tooling is described beyond the ability to send GraphQL queries to the HackerOne API. The precondition is simply an account that is not invited to the target private programme. The researcher picked a company known to run a private programme on HackerOne and known to exist in the external programme directory, and queried its team handle.
Finding it
The researcher frames this as similar to other reports: after an update that introduced ordering of users, the GraphQL API started exposing the amount of participants in a private programme to non-invited users. The specific observation was that in the GraphQL schema, on the team object, an order_by selector had been added, and the participants attribute was exposing the hall of fame of private programmes running policies in the external directory.
So the signal was a schema change: a new selector on team that touches participant ordering, and a participants field that could be queried on a team the caller has no relationship with.
Exploitation
Step 1: query the team object for a private programme
The researcher queries a company (redacted in the report) through the GraphQL API. That company is known to have a private programme on HackerOne and to exist in the external directory.
query {
team(handle: "█████") {
participants { total_count }
about
}
}
The query asks for the team identified by its handle, and inside it requests participants { total_count } plus the about field. Nothing in the query identifies the caller as a participant or invitee of that team.
Step 2: read the count and the details
The response returns the number of participants, and, as the researcher states, their details if they are queried as well.
...
{ "data": { "team": {participants": { "total_count": 268 }, "about": "████" } } }
...
The total_count of 268 is the participant count returned for that team. The about field comes back in the same response.
Root cause
The report attributes the behaviour to the update that added ordering of users: the order_by selector appeared on the team object in the schema, and the participants attribute became reachable in a way that exposed the hall of fame of private programmes. The report does not describe the resolver code, so the exact cause is not shown; the schema change around participant ordering is the likely trigger. The report does not describe the resolver code, so the exact missing check is not shown; the schema change around participant ordering is the likely trigger.
Impact
The researcher classifies this as information disclosure. An attacker can retrieve the amount of participants in a private programme, as well as their details, and can thereby expose the existence of a private programme under the external programme directory. The report hedges the outcome: this will eventually lead to information disclosure.
Fix
What it implies is that participants on a team must be subject to the same invitation check as the rest of a private programme, so that non-invited users cannot read the count or the details.
Variants to test
- Query
participants { total_count }on team handles of known private programmes and compare with handles of public programmes. A positive result is a non-zero count returned to an account with no invitation. - Query the participant details (not just the count) on the same team. A positive result is usernames or profile data coming back for a private programme.
- Try the
order_byselector onparticipantsfor a private team, since that is the change the researcher ties the bug to. A positive result is an ordered list of participants returned to a non-invited account. - Query
aboutand other team fields alongsideparticipantson private teams. A positive result is any field of a private programme returned without an invitation.
Hunting notes
This kind of bug tends to hide where a schema changes: a new selector or field added to an object that already has access control, with the new path not covered by the same check. Watching a published GraphQL schema for additions around membership, participants or ordering is a cheap way to spot candidates. The signal during recon is a field that can be queried on a private object without any relationship to it. The researcher picked a company known to run a private programme and showed the participant count was returned, tying the disclosure to the existence of a private programme.
What happened, in plain words
HackerOne is a website where companies invite security researchers to look for bugs in their systems and report them. Some of those companies run what HackerOne calls a private program: a bug bounty or vulnerability disclosure programme that is not listed publicly. Only researchers who have been invited know it exists.
HackerOne also offers a second way to talk to its systems, besides the normal web pages you click through: an API. An API is a way for one computer program to ask another computer program for information, without a human clicking buttons. Think of the web page as a restaurant menu you read yourself, and the API as a waiter you can ask questions: you say what you want in a precise format, and the waiter brings back exactly that.
The API HackerOne offers here is a GraphQL API. GraphQL is a way of asking for data where you write a query describing the exact shape of the answer you want, field by field. Instead of the server deciding what to send you, you say "give me this object, and inside it only these fields".
A schema is the blueprint of a GraphQL API: a document that lists every object the API knows about and every field each object has. HackerOne publishes its schema, and someone mirrors a copy of it in a public GitHub repository. The researcher links to that copy:
https://github.com/arkadiyt/bounty-targets-data/blob/master/data/hackerone_schema.graphql
That link points to a file in a public GitHub repository. The file is a text copy of HackerOne's GraphQL schema. The researcher notes that the file is updated frequently, so it is worth checking regularly: if you want to know what the API can do, reading the blueprint is cheaper than guessing.
In that schema there is an object called team. A team here is HackerOne's representation of a programme, identified by a short name called a handle (a bit like a username for a company). The team object carries an attribute called participants, which represents the people taking part in that programme, the ones you would see in a programme's hall of fame.
The bug is that this participants attribute could be read, including a count and details, for a private programme, by a user who was never invited to it. In everyday terms: the guest list of a private party was readable by anyone who knew the party's name, even though the party itself was supposed to be secret.
Setup
The report describes no special tooling beyond the ability to send GraphQL queries to the HackerOne API. The only precondition is an account that has not been invited to the private programme you are looking at. That is the whole point: the account is an ordinary outsider.
The researcher picked a company known to run a private programme on HackerOne and known to exist in the external programme directory, and queried its team handle. The company name is redacted in the report, so it is not repeated here.
Finding it
The researcher frames this as similar to other reports: after an update that introduced ordering of users, the GraphQL API started exposing the amount of participants in a private programme to non-invited users. "Ordering" here means sorting: the ability to ask for a list sorted in a particular way, for example by name or by date joined.
The specific observation was that in the GraphQL schema, on the team object, an order_by selector had been added, and the participants attribute was exposing the hall of fame of private programmes running policies in the external directory. An order_by selector is simply a parameter that tells the API how to sort the results it returns.
So the signal was a change in the blueprint: a new selector on team that touches participant ordering, and a participants field that could be queried on a team the caller has no relationship with. In plain terms, someone added a sorting option to the guest list, and in doing so made the guest list readable by strangers.
Exploitation
Step 1: query the team object for a private programme
The researcher queries a company (redacted in the report) through the GraphQL API. That company is known to have a private programme on HackerOne and to exist in the external directory.
query {
team(handle: "█████") {
participants { total_count }
about
}
}
Line by line:
query {opens a GraphQL query. Everything between the braces is what you are asking for.team(handle: "█████") {asks for one team object, chosen by its handle. The handle is redacted in the report, shown as blocks.participants { total_count }asks, inside that team, for the participants list, and inside the list only for the total number of them. Asking for a count is the smallest possible request: it does not need any individual person's data.aboutasks for the team's description text, a field that sits next toparticipantson the same object.- The closing braces end the team selection and then the query.
Nothing in the query identifies the caller as a participant or invitee of that team. There is no proof of membership being sent, just a handle. That is why this step matters: if the answer comes back at all, it came back to an outsider.
Step 2: read the count and the details
The response returns the number of participants, and, as the researcher states, their details if they are queried as well.
...
{ "data": { "team": {participants": { "total_count": 268 }, "about": "████" } } }
...
Line by line:
- The outer
{ "data": { ... } }is the standard envelope of a GraphQL answer: the useful part is insidedata. "team": { ... }is the team object you asked for."participants": { "total_count": 268 }is the participant count: 268 people. This is the number for that private programme, returned to a user who was not invited."about": "████"is the team's description, redacted in the report, returned in the same response.
The count is a leak: it tells an outsider how many people take part in the programme. The researcher adds that the details of those participants can be retrieved too, by asking for them in the same query instead of only the count.
Root cause
The report attributes the behaviour to the update that added ordering of users: the order_by selector appeared on the team object in the schema, and the participants attribute became reachable in a way that exposed the hall of fame of private programmes.
The report does not describe the resolver code, so the exact missing check is not shown; the schema change around participant ordering is the likely trigger. Authorisation is the part of a system that decides who is allowed to see or do what: a bouncer at the door checking names against a list. Here the bouncer was checking the front door but not the side entrance that the new sorting feature opened.
The report does not describe the resolver code, so the exact missing check is not shown. A resolver is the piece of server code that runs when a particular field is requested and produces its value. The schema change around participant ordering is the likely trigger.
Impact
The researcher classifies this as information disclosure: a class of bug where data that should be kept from someone is handed to them, even though nothing is changed or broken. An attacker can retrieve the amount of participants in a private programme, as well as their details, and can thereby expose the existence of a private programme under the external programme directory.
Why does existence matter? Because a private programme is private precisely by not being listed. If an outsider can confirm that a company runs one, and see who takes part, they learn something the company chose not to publish. The report hedges the outcome: this will eventually lead to information disclosure. CVSS is a standard scoring system for the seriousness of a vulnerability, where a higher number means more serious.
Fix
What it implies is that participants on a team must be subject to the same invitation check as the rest of a private programme, so that non-invited users cannot read the count or the details. In the bouncer comparison: the side entrance needs the same name check as the front door.
Variants to test
These are the same checks the researcher's finding suggests, written so you can try them yourself with an ordinary account:
- Query
participants { total_count }on team handles of known private programmes and compare with handles of public programmes. A positive result is a non-zero count returned to an account with no invitation. - Query the participant details (not just the count) on the same team. A positive result is usernames or profile data coming back for a private programme.
- Try the
order_byselector onparticipantsfor a private team, since that is the change the researcher ties the bug to. A positive result is an ordered list of participants returned to a non-invited account. - Query
aboutand other team fields alongsideparticipantson private teams. A positive result is any field of a private programme returned without an invitation.
Hunting notes
This kind of bug tends to hide where a schema changes: a new selector or field added to an object that already has access control, with the new path not covered by the same check. Watching a published GraphQL schema for additions around membership, participants or ordering is a cheap way to spot candidates. Recon, short for reconnaissance, is the early phase of looking around a target to see what it exposes before trying anything.
The signal during recon is a field that can be queried on a private object without any relationship to it. The researcher picked a company known to run a private programme and showed the participant count was returned, tying the disclosure to the existence of a private programme.
Glossary
- API: a way for one program to ask another program for data or actions, without a human clicking through pages.
- GraphQL: a query language for APIs where you describe the exact fields you want in the answer.
- Query: the request you write in GraphQL, listing the objects and fields you want back.
- Schema: the published blueprint of a GraphQL API, listing every object and field it offers.
- Object: a named thing in a schema, such as a team, with a set of fields attached to it.
- Field / attribute: one piece of data inside an object, such as a count or a description.
- Selector / parameter: an extra instruction attached to a field, such as how to sort the results.
order_by: a selector that tells the API how to sort a list it returns.- Team: HackerOne's representation of a programme, identified by a handle.
- Handle: a short public name that identifies a team, like a username for a company.
- Private program: a bug bounty or disclosure programme that is not listed publicly and is shared only with invited researchers.
- Participants: the people taking part in a programme, shown in its hall of fame.
total_count: the number of items in a list, here the number of participants.- Resolver: the server-side code that produces the value of a particular field when it is requested.
- Authorisation: the check that decides who is allowed to see or do what.
- Information disclosure: a bug class where data that should be hidden is shown to someone who should not see it.
- Recon: the early phase of exploring a target to learn what it exposes.
- CVSS: a standard scoring system for the severity of a vulnerability; higher means more serious.
- Redacted: deliberately hidden in a published report, usually shown as blocks, to protect the party involved.