Unauthenticated users can obtain information about Checklist objects with unclaimed ChecklistCheck objects
An authorization scope that matched claimed checklist checks could be called with a nil user, so anonymous GraphQL requests were treated as having the CLAIMER role. This let unauthenticated users read limited Checklist fields such as name and expiry date.
- Disclosed after 58 days
The Checklist objects that can be queried through GraphQL are supposed to only be accessible by program members, the users who claimed or responded to a check belonging to a checklist, and HackerOne Pentesters. The Checklist object is also supposed to be in the running state (e.g. when the platform collects responses for the checks) for HackerOne Pentesters to access them. The authorization check is implemented as follows:
class ProtectedChecklist
include ::ProtectedAttribute::Protector
model { Checklist }
copy_roles(ProtectedTeam) do
Checklist.joins(:team)
end
property(:RUNNING_CHECKLIST) do
Checklist.running
end
role(:CLAIMER) { |requester| claimed_by_user(requester) }
role(:RESPONDER) { |requester| responded_by_user(requester) }
group(
has_feature(RUNNING_CHECKLIST) & (
has_role(PUBLIC) |
has_role(H1_PENTESTER) |
has_role(WHITELISTED_REPORTER) |
has_role(INVITATION_RECIPIENT_WITH_SATISFIED_REQUIREMENTS)
) |
has_role(TEAM_MEMBER) |
has_role(CLAIMER) |
has_role(RESPONDER),
) do
allow :checklist_check_responses
allow :checklist_checks
allow :expires_at
allow :id
allow :name
allow :team
allow :unclaimed_checklist_checks_count
end
end
At first sight, the authorization check seems to be implemented correctly. However, the CLAIMER role is leveraging the claimed_by_user scope, which is implemented as follows:
scope :claimed_by_user, lambda { |user|
where(id: ChecklistCheck.where(user_id: user).select(:checklist_id))
}
Instead of an inner join, a query (ChecklistCheck.where(user_id: user).select(:checklist_id)) is used to fetch the checklist IDs that are claimed. Because not all checks are claimed, user_id can be set to NULL in the database. Because the HackerOne GraphQL endpoint can be queried as an anonymous user, this scope can be called with nil. This causes anonymous users to automatically get the CLAIMER role, thus exposing information about Checklist objects.
The other protectors correctly implement the claimed_by_user scope.
Any relations defined on the Checklist model, such as team, checklist_check_responses, and checklist_checks are protected separately and are not accessible by anonymous users. The exposed information is limited to Checklist objects, which doesn't expose any customer information.
The following query can be used to query a Checklist object. Make sure you're signed out when executing this query.
query {
node(id: "Z2lkOi8vaGFja2Vyb25lL0NoZWNrbGlzdC8x") {
... on Checklist {
name
expires_at
}
}
}
Impact
Anonymous users can obtain information about checklists.
Context
HackerOne's platform exposes Checklist objects through its GraphQL endpoint. A checklist groups a set of checks that program members, pentesters and other participants interact with, and the platform collects responses to those checks while a checklist is in the running state. Access to a checklist is meant to be restricted: only program members, the users who claimed or responded to a check belonging to that checklist, and HackerOne Pentesters should be able to read it. For pentesters there is an additional condition, the checklist must be in the running state.
The report examines the authorisation layer that enforces those rules and shows that an anonymous caller can end up holding the CLAIMER role, exposing information about Checklist objects.
Setup
The only precondition for the attack is the ability to reach the GraphQL endpoint as an unauthenticated user, which the platform allows. No account, role or special tooling is needed. The researcher's query targets a checklist by its global node ID, and the report instructs the reader to make sure they are signed out before running it.
Finding it
The authorisation logic lives in a protector class, ProtectedChecklist, which declares which roles may access which fields:
class ProtectedChecklist
include ::ProtectedAttribute::Protector
model { Checklist }
copy_roles(ProtectedTeam) do
Checklist.joins(:team)
end
property(:RUNNING_CHECKLIST) do
Checklist.running
end
role(:CLAIMER) { |requester| claimed_by_user(requester) }
role(:RESPONDER) { |requester| responded_by_user(requester) }
group(
has_feature(RUNNING_CHECKLIST) & (
has_role(PUBLIC) |
has_role(H1_PENTESTER) |
has_role(WHITELISTED_REPORTER) |
has_role(INVITATION_RECIPIENT_WITH_SATISFIED_REQUIREMENTS)
) |
has_role(TEAM_MEMBER) |
has_role(CLAIMER) |
has_role(RESPONDER),
) do
allow :checklist_check_responses
allow :checklist_checks
allow :expires_at
allow :id
allow :name
allow :team
allow :unclaimed_checklist_checks_count
end
end
At first sight the policy looks sound. The RUNNING_CHECKLIST property gates the pentester and other public-ish roles on the checklist being in the running state, team members are handled by the copied team roles, and the CLAIMER and RESPONDER roles are meant to cover the individual users who claimed or responded to a check in the checklist.
The problem is in how the CLAIMER role is computed. It relies on the claimed_by_user scope:
scope :claimed_by_user, lambda { |user|
where(id: ChecklistCheck.where(user_id: user).select(:checklist_id))
}
Rather than an inner join between checklists and the checks that reference them, the scope builds a subquery: it selects the checklist_id values of every ChecklistCheck whose user_id equals the requester, and then matches checklists whose id is in that set. Because not every check is claimed, user_id can legitimately be NULL in the database. When the GraphQL endpoint is queried anonymously, the requester is nil, so the subquery becomes a search for checks with a NULL user, and any checklist that contains such an unclaimed check matches. The anonymous caller is therefore treated as a CLAIMER.
The report notes that the other protectors implement the claimed_by_user scope correctly, so the flaw is specific to this path.
Exploitation
Step 1: sign out
The query must be executed while signed out, so that the GraphQL endpoint resolves the requester as an anonymous user and passes nil into the scope.
Step 2: query a checklist node
The researcher supplies the following GraphQL query, using the global ID of a checklist:
query {
node(id: "[redacted]") {
... on Checklist {
name
expires_at
}
}
}
The node field resolves the global ID to a Checklist object, and the inline fragment selects the name and expires_at fields from it. Both fields are in the allow list of the ProtectedChecklist group, so once the caller is granted the CLAIMER role the fields are returned. Because the anonymous requester is nil, the claimed_by_user scope matches checklists containing checks with a NULL user_id, and the query succeeds for those checklists.
Step 3: observe the limits
The report is explicit about the boundaries of what is exposed. Relations defined on the Checklist model, such as team, checklist_check_responses and checklist_checks, are protected separately and are not accessible to anonymous users. The exposure is limited to Checklist objects themselves, and the report states that this does not expose any customer information.
Root cause
The CLAIMER role is derived from a scope that filters on user_id without excluding NULL. In SQL terms, a comparison against NULL does not behave like a normal equality match, and the subquery ChecklistCheck.where(user_id: user).select(:checklist_id) with user set to nil selects the checklist IDs of unclaimed checks. The outer where(id: ...) then treats every checklist containing an unclaimed check as claimed by the requester.
The policy itself is not at fault: the group correctly lists has_role(CLAIMER) as sufficient for the allowed fields. The defect is that the role predicate can be satisfied by an anonymous caller, so the intended restriction to the users who actually claimed a check collapses. The report also points out that the same scope is implemented correctly in the other protectors, which suggests the issue is localised to this definition rather than a systemic design flaw.
Impact
Anonymous users can obtain information about checklists, specifically the fields allowed to the CLAIMER role, such as name and expires_at. The report limits the impact: related objects are protected separately and remain inaccessible, and no customer information is exposed.
Fix
The report does not describe the change that was made.
Variants to test
- Query other node types through the same anonymous GraphQL path and check whether any role predicate resolves to a scope that matches
NULLforeign keys. A positive result is a response containing fields that should require membership or a claim. - Look for other scopes of the form
where(id: Model.where(user_id: user).select(:foreign_id))in the codebase and call them with an anonymous session. A positive result is data returned to a signed-out caller. - Test the
RESPONDERrole the same way, since it is defined alongsideCLAIMERin the same group. A positive result is a checklist returned to a user who never responded to any of its checks. - Enumerate global IDs of checklists and compare responses between signed-out and signed-in sessions. A positive result is a signed-out response that matches what a legitimate claimant sees.
What happened, in plain words
HackerOne is a website where companies (called programs) invite security researchers to look for problems in their software and report them. The platform has a feature built around objects called checklists. A checklist is a container that groups a set of checks, which are individual questions or tasks that people involved in a program, such as program members and pentesters, work through. While a checklist is in a state called running, the platform is collecting answers (responses) to those checks.
Not everyone should be able to read a checklist. The intended rule is that only three kinds of people can see one: members of the program the checklist belongs to, the users who claimed or responded to a check inside that checklist, and HackerOne Pentesters. For pentesters there is an extra condition: the checklist must be in the running state.
The researcher looked at the code that enforces those rules and found a mistake. Because of that mistake, a person who is not logged in at all, a completely anonymous visitor, can be treated as if they had claimed a check, and can therefore read some information from checklists they have nothing to do with.
To follow the rest of this article you only need a browser and a basic idea of what a website request is. Everything else is explained as it comes up.
Context
HackerOne's platform exposes checklists through something called a GraphQL endpoint. An API (application programming interface) is a way for one piece of software to ask another for data, rather than a human clicking around a website. GraphQL is a particular style of API where the client sends a description of exactly which pieces of data it wants, and the server answers with just those pieces. An endpoint is simply the address on the server that accepts these requests.
A checklist groups a set of checks that program members, pentesters and other participants interact with. The platform collects responses to those checks while a checklist is in the running state. Access is meant to be restricted: only program members, the users who claimed or responded to a check belonging to that checklist, and HackerOne Pentesters should be able to read it. For pentesters there is the additional condition that the checklist must be running.
The report examines the authorisation layer, meaning the part of the code that decides who is allowed to do what, and shows that an anonymous caller can end up holding the CLAIMER role. A role here is just a label the system attaches to whoever is making a request, such as "this person is a team member" or "this person claimed a check". Holding the CLAIMER role lets the caller read fields of checklist objects they should never see.
Setup
The only precondition for the attack is the ability to reach the GraphQL endpoint as an unauthenticated user, which the platform allows. Unauthenticated means not logged in: the server has no idea who you are. No account, role or special tooling is needed. The researcher's query targets a checklist by its global node ID, and the report instructs the reader to make sure they are signed out before running it.
A global node ID is a long encoded string that uniquely identifies one object on the platform, a bit like a barcode on a product. If you know the barcode, you can ask the system for that specific item.
Finding it
The authorisation logic lives in a protector class called ProtectedChecklist. A class is a building block in code that groups related behaviour together; a protector class is one whose job is to protect something, in this case checklists. It declares which roles may access which fields. A field is a single piece of information about an object, such as its name or its expiry date.
class ProtectedChecklist
include ::ProtectedAttribute::Protector
model { Checklist }
copy_roles(ProtectedTeam) do
Checklist.joins(:team)
end
property(:RUNNING_CHECKLIST) do
Checklist.running
end
role(:CLAIMER) { |requester| claimed_by_user(requester) }
role(:RESPONDER) { |requester| responded_by_user(requester) }
group(
has_feature(RUNNING_CHECKLIST) & (
has_role(PUBLIC) |
has_role(H1_PENTESTER) |
has_role(WHITELISTED_REPORTER) |
has_role(INVITATION_RECIPIENT_WITH_SATISFIED_REQUIREMENTS)
) |
has_role(TEAM_MEMBER) |
has_role(CLAIMER) |
has_role(RESPONDER),
) do
allow :checklist_check_responses
allow :checklist_checks
allow :expires_at
allow :id
allow :name
allow :team
allow :unclaimed_checklist_checks_count
end
end
Line by line, in plain words:
class ProtectedCheckliststarts the definition of the protector for checklists.include ::ProtectedAttribute::Protectorpulls in a shared library of protection tools, so this class does not have to reinvent the basics.model { Checklist }says which kind of object this protector guards: theChecklistmodel. A model is the code's representation of a table of data, here the table of checklists.copy_roles(ProtectedTeam) do Checklist.joins(:team) endreuses the role rules already defined for teams, applied to checklists joined to their team. In other words, whatever makes someone a member of a team also counts here.property(:RUNNING_CHECKLIST) do Checklist.running enddefines a named condition,RUNNING_CHECKLIST, which is true when the checklist is in the running state.role(:CLAIMER) { |requester| claimed_by_user(requester) }defines theCLAIMERrole: whoever is making the request (the requester) is a claimant if theclaimed_by_usercheck says so. This is the line where the bug lives.role(:RESPONDER) { |requester| responded_by_user(requester) }defines theRESPONDERrole in the same style, for people who responded to a check.- The
group(...)block lists the combinations of conditions that are allowed to read the fields listed further down. The&means "and", the|means "or". So the group is satisfied if either: the checklist is running and the requester is public, a HackerOne pentester, a whitelisted reporter, or an invitation recipient with satisfied requirements; or the requester is a team member; or the requester is a claimant; or the requester is a responder. - The
allowlines list the fields that become readable once the group is satisfied:checklist_check_responses,checklist_checks,expires_at,id,name,teamandunclaimed_checklist_checks_count.
At first sight the policy looks sound. The RUNNING_CHECKLIST property gates the pentester and other public-ish roles on the checklist being in the running state, team members are handled by the copied team roles, and the CLAIMER and RESPONDER roles are meant to cover the individual users who claimed or responded to a check in the checklist.
The problem is in how the CLAIMER role is computed. It relies on the claimed_by_user scope:
scope :claimed_by_user, lambda { |user|
where(id: ChecklistCheck.where(user_id: user).select(:checklist_id))
}
A scope is a reusable piece of a database query with a name attached, so it can be called from several places. A lambda is just an anonymous function, a small block of code that takes an input and returns a result; here it takes a user and returns a query.
Line by line:
scope :claimed_by_user, lambda { |user|names the scopeclaimed_by_userand says it accepts one input,user.where(id: ChecklistCheck.where(user_id: user).select(:checklist_id))is the actual query. Reading it inside out: the inner partChecklistCheck.where(user_id: user).select(:checklist_id)looks in the table of checks (ChecklistCheck) for rows whoseuser_idequals the given user, and keeps only thechecklist_idcolumn from those rows. The outer partwhere(id: ...)then keeps the checklists whoseidappears in that list.
Rather than an inner join between checklists and the checks that reference them, the scope builds a subquery: it selects the checklist_id values of every check whose user_id equals the requester, and then matches checklists whose id is in that set. A join is a way of combining two tables in one query so that only rows with a real match survive; a subquery is a query nested inside another query, whose result is used as a list of values.
Because not every check is claimed, user_id can legitimately be NULL in the database. NULL is the database's way of saying "no value here", as opposed to zero or an empty string. When the GraphQL endpoint is queried anonymously, the requester is nil, which is the code's equivalent of "nobody". So the subquery becomes a search for checks with a NULL user, and any checklist that contains such an unclaimed check matches. The anonymous caller is therefore treated as a CLAIMER.
A useful everyday comparison: imagine a guest list where each entry has a name, and some entries are blank because the seat was never assigned. If the door staff are told "let in anyone whose name matches the guest's name", and the guest is nobody, then every blank entry matches nobody, and the door opens for all of them. That is essentially what happens here.
The report notes that the other protectors implement the claimed_by_user scope correctly, so the flaw is specific to this path.
Exploitation
Step 1: sign out
The query must be executed while signed out, so that the GraphQL endpoint resolves the requester as an anonymous user and passes nil into the scope. If you were logged in, the system would know who you are and the user value would not be nil, so the trick would not work.
Step 2: query a checklist node
The researcher supplies the following GraphQL query, using the global ID of a checklist:
query {
node(id: "[redacted]") {
... on Checklist {
name
expires_at
}
}
}
Line by line:
query {opens a GraphQL query.node(id: "[redacted]")asks for the object identified by that global ID. Thenodefield is a general lookup that resolves a global ID to whatever object it points at.... on Checklist {is an inline fragment: it says "if the object turns out to be a Checklist, then apply the following selections". This is needed becausenodecan return many kinds of object.nameandexpires_atask for those two fields from the checklist.- The closing braces end the fragment and the query.
The node field resolves the global ID to a checklist object, and the inline fragment selects the name and expires_at fields from it. Both fields are in the allow list of the ProtectedChecklist group, so once the caller is granted the CLAIMER role the fields are returned. Because the anonymous requester is nil, the claimed_by_user scope matches checklists containing checks with a NULL user_id, and the query succeeds for those checklists.
Step 3: observe the limits
The report is explicit about the boundaries of what is exposed. Relations defined on the checklist model, such as team, checklist_check_responses and checklist_checks, are protected separately and are not accessible to anonymous users. A relation is a link from one kind of object to another, for example the link from a checklist to its team. The exposure is limited to checklist objects themselves, and the report states that this does not expose any customer information.
Root cause
The CLAIMER role is derived from a scope that filters on user_id without excluding NULL. In SQL terms, a comparison against NULL does not behave like a normal equality match, and the subquery ChecklistCheck.where(user_id: user).select(:checklist_id) with user set to nil selects the checklist IDs of unclaimed checks. The outer where(id: ...) then treats every checklist containing an unclaimed check as claimed by the requester.
SQL is the language databases use to store and retrieve data. The policy itself is not at fault: the group correctly lists has_role(CLAIMER) as sufficient for the allowed fields. The defect is that the role predicate can be satisfied by an anonymous caller, so the intended restriction to the users who actually claimed a check collapses. The report also points out that the same scope is implemented correctly in the other protectors, which suggests the issue is localised to this definition rather than a systemic design flaw.
Impact
Anonymous users can obtain information about checklists, specifically the fields allowed to the CLAIMER role, such as name and expires_at. The report limits the impact: related objects are protected separately and remain inaccessible, and no customer information is exposed. CVSS is a standard scoring system for rating how serious a security issue is.
Fix
The report does not describe the change that was made.
Variants to test
- Query other node types through the same anonymous GraphQL path and check whether any role predicate resolves to a scope that matches
NULLforeign keys. A foreign key is a column that points at a row in another table, likeuser_idpointing at a user. A positive result is a response containing fields that should require membership or a claim. - Look for other scopes of the form
where(id: Model.where(user_id: user).select(:foreign_id))in the codebase and call them with an anonymous session. A positive result is data returned to a signed-out caller. - Test the
RESPONDERrole the same way, since it is defined alongsideCLAIMERin the same group. A positive result is a checklist returned to a user who never responded to any of its checks. - Enumerate global IDs of checklists and compare responses between signed-out and signed-in sessions. Enumerate here means trying a series of IDs one after another. A positive result is a signed-out response that matches what a legitimate claimant sees.
Glossary
- API: a way for one piece of software to ask another for data or actions, without a human clicking through a website.
- GraphQL: a style of API where the client describes exactly which fields it wants and the server returns just those.
- Endpoint: the address on a server that accepts a particular kind of request.
- Checklist: a container that groups a set of checks on HackerOne.
- Check: an individual question or task inside a checklist.
- Response: an answer submitted to a check.
- Running state: the state in which the platform is collecting responses to a checklist's checks.
- Program: a company or organisation running a bug bounty on HackerOne.
- Pentester: a security researcher who tests programs for vulnerabilities.
- Authorisation: the part of a system that decides who is allowed to do what.
- Role: a label attached to a requester, such as team member, claimant or responder.
- Protector class: a class whose job is to enforce access rules on a kind of object.
- Class: a building block in code that groups related behaviour.
- Model: the code's representation of a table of data.
- Field: a single piece of information about an object, such as its name.
- Relation: a link from one kind of object to another.
- Scope: a named, reusable piece of a database query.
- Lambda: an anonymous function, a small block of code that takes an input and returns a result.
- Subquery: a query nested inside another query, whose result is used as a list of values.
- Join: a way of combining two tables in one query so that only rows with a real match survive.
- NULL: the database's way of saying "no value here", as opposed to zero or an empty string.
- nil: the code's equivalent of "nobody" or "no value".
- SQL: the language databases use to store and retrieve data.
- Foreign key: a column that points at a row in another table.
- Global node ID: a long encoded string that uniquely identifies one object on the platform.
- Inline fragment: a GraphQL construct that applies field selections only if the object is of a given type.
- Unauthenticated / anonymous: not logged in; the server has no idea who you are.
- Improper access control: a weakness where the system lets someone do or see something they should not be allowed to.
- CVSS: a standard scoring system for rating the severity of a security issue.
- Enumerate: to try a series of values one after another, such as IDs.