Skip to content
OAuth / SSO Write-up Intermediate

A bypass on GitLab’s Login Email Verification via OAuth ROPC flow.

GitLab's login email verification, which locks an account and revokes sessions when a sign-in comes from a new IP or device, was not applied to the OAuth Resource Owner Password Credentials flow. An attacker holding a valid username and password could therefore obtain an API-scoped access token through that flow without triggering the email verification step.

cybxis Follow

Published on cybxis.medium.com

This writeup is to raise awareness for users and developers implementing OAuth ROPC flow.

cybxis, on cybxis.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the OAuth password grant endpoint was implemented as a separate authentication path that did not share the email verification and session revocation logic used by the normal web sign-in.

Impact

An attacker who already has valid credentials could obtain a token with full read/write API access without the email verification that would otherwise lock the account; the text notes this only applies when 2FA is disabled, and GitLab treated it as a bug rather than a vulnerability.

What the attacker needed

Valid username and password; 2FA disabled on the account; access to the OAuth token endpoint

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 write-up has not been written yet. The Original tab links to the source.

GitLab has a safety feature that emails you a six-digit code when someone logs in from a new place, and it locks the account until the code is entered. The author found that a different login route, one where a program sends the username and password directly to get an access token, skips that check entirely. So if someone already knew your password, they could get in through that route without the email code stopping them.

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

More by cybxis

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.