Skip to content
Account takeover Disclosed report Intermediate

Account Takeover via Password Reset without user interactions

The password reset form accepted a JSON body where the email field was an array of two addresses, causing the reset link to be sent to both the victim and the attacker. An attacker who knows a victim's email address could therefore obtain the reset link and change the victim's password.

asterion04 Follow

Originally disclosed on HackerOne

Bounty$35,000 Critical 10.0 View original
  • Triaged in 8 days
  • Fixed in 34 days
  • Paid in 2 days
  • Disclosed after 14 months

Summary by the program

@asterion04 submitted a report to GitLab.

Summary

I found a way to change the password of a GitLab account via the password reset form and successfully retrieve the final reset link without user interactions, using just its email address. Steps to reproduce

Go to "Forgot Your Password?" link Enter the victim's email and intercept the submit request via Burp Suite . Then right-click on the HTTP Editor inside Burp Suite and select Extensions -> Content-Type Converter -> Convert to JSON (make sure to have the Content-Type Converter plugin installed from the BApp Store) Now replace this converted JSON line "user[email]":"[email protected]", to

 "user" {
     "email" [
              "[email protected]",
              "[email protected]"
       ]
 },

Forward the requests and you should get an email containing the reset link that was send to both emails ([email protected] and [email protected]) . Click on the reset link, change the password and done, you can now login as the victim using the new password.

Impact

By just knowing the victim email address used on GitLab, you can takeover his account by changing his password without user interaction since the attacker get the same email as the victim.

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

GitLab is a web-based DevOps platform, and the report concerns its account authentication flow, specifically the "Forgot Your Password?" feature on gitlab.com. That feature normally lets a user who has lost access to their account request a password reset email by entering the email address associated with their GitLab account. The program's summary describes the outcome as a way to change the password of a GitLab account through the password reset form and retrieve the final reset link without any user interaction, using only the victim's email address. The weakness was classified as Improper Access Control - Generic, with a critical severity and a CVSS score of 10.0. The report was disclosed on 26 February 2025 and the bounty was 35,000 USD.

Setup

The researcher needed only the victim's email address as a precondition. The tooling used was Burp Suite with the Content-Type Converter extension installed from the BApp Store, which is required for the JSON conversion step described below. No other accounts, roles or versions are mentioned in the report.

Finding it

The researcher found that the password reset form could be manipulated so that the reset link generated for the victim's account was also delivered to an attacker-controlled email address. The email parameter, once converted to JSON, was changed from a single string into an array of addresses, and the reset link was then sent to both. Because the reset link sent to both addresses is the same link, the attacker receives a valid reset token for the victim's account.

Exploitation

Step 1: Request a password reset

Go to the "Forgot Your Password?" link and enter the victim's email address. Intercept the submit request via Burp Suite.

Step 2: Convert the request body to JSON

Right-click on the HTTP Editor inside Burp Suite and select Extensions -> Content-Type Converter -> Convert to JSON. The Content-Type Converter plugin must be installed from the BApp Store for this option to be available.

Step 3: Replace the email parameter with an array

The converted JSON contains a line of the form:

JSON
"user[email]":"[redacted]"

Replace that line with:

JSON
"user" {
     "email" [
              "[redacted]",
              "[redacted]"
       ]
},

This changes the user object so that its email field is an array holding both the victim's address and the attacker's address, rather than a single string.

Step 4: Forward the request and collect the email

Forward the request. The result is an email containing the reset link, sent to both [redacted] and [redacted]. The attacker therefore receives the same reset link that the victim receives.

Step 5: Reset the password and log in

Click on the reset link, change the password, and log in as the victim using the new password.

Root cause

The report does not describe the server-side code. What the behaviour shows is that the password reset endpoint accepted a JSON body in which the email field was an array of addresses, and it generated a single reset link that was mailed to every address in that array. The report does not describe the server-side cause; it shows only that the reset link reached both addresses.

Impact

By knowing only the victim's email address used on GitLab, an attacker can take over the account by changing its password, without any user interaction, because the attacker receives the same reset email as the victim. The report frames this as account takeover of a GitLab account by knowing its email address.

Fix

Variants to test

  1. Submit the reset form with the email field as a JSON array containing the victim's address and an attacker address, as in the report. A positive result is a reset email arriving at the attacker address containing a link that works for the victim's account.
  2. Try the same array substitution on other endpoints that take an email parameter, such as registration, email change or invitation flows. A positive result is the same message or token being delivered to an address the attacker controls alongside the legitimate one.
  3. Try other structural changes to the parameter, such as nested objects or duplicate keys, on the same reset endpoint. A positive result is any delivery of the reset link to an address other than the account owner's.

Hunting notes

This bug lives in the password reset flow, where the email parameter was converted from form encoding to JSON and an array of addresses was accepted. The impact was demonstrated end to end: the researcher showed that the reset link reached the attacker's inbox and that the password could then be changed and the account logged into, which is what makes the account takeover concrete rather than theoretical.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

What happened, in plain words

GitLab is a website where teams keep and share computer code, and every person who uses it has an account protected by an email address and a password. If you forget your password, GitLab has a "Forgot Your Password?" page that sends a reset link to the email address on your account. Clicking that link lets you choose a new password.

The researcher found that this reset page could be tricked into sending the same reset link to a second email address as well, one that the attacker controls. Because the link is the same for both inboxes, the attacker receives a working link for the victim's account, clicks it, sets a new password, and is then logged in as the victim. The victim does not have to click anything or approve anything. The only thing the attacker needs to know is the victim's email address.

The platform classified this as "Improper Access Control - Generic", rated it critical, gave it a CVSS score of 10.0 (the maximum), paid a bounty of 35,000 USD, and disclosed the report on 26 February 2025.

Background you need first

A few ideas come up again and again below, so here they are from zero.

Account and email address. Your GitLab account is identified by an email address. That address is how GitLab knows it is really you when you need to recover the account. Think of it as the address on a letter: GitLab only posts sensitive letters to the address it has on file.

Password reset flow. When you click "Forgot Your Password?", your browser sends your email address to GitLab's server. The server checks whether an account exists, creates a one-time link (a reset link), and emails it to you. The link contains a secret value, often called a token, which proves the person clicking it is allowed to set a new password. A token is like a cloakroom ticket: whoever holds the ticket gets the coat, no questions asked. That is why a reset link must never reach anyone but the account owner.

HTTP request and response. When you fill in a form and press a button, your browser sends a message to the server called a request, and the server sends back a reply called a response. A request has a body, which is the data you typed, and the server reads that body to decide what to do.

Form encoding versus JSON. By default, a web form sends its data in a compact text format that looks like name=value&other=value. JSON is a different, more structured way of writing the same data, using curly braces {} for objects (named groups of fields), square brackets [] for arrays (lists of values), and quotes around names and text. Servers often accept both formats. The interesting part is what happens when a server accepts a value as a single piece of text in one format but as a list in the other.

Intercepting a request. Normally your browser sends the request straight to the server and you never see it. A tool called Burp Suite sits between your browser and the server, like a postal worker who opens each letter, shows it to you, and only posts it once you say so. This lets you read and edit a request before it leaves.

Burp Suite and the BApp Store. Burp Suite is a security testing tool. It has an add-on shop called the BApp Store, where extra plugins can be installed. One of them is called Content-Type Converter, and it can rewrite a request body from one format to another, for example from form encoding to JSON.

Improper Access Control. Access control means deciding who is allowed to do what. When a system lets someone do something they should not be allowed to do, that is improper access control. Here, the reset form sent the reset link to an extra address supplied by the requester.

What the researcher needed

Only one thing: the victim's email address, meaning the address registered on the victim's GitLab account. The only tool mentioned is Burp Suite with the Content-Type Converter extension installed from the BApp Store, because the JSON conversion step depends on it. The report mentions no other accounts, roles or software versions.

Finding the weakness

The researcher discovered that the password reset form could be manipulated so that the reset link created for the victim's account was also delivered to an email address the attacker controls. The crucial detail is the shape of the email field. In the normal form it is a single piece of text. Once the request is converted to JSON, that field can be changed into a list of addresses, and the server accepts the list. The result is an email containing the reset link, sent to both addresses in the list. Since the link is identical for both recipients, the attacker ends up holding a valid reset token for the victim's account.

Step by step

Step 1: Ask for a password reset

Open the "Forgot Your Password?" link, type the victim's email address, and intercept the submit request with Burp Suite so it pauses before reaching the server.

Why: you want to see and edit the exact data the form is about to send. If you let it go straight through, you cannot change anything.

Step 2: Convert the request body to JSON

Right-click inside Burp Suite's HTTP Editor and choose Extensions -> Content-Type Converter -> Convert to JSON. The Content-Type Converter plugin must be installed from the BApp Store for this menu option to exist.

Why: the trick only works in the JSON format, because JSON can express a list where the form format only expresses a single value. The converter does the rewriting for you.

Step 3: Turn the single email into a list

After conversion, the body contains a line like this:

JSON
"user[email]":"[redacted]"

Read it piece by piece: user[email] is the name of the field, meaning the email field inside the user group; the colon separates the name from the value; and "[redacted]" is the value, a single piece of text in quotes. This says: the user's email is the victim's address, one address only.

Replace that line with:

JSON
"user" {
     "email" [
              "[redacted]",
              "[redacted]"
       ]
},

Line by line: "user" { opens a group called user; "email" [ opens a list called email; the next two lines are the entries in that list, first the victim's address and then the attacker's address, separated by a comma; ] closes the list; } closes the user group; and the final comma separates this group from whatever follows in the body. The effect is that the email field is no longer one address but a list of two.

Step 4: Send it and collect the email

Forward the request. The result is an email containing the reset link, sent to both [redacted] and [redacted]. The attacker therefore receives exactly the same link as the victim.

Why this is the heart of the bug: the reset link is supposed to be a secret that only the account owner can see. Once it lands in the attacker's inbox, the secret is no longer secret.

Step 5: Set a new password and log in

Click the reset link, choose a new password, and log in as the victim with that password.

Why: the link proves to GitLab that whoever holds it may set the password. The attacker holds it, so GitLab lets the attacker set it. From that point the attacker is inside the victim's account.

Why it worked

The report does not include the server's code, so the exact programming mistake is not shown. What the behaviour tells us is this: the reset endpoint accepted a JSON body in which the email field was a list of addresses, and it produced a single reset link that it mailed to every address in that list. The report does not describe the server-side cause; it shows only that the reset link reached both addresses. The report does not say which checks existed on the server or why they failed;

What an attacker could do with it

Knowing only the email address used on GitLab, an attacker can take over the account by changing its password, with no action required from the victim, because the attacker receives the same reset email as the victim. The report presents this as account takeover of a GitLab account by knowing its email address.

How it should be fixed

Similar things worth testing

  1. Submit the reset form with the email field as a JSON list holding the victim's address and an attacker address, exactly as in the report. It worked if a reset email arrives at the attacker address and its link works for the victim's account.
  2. Try the same list substitution on other pages that take an email address, such as sign-up, changing your email, or invitations. It worked if the same message or token is delivered to an address the attacker controls alongside the legitimate one.
  3. Try other changes to the shape of the field, such as nesting objects inside each other or repeating the same field name, on the same reset page. It worked if the reset link reaches any address other than the account owner's.

Notes for anyone hunting this

This bug lives in the password reset flow, where the email value was converted from form encoding to JSON and an array of addresses was accepted. The impact here was shown from start to finish: the researcher demonstrated that the reset link reached the attacker's inbox, that the password could then be changed, and that the account could be logged into. That is what turns account takeover from a theory into a fact.

Glossary

  • Account takeover: gaining control of someone else's account, usually by learning or changing their login credentials.
  • Array: an ordered list of values in JSON, written inside square brackets [].
  • BApp Store: the built-in shop inside Burp Suite where extra plugins can be installed.
  • Bounty: a payment made by a company to a researcher who reports a valid security problem.
  • Burp Suite: a tool that sits between your browser and a website so you can pause, read and edit requests before they are sent.
  • Content-Type Converter: a Burp Suite plugin that rewrites a request body from one data format to another, such as form encoding to JSON.
  • Critical severity: the highest rating a security report can receive.
  • CVSS score: a standard number from 0 to 10 expressing how severe a vulnerability is; 10.0 is the maximum.
  • Endpoint: a specific address on a server that handles a particular action, such as the password reset submission.
  • Form encoding: the default way a web form sends data, as pairs like name=value joined by &.
  • HTTP request: the message a browser sends to a server asking it to do something.
  • HTTP response: the message a server sends back after handling a request.
  • Improper Access Control: a flaw where a system allows someone to do something they should not be permitted to do.
  • Intercept: to pause a request in a tool before it reaches the server, so it can be inspected or changed.
  • JSON: a structured text format for data, using {} for named groups, [] for lists, and quotes around names and text.
  • Object: a named group of fields in JSON, written inside curly braces {}.
  • Parameter: a named piece of data sent with a request, such as an email address.
  • Password reset flow: the series of steps that lets someone who forgot their password set a new one, usually by email.
  • Reset link: the one-time link emailed to a user that allows them to choose a new password.
  • Token: a secret value that proves the holder is allowed to perform an action; here, the value inside the reset link.
  • User interaction: any action the victim would have to take, such as clicking a link or approving a prompt; this attack needs none.
  • Vulnerability: a weakness in a system that an attacker can use to do something harmful.

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.