Skip to content
Account takeover Disclosed report Intermediate

Total 2FA Bypass for Users

A user who had enabled WebAuthn two-factor authentication could have the second factor skipped entirely. An attacker who already knew the victim's password could log in without presenting any security key.

GitLab

Originally disclosed on GitLab

  • Fixed in 51 days
  • Disclosed after 51 days

⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.

HackerOne report #3322714 by jcarre on 2025-09-01, assigned to GitLab Team:

Report | Attachments | How To Reproduce

Report

Summary

Hope this report finds you well!

There is a total 2fa bypass for users trying to secure their account with WebAuthn 2FA.

Specifically, first see the doc if you are not familiar with webauthn. Basically, it is a mechanism to secure one's account by checking "something you own", which is considered the highest level of security mechanism.

To use webAuthn, typically you need to buy a device that is specifically made to make secure authentication. For example, an industry-standard device is yubico. And with this device, you can just plug it into your computer, set up webauthn with it on gitlab.com follow the above doc. After setting up, the next time you log in, you must plug in the same device again to the computer to pass 2FA check.

However, there is a vulnerability in gitlab.com such that an attacker can bypass any 2FA check for account set up with webauthn with device like yubico.

==I want to stress that this vuln is not a vuln of Yubico or webauthn==. You would understand why this is the case in the next section.

Steps to reproduce

For H1 triager, you must have a device like yubico to test webauthn, and you must have at least 2 yubico to reproduce. This is simply how webauthn works, and there is no workaround. If you do not have such devices, please pass this report to Gitlab or any triager with such a device in order to reproduce.

Due to the nature of webauthn, you can try to perform any of the following step on the same or different computers (like have victim account on one computer and attacker account on another computer). I have tested it on both same and different computers, and it works the same.

  1. Use Victim's account, set up 2FA with WebAuthn following the doc and enable 2FA with one Yubico.
  2. Use Attacker's account, set up 2FA with WebAuthn following the doc and enable 2FA with ==another== Yubico.
  3. Unplug any Yubico, and do the following things on behalf of ATTACKER.
  4. Try to login with Attacker account by entering the password. It will ask for 2fa. DO NOT plug in Yubico or click any where. Instead, refresh the page, which should have a URL like https://gitlab.com/users/sign_in. If after refresh it shows the same page asking for 2fa, then try to navigate to https://gitlab.com/users, it should redirect you to sign in.
  5. Now, enter the email and password of victim (Since this vuln is bypassing 2FA, it is assumed that attacker already knows the victim password). You will find 2FA is bypassed.

Video PoC

Screencast_from_10-17-2025_03_01_28_PM.webm From the original on GitLab

Impact

Simply critical. Account set up with 2FA by Webauthn means to have the highest security. And a simple bypass like this is critical in term of severity.

Thanks for reviewing my report!

Best,
Rogerace

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

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 server kept a pending two-factor state tied to the browser session rather than to the specific account being authenticated, so a later login reused it.

Impact

An attacker who already knows a victim's password could take over an account protected by WebAuthn 2FA, which the reporter calls critical.

What the attacker needed

Victim password already known; attacker has their own account; two WebAuthn security keys

How it was found

  1. Set up WebAuthn 2FA on the victim account with one security key.
  2. Set up WebAuthn 2FA on the attacker account with a different security key.
  3. Unplug all keys and start a password login to the attacker account, stopping at the 2FA prompt.
  4. Refresh the sign-in page without touching a key, then try to visit the signed-in area.
  5. Enter the victim's email and password and observe that no 2FA prompt appears.

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) asks for a second proof, such as a physical security key, after your password. WebAuthn is the standard that lets a browser talk to that key. The report says that after one account had started a login and the page was refreshed, a different account's password login went through without ever asking for the key.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.