Skip to content
Business logic Disclosed report Intermediate

Email usurpation through the public mail of all GitLab user's mail

The email validation when adding an email to a GitLab profile could be bypassed by manipulating the email parameter, allowing an attacker to add any email address, including those of other users, and set it as public. This could lead to email usurpation.

GitLab

Originally disclosed on GitLab

  • Fixed in 18 months
  • Disclosed after 18 months

HackerOne report #454335 by bubbounty on 2018-12-03:

Summary: Bypass of the email checks when a user add an email to his profile

Description: When a user wishes add emails to his account, some checks are carried out ( is the email a valid email ?, is the email already taken ?, etc ...). Below is a simple way to bypass these checks and by hence to usurp all gitlab user's emails.

Steps To Reproduce:

Just add an e-mail and intercept the request with a proxy tool such as Burp Suite. You will have to change the email[email]. Here is an exemple (take note that the @ character for the email in bcc is double-encoded):

mail3.png
mail3.png From the original on GitLab

After that, indicate this new email as the public one on your profile and the result will be as follow:

mail1.png
mail1.png From the original on GitLab

Additionnaly, you can obtain strange results as showed bellow :

mail2.png
mail2.png From the original on GitLab

Impact

Public email address should be in a status verified before to be usable. The new email regex check should be more restrictive.

By this way, a bad guy can usurp other email addresses, already existing on the system.

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 email validation logic did not properly sanitise or verify the email parameter, allowing double-encoding and other manipulations to bypass checks.

Impact

An attacker could usurp other users' email addresses by adding them to their own profile and setting them as public, potentially misleading others.

What the attacker needed

A GitLab account; ability to intercept HTTP requests

The fix

The email validation should be more restrictive and require verification before an email can be set as public.

How it was found

  1. Add an email to your GitLab account and intercept the request with a proxy tool.
  2. Change the email[email] parameter, double-encoding the @ character in the bcc field.
  3. Submit the modified request to add the email.
  4. Set the newly added email as the public email on your profile.

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.

When you add an email to your GitLab account, the system checks if it's valid and not already used. The report shows that by intercepting the request and changing the email parameter, you can bypass these checks and add someone else's email as your public email. This means an attacker could pretend to own another person's email address on GitLab.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.