Skip to content
Access control Disclosed report Intermediate

Custom Field Attributes may be created and updated for customers with Custom Field Trial enabled

An access control list (ACL) for managing custom fields checked a trial feature flag before checking whether the user had program management permission. This allowed any user with access to a program (including invited hackers on private programs) to create and update custom field attributes.

jobert Follow

Originally disclosed on HackerOne

Medium 5.2 View original
  • Triaged in under an hour
  • Fixed in 5 hours
  • Disclosed after 42 hours

The Custom Field feature is currently only available for customers on the Enterprise product edition. A trial period can be given by enabling the custom-fields-trial feature for programs who are not on that product edition (yet). However, when enabling this feature, the incorrect ordering of an ACL causes a vulnerability that allows anyone that can access the program to create and update Custom Field Attributes. This also works for private programs with an External Program Profile.

Steps to reproduce

Below are two regression specs. Both of these specs currently fail on develop and master.

Ruby
describe '#can_manage_custom_fields?' do
  # ... other specs for this ACL ...
  subject { Pavlov.can? :manage_custom_fields, team, user }

  let(:user) { create :user }

  context 'with trial feature enabled' do
    before { create :feature, teams: [team], key: Feature::CUSTOM_FIELDS_TRIAL }

    context 'with a private program' do
      let(:team) { create :team, :soft_launched }

      context 'without a published external program' do
        # adding `user` as an invited hacker to the team
        before do
          Commands::WhitelistedReporters::Create.interact \
            user: user,
            team: team,
            source: WhitelistedReporter::SOURCE_UNKNOWN_INVITE
        end

        it { is_expected.to eq false }
      end

      context 'with a published external program' do
        before { create :external_program, team: team }

        it { is_expected.to eq false }
      end
    end
  end
end

Root cause

Below is a copy of the manage_custom_fields ACL:

Ruby
def can_manage_custom_fields?
  return_true_if { feature_enabled?(::Feature::CUSTOM_FIELDS_TRIAL, team: team) }
  return_false_if { team.gates.closed?(FeatureGating::Gates::CUSTOM_FIELDS) }
  can_view_custom_fields_settings?
end

def can_view_custom_fields_settings?
  return_true_if { program_management_permission? }
end

The first return_true_if block is called before the program_management_permission? block. Test coverage for this particular block was lacking in the integration specs for the ACL, as well as the classes using the ACL. This incorrect order was also missed during mandatory peer review.

Impact

This vulnerability enables arbitrary users to create and update existing Custom Field Attributes. This may disclose confidential attributes and its configuration set by program members or impact the integrity of an existing Custom Field Attribute. At this moment, only three programs have this feature enabled.

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.

How it worked

Impact

This could allow arbitrary users to create and update custom field attributes, potentially disclosing confidential attributes and their configuration or impacting the integrity of existing attributes. Only three programs had the feature enabled at the time.

What the attacker needed

Custom-fields-trial feature enabled; access to the program

How it was found

  1. Enable the custom-fields-trial feature for a program.
  2. As a user with access to the program (e.g., an invited hacker on a private program), attempt to manage custom fields.
  3. The ACL incorrectly allows the action because the trial feature check returns true before the permission check.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

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

An access control list (ACL) is a set of rules that decides who can do what. Here, the rule for managing custom fields checked a trial feature flag first and returned 'allowed' without checking if the user was a program manager. So anyone who could access the program could change custom fields.

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.