Skip to content
IDOR Disclosed report Beginner

Can read features from any user

The GraphQL API allowed a user to query another user's new feature notifications by substituting the current-user field with a user lookup by username. An attacker could read unread feature notifications belonging to any other user.

firs0v Follow

Originally disclosed on HackerOne

Bounty$250incl. $250 bonus Medium View original
  • Triaged in 3 hours
  • Fixed in 24 days
  • Paid in 5 days
  • Disclosed after 24 days

Summary: An attacker can read feature notifications from any user. Just need to change me to user(username:"filedescriptor") in your request to get the features.

Steps To Reproduce

POST /graphql HTTP/1.1 Host: hackerone.com {"query":"query New_feature {\n query {\n id,\n ...F0\n }\n}\nfragment F0 on Query {\n user(username:\"filedescriptor\") {\n id, username\n, reputation, new_feature_notification {\n name,\n description,\n url,\n id\n }\n },\n id\n}","variables":{}}

Impact

An attacker can read unread features from any user and have to know how long this user did not visit the hackerone (as example). Probably in future you will make individual feature for individual user. So now it's a bug.

Attachments

_________2018-02-16_18.18.31.png
_________2018-02-16_18.18.31.png From the original on HackerOne
_________2018-02-16_18.18.49.png
_________2018-02-16_18.18.49.png

The original report as published on HackerOne, by firs0v. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is the HackerOne GraphQL API at hackerone.com. The researcher found that the new_feature_notification field could be requested for another user by using a user(username:...) lookup instead of me.

The report describes the issue as reading feature notifications from any user, and the reproduction is a single GraphQL request:

HTTP
POST /graphql HTTP/1.1
Host: hackerone.com
{"query":"query New_feature {\n  query {\n    id,\n    ...F0\n  }\n}\nfragment F0 on Query {\n  user(username:\"filedescriptor\") {\n    id, username\n,  reputation,   new_feature_notification {\n      name,\n      description,\n      url,\n      id\n    }\n  },\n  id\n}","variables":{}}

The steps to reproduce are simply to take a request that normally reads your own features and change me to user(username:"filedescriptor"). The query requests that user's new_feature_notification entries with their name, description, url and id, alongside the user's id, username and reputation.

The report includes two attachments:

_________2018-02-16_18.18.31.png
_________2018-02-16_18.18.31.png From the original on HackerOne
_________2018-02-16_18.18.49.png
_________2018-02-16_18.18.49.png

The report was rated medium severity with an Information Disclosure weakness and paid a 250.00 USD bounty. It was disclosed on 2018-03-12. The text does not describe a fix.

Root cause

A plausible cause is that the resolver behind new_feature_notification does not check that the user object it is attached to is the caller. The top-level query field exposes a user(username:...) lookup, and the notification field is reachable through it. Authorisation is therefore tied to the shape of the query (the me path) rather than to the data being returned, so an attacker who reaches the same field through a different parent object gets another user's data.

Impact

An attacker can read the feature notifications of any user. The report notes that this reveals unread features and that the attacker would have to know how long the user has not visited HackerOne. The researcher suggests that individual features per user may come in future. The report does not claim access to anything beyond the notification fields listed.

How this kind of bug works

GraphQL APIs expose a graph of objects, and every field on every object is a potential entry point. Object-level authorisation is often implemented in the resolver for a top-level field such as me, or in a wrapper that assumes the only way to reach a nested field is through that wrapper. When a second path to the same object exists, for example a user(username:...) or node(id:...) lookup, the nested resolver runs without the check that the first path performed. This is broken object-level authorisation, and it is the GraphQL equivalent of an insecure direct object reference.

The mistake is architectural: authorisation is enforced at the edge of the query instead of at the data. Defences that work are checks inside each resolver that returns user-scoped data, comparing the resolved owner against the authenticated identity from the request context, plus schema-level controls that remove or restrict lookup fields that are not needed by clients.

How to test for it

  1. Map the schema. If introspection is enabled, pull the types and fields; otherwise collect queries from the web client's traffic.
  2. Identify fields that return data scoped to the current user: notifications, drafts, settings, private reports, saved items, email addresses.
  3. Find every path that reaches those fields. Look for lookup fields that accept a username, an ID, a global node ID or a slug, and for nested objects that can be reached from more than one parent.
  4. With two accounts you control, send the query as account A but resolve the object belonging to account B. Compare the response with what B sees when querying itself.
  5. Try aliases and fragments to request the same field through several parents in one request, and try both the me path and the lookup path side by side.

A positive result is a response that returns another account's data, or a response that differs from the empty or null result you get for a user with no such data. Common false positives are fields that are genuinely public (profile names, public reputation), fields that return the same value for every user, and cached responses that make two accounts appear to share data. Confirm with a second pair of accounts and check that the data actually belongs to the other account.

How it is fixed

The standard fix is to enforce authorisation in the resolver that returns the sensitive field, not only in the parent lookup. The resolver should compare the owner of the object with the authenticated user from the request context and return an error or null when they differ. Where a lookup field such as user(username:...) is not needed for the client, restrict it or remove it from the schema. Adding tests that query sensitive fields through every available path helps prevent regressions.

Hunting notes

This bug class hides wherever a schema offers more than one route to the same object: me versus user(...), node(id:...) versus typed lookups, and nested fields reachable from both a viewer object and a public object. GraphQL endpoints are easy to spot in traffic, and introspection responses or error messages that list field names are strong signals. Mobile and single-page clients often reveal queries that the web UI never sends.

To get a report accepted, show the two-account proof clearly: the request as the attacker, the response containing the victim's data, and the same query as the victim for comparison. Keep the data minimal and avoid touching accounts you do not own. State the impact in terms of what the leaked fields reveal, and avoid overclaiming beyond what the response actually contains.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

HackerOne is a website where companies run bug bounty programmes and security researchers report vulnerabilities to them. The site has feature notifications, and the report refers to unread features.

The researcher found that a request could return another user's feature notifications. If you sent the request that normally returns your own feature notifications, but replaced the reference to yourself (me) with a lookup for another person by username, the site returned that other person's notifications instead. The report calls this "Can read features from any user".

To understand the mechanics, you need a few ideas. A request is the message your browser sends to a website asking for something, and the response is what comes back. A cookie is a small piece of data the site stores in your browser so it can recognise you on the next request; it is how a site knows you are logged in. A token is a similar credential, often a long random string, that proves your identity. GraphQL is a way for a site to offer one single address (an endpoint) where clients ask for exactly the fields they want, rather than many separate addresses for different pages. The client sends a query, which is a structured description of the data it wants, and the server answers with just those fields.

The report's reproduction is one GraphQL request:

HTTP
POST /graphql HTTP/1.1
Host: hackerone.com
{"query":"query New_feature {\n  query {\n    id,\n    ...F0\n  }\n}\nfragment F0 on Query {\n  user(username:\"filedescriptor\") {\n    id, username\n,  reputation,   new_feature_notification {\n      name,\n      description,\n      url,\n      id\n    }\n  },\n  id\n}","variables":{}}

Line by line:

  • POST /graphql HTTP/1.1 says this is a POST request (a request that carries a body of data) sent to the /graphql address on the server.
  • Host: hackerone.com names the website being contacted.
  • The body is a JSON object with a query key. JSON is a text format for structured data, using curly braces and quoted names.
  • query New_feature { ... } starts a named query called New_feature.
  • query { id, ...F0 } asks for the top-level query object, its id, and everything defined in the fragment named F0. A fragment is a reusable block of field selections, so you can write it once and spread it in with ...F0.
  • fragment F0 on Query { ... } defines that fragment on the Query type, the root object of the schema.
  • user(username:"filedescriptor") { ... } is the key part: instead of asking for the current user, it asks for the user whose username is filedescriptor.
  • Inside that user, it requests id, username, reputation, and new_feature_notification with name, description, url and id.
  • variables:{} is an empty set of variables; the query uses none.

The steps to reproduce are simply to take a request that normally reads your own features and change me to user(username:"filedescriptor"). The query requests that user's new_feature_notification entries with their name, description, url and id, alongside the user's id, username and reputation. The report includes two attachments:

_________2018-02-16_18.18.31.png
_________2018-02-16_18.18.31.png From the original on HackerOne
_________2018-02-16_18.18.49.png
_________2018-02-16_18.18.49.png

Why does each step matter? The report was rated medium severity with an Information Disclosure weakness and paid a 250.00 USD bounty. It was disclosed on 2018-03-12. The text does not describe a fix.

In general, how this kind of bug works

This is an authorisation problem. Authorisation means deciding whether the person making a request is allowed to see or do the thing they asked for. Authentication is different: it is proving who you are, for example by logging in. A site can authenticate you perfectly and still fail to authorise you.

The specific class is broken object-level authorisation, also called an insecure direct object reference (IDOR). The everyday comparison: a hotel receptionist checks your name at the door (authentication), but then hands you the key to any room you name, without checking that the room is yours (authorisation). In GraphQL, objects are connected in a graph, and every field on every object is a possible entry point. A check is often placed on the top-level me field, assuming that is the only way to reach your own data. When a second route exists, such as user(username:...), the nested field may run without that check. The mistake is architectural: the check sits at the edge of the query instead of at the data itself.

How to test for it, in general:

  1. Map the schema. If introspection is enabled, pull the types and fields; otherwise collect queries from the web client's traffic. Introspection is GraphQL's built-in way of asking the server to describe its own schema.
  2. Identify fields that return data scoped to the current user: notifications, drafts, settings, private reports, saved items, email addresses.
  3. Find every path that reaches those fields. Look for lookup fields that accept a username, an ID, a global node ID or a slug, and for nested objects reachable from more than one parent.
  4. With two accounts you control, send the query as account A but resolve the object belonging to account B. Compare the response with what B sees when querying itself.
  5. Try aliases and fragments to request the same field through several parents in one request, and try both the me path and the lookup path side by side. An alias is a second name for a field in the same query, so you can ask for it twice under different labels.

A positive result is a response that returns another account's data, or one that differs from the empty or null result you get for a user with no such data. Common false positives are fields that are genuinely public (profile names, public reputation), fields that return the same value for every user, and cached responses that make two accounts appear to share data. Confirm with a second pair of accounts and check that the data actually belongs to the other account.

The standard fix is to enforce authorisation in the resolver that returns the sensitive field, not only in the parent lookup. A resolver is the piece of server code that produces the value for a field. It should compare the owner of the object with the authenticated user from the request context and return an error or null when they differ. Where a lookup field such as user(username:...) is not needed by the client, restrict it or remove it from the schema. Adding tests that query sensitive fields through every available path helps prevent regressions.

This bug class hides wherever a schema offers more than one route to the same object: me versus user(...), node(id:...) versus typed lookups, and nested fields reachable from both a viewer object and a public object. GraphQL endpoints are easy to spot in traffic, and introspection responses or error messages that list field names are strong signals. Mobile and single-page clients often reveal queries that the web UI never sends. To get a report accepted, show the two-account proof clearly: the request as the attacker, the response containing the victim's data, and the same query as the victim for comparison. Keep the data minimal and avoid touching accounts you do not own. State the impact in terms of what the leaked fields reveal, and avoid overclaiming beyond what the response actually contains.

Glossary

  • Request: the message a browser or client sends to a server asking for something.
  • Response: the data the server sends back.
  • Cookie: a small piece of data stored in your browser so a site can recognise you on later requests.
  • Token: a credential, often a long random string, that proves your identity.
  • GraphQL: a way for a site to expose one endpoint where clients ask for exactly the fields they want.
  • Query: a structured description of the data a client wants from a GraphQL server.
  • Endpoint: the single address on a server that accepts a particular kind of request.
  • JSON: a text format for structured data using braces and quoted names.
  • Fragment: a reusable block of field selections in a GraphQL query, spread in with ...Name.
  • Alias: a second name given to a field in a query so it can be requested more than once.
  • Schema: the description of all types and fields a GraphQL server offers.
  • Introspection: GraphQL's built-in way of asking the server to describe its own schema.
  • Resolver: the server code that produces the value for a particular field.
  • Authentication: proving who you are, for example by logging in.
  • Authorisation: deciding whether the person making a request is allowed to see or do what they asked for.
  • Broken object-level authorisation: a flaw where a server returns an object without checking that the requester owns it.
  • Insecure direct object reference (IDOR): a related flaw where changing an identifier in a request gives access to someone else's data.
  • Information Disclosure: a weakness where data that should be private is exposed to someone who should not see it.
  • Severity: a rating of how serious a vulnerability is.
  • Bounty: a payment made to a researcher for a valid report.

More by firs0v

View all

1 more disclosed report, best first.

More from HackerOne

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.