Skip to content
Access control Disclosed report Intermediate

HackerOne Pentesters can access any structured scope object through GraphQL node interface

jobert Follow

Originally disclosed on HackerOne

High 8.3 View original
  • Triaged in under an hour
  • Fixed in 20 hours
  • Disclosed after 49 days

A missing authorization check in the StructuredScope protector class (app/protectors/protected_structured_scope.rb:42) enables any HackerOne Pentester to access structured scope objects of programs they aren't invited to or aren't running a penetration test through HackerOne.

Ruby
class ProtectedStructuredScope
  # ...

  property(:CAN_INVITE_HACKERS) do
    StructuredScope.unscoped
      .joins(:team)
      .merge(Team.that_can_invite_hackers)
  end

  group(
    # ...
    (has_role(H1_PENTESTER) & has_feature(CAN_INVITE_HACKERS)),
  ) do
    allow :id
    allow :asset_identifier
    allow :asset_type
    allow :eligible_for_bounty
    allow :eligible_for_submission
    allow :instruction
    allow :rendered_instruction
    allow :availability_requirement
    allow :confidentiality_requirement
    allow :integrity_requirement
    allow :max_severity
    allow :archived_at
    allow :updated_at
    # ...
end

The H1_PENTESTER role is defined as:

Ruby
  scope :user_is_hackerone_pentester, ->(user) do
    verified.where(
      User.where(id: user).where.not(id: nil).where(User.arel_table[:h1_pentester].eq(true)).select(1).arel.exists,
    )
  end

The authorization logic should contain a check that determines whether the user has access to the structured scope through the Pentest object.

To reproduce, the following GraphQL query can be used:

query {
  node(id: "Z2lkOi8vaGFja2Vyb25lL1N0cnVjdHVyZWRTY29wZS8x") {
    ... on StructuredScope {
      _id
      asset_identifier
      asset_type
    }
  }
}

Replace the node ID with any structured scope that belongs to a private program and it'll expose the attributes included in the protector.

Impact

HackerOne Pentesters, although having more access than normal users, can obtain information from private programs that they don't have access to and aren't doing a penetration test through HackerOne.

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A high-severity access control bug in hackerone.com, rated CVSS 8.3. HackerOne made it public on 11 March 2020.

About Access control

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.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Access control?

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.

More by jobert

View all

67 more disclosed reports, 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.

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.