Skip to content
Account takeover Write-up Intermediate

This $35K GitLab Hack Was So Simple You’ll Hate Yourself For Mi

GitLab's password reset endpoint accepted an array of email addresses in the user email field, causing the reset link to be sent to both the victim and an attacker-supplied address. An attacker who knows a victim's email could receive the reset link and take over the account without any interaction from the victim.

Vivek ps Follow

Published on osintteam.blog

📚 NEW BOOK ALERT! I’ve just published “Inside the Hacker’s Mind” — a comprehensive guide to bug bounty hunting.

Vivek PS, on osintteam.blog

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 backend deserialised the email field without enforcing that it must be a single string, so an array of addresses was accepted and used as multiple recipients.

Impact

An attacker who knows a victim's email could receive the password reset link and change the victim's password, leading to full account takeover without any victim interaction.

What the attacker needed

Know the victim's email address; no victim interaction required

The fix

The text says GitLab applied an immediate fix, but does not describe the change; the fix should enforce that the email field is a single string and reject arrays or other types.

How it was found

  1. Intercept the password reset request and convert the request body to JSON.
  2. Change the email field from a single string to an array containing the victim's email and the attacker's email.
  3. Submit the modified request.
  4. Observe that the reset email is delivered to both the victim's and the attacker's inbox.

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.

When you forget a password, a website sends a reset link to your email. Here, the website let the attacker add a second email address to that request, so the reset link went to both people. The attacker could then use the link to set a new password and take over the account.

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 by Vivek ps

View all

14 more disclosed reports, best first.

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.