Skip to content
Access control Disclosed report Beginner

ESCALATED: 2FA not enforced on /profile/applications

The 2FA enforcement on GitLab was not applied to the /profile/applications page, allowing a user who had not set up 2FA to access and manage OAuth applications after the grace period expired. An attacker with a user account could create or delete applications without completing 2FA.

GitLab

Originally disclosed on GitLab

  • Fixed in 11 months
  • Disclosed after 11 months

HackerOne report #691477 by brdoors3 on 2019-09-10, assigned to hackerjuan:

Hi team,

I found one access control related to your feature 'Enforcing 2FA for all users' on https://gitlab.com/

POC

1 access one group and enforce the 2FA for all users

In this test I used one grace period of 1 hour

2 after 1 hour access again https://gitlab.com

The user will be redirected to https://gitlab.com/profile/two_factor_auth

3 try to access some other areas

All pages redirect to https://gitlab.com/profile/two_factor_auth (expected behavior)

4 access https://gitlab.com/profile/applications

The 2FA is not enforced on this page. I can create and delete applications without any 2FA active

POC video attached

Impact

In this scenario after grace period has elapsed one user can access and make any change on https://gitlab.com/profile/applications

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

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

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

Root cause

Likely, the access control check for 2FA enforcement was not applied to the /profile/applications endpoint.

Impact

After the grace period, a user could access and make changes on the applications page without 2FA, potentially creating or deleting OAuth applications.

What the attacker needed

A GitLab account; group with 2FA enforcement and grace period; wait for grace period to expire

How it was found

  1. Access a group and enforce 2FA for all users with a grace period of 1 hour.
  2. After 1 hour, access GitLab again; the user is redirected to the 2FA setup page.
  3. Try to access other areas; all pages redirect to the 2FA setup page (expected).
  4. Access /profile/applications; 2FA is not enforced, and applications can be created and deleted without 2FA.

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.

Two-factor authentication (2FA) adds a second step to logging in, like a code from your phone. GitLab has a setting that forces all users in a group to use 2FA, but one page was missed. That page let users create and delete applications, which are like keys that other apps use to access your account. So someone who hadn't set up 2FA could still use that page after the deadline.

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 from GitLab

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.