Skip to content
Account takeover Write-up Intermediate

$1600 Bounty on a Main Domain

The report describes four vulnerabilities: an open redirect on the login page, an authentication bypass in multi-factor authentication where an email verification code could be used to verify a phone number, premature disclosure of sensitive account information before completing 2FA, and a session fixation flaw allowing reuse of a 2FA session cookie across accounts. An attacker could exploit these to redirect users to malicious sites, bypass 2FA, access sensitive data without full authentication, or perform sensitive actions on other accounts without 2FA.

debug Follow

Published on medium.com

Bounty$1,600 View original

Hello, I am debu8er, and I want to explain how I found some bugs in an RDP program.

debug debug, on 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.

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. 6 min read.

I am debu8er, and this is the story of four bugs I found on the main domain of a private bug bounty program, three of which paid out for a total of $1600.

Context

A while before this, I had started reporting bugs on a VDP program with the goal of triaging 20 bugs. While working through that, I read write-ups and watched videos to learn more. One of the videos I watched was by Sean (zseano) on YouTube, titled "PUTTING YOUR MIND TO IT: BUG BOUNTIES FOR 12 MONTHS".

Or watch on YouTube
From the original on medium.com

Later I received a private invite to a program with a wildcard scope (*.redacted.com). Rather than doing subdomain discovery, I focused solely on the main domain. I tested function by function without any results, and kept working with the program. After three weeks, I finally found my first bug on this program.

The application is a web login and account system: users sign up with an email address, log in, and then perform sensitive account actions such as adding a phone number, changing the password, or updating the email. Those sensitive actions are protected by a second factor, delivered either to the email address or to the phone number. The bugs below all sit in that authentication and second-factor flow, plus one open redirect in the login redirect logic.

Setup

  • Scope: the main domain of a private program, wildcard scope *.redacted.com. I deliberately did not enumerate subdomains.
  • Tools: a browser and Burp Suite to intercept and modify requests.
  • Accounts: for the session fixation bug I needed two accounts, referred to below as Account A and Account B.
  • Preconditions: for the 2FA bugs, an account that has logged in with email and password and is being asked for a second factor. For the email/phone code confusion, the ability to receive the 6-digit code sent to the account email.

Finding it

I worked function by function. The first thing I looked at was the post-logout redirect, which carries a redirectTo parameter. That led to the open redirect. The rest came from watching how the application issues and verifies second-factor codes: the same verification endpoint is used for email codes and phone codes, and the login response before 2FA completion carries far more account data than it should. The last bug came from looking at the session cookie the application sets after a successful 2FA check.

Exploitation

Bug 1: Open Redirect (duplicate)

After logging out, the user is redirected to:

Text
https://www.redacted.com/login?redirectTo=/account

During the login process, if the URL contains ?redirectTo=/account, the user is redirected accordingly after authenticating.

  1. I tried changing the value to https://www.redacted.com/login?redirectTo=https://evil.com and logged in, but it did not work.
  2. Then I tried https://www.redacted.com/login?redirectTo=//evil.com, but it did not work either.
  3. Finally, I tried https://www.redacted.com/login?redirectTo=/%0d/evil.com and it worked: I was redirected to evil.com.

The absolute URL and the protocol-relative form were both rejected, but the value with the encoded carriage return (%0d) worked: I was redirected to evil.com.

I reported this bug, but it was marked as duplicate, with the original report submitted just one day earlier.

Bug 2: Authentication Bypass in Multi-Factor Authentication by Misusing Email Verification Codes for Phone Verification ($300)

For signing up, email verification is not required. However, after creating an account and logging in, email verification is needed to add a phone number, change the password, or update the email. The application sends a 6-digit code (XXXXXX) to the email.

Two-Factor Request for Email

HTTP
POST /api/v1/users/two_factor_auth?email=[redacted] HTTP/2Host: www.redacted.comCookie: cookieContent-Length: 30

The application sends a 2FA code to the email. After confirming the code, you can change the password, phone number, and so on. When attempting to change the phone number, the application sends a 2FA code to the phone number, in a request similar to the one above.

Two-Factor Request for Phone

HTTP
POST /api/v1/users/two_factor_auth?phone=12405456545 HTTP/2Host: www.redacted.comCookie: cookieContent-Length: 30

The only difference between the two requests is the query parameter: email= for the email channel, phone= for the phone channel. Both are issued against the same endpoint.

I then noticed that the application uses the same API to verify the 2FA code:

Verify Request

HTTP
POST /api/v1/users/verify_two_factor_auth HTTP/2Host: www.redacted.comCookie: cookieContent-Length: 24Content-Type: application/json{"otp_attempt":"116293"}

The verification request carries the OTP attempt in the JSON body.

I hypothesised that after initiating phone 2FA, I could confirm the phone number using the email 2FA code.

Steps to Reproduce

  1. Initiate the email verification to generate a new code.
  2. Intercept the network request using Burp Suite and capture the new email verification code.
  3. Start the phone verification process.
  4. Modify the intercepted request to submit the new email verification code instead of the phone code.
  5. Observe that the system accepts the email code for phone verification, completing the process erroneously.

I reported this bug and it was triaged as Medium (6.1) with a $300 bounty.

Bug 3: Premature Information Disclosure Post-Email and Password Authentication ($300)

I found this bug on a subdomain, but the subdomain is part of the main website, and I did not perform subdomain discovery.

After entering the email and password, the application sends a 2FA code. Upon submitting the 2FA code, I noticed that the login response (before confirming the 2FA code) leaks account information such as name, last name, username, secret token, phone number, PIN, and address. Although I could not modify this information, I was able to view it without needing to complete the 2FA process, just by submitting username and password.

Steps to Reproduce

  1. Navigate to the login page of https://few.redacted.com/login.
  2. Enter valid email and password credentials.
  3. Observe the HTTP response from the server, which includes sensitive user information before the 2FA code is requested or entered.

I reported this and it was triaged as Medium (4.4) with a $300 bounty.

Bug 4: Session Fixation in Website 2FA Flow Allows Bypassing 2FA for Sensitive Actions ($1000)

The application sets a session cookie _sc_session after a user completes the 2FA process. This session cookie is intended to authenticate the user for sensitive actions such as changing email, password, or phone number. However, this session cookie can be reused across different accounts, allowing an attacker to bypass 2FA checks after it has been authorised once.

Steps to Reproduce

  1. Create two accounts, Account A and Account B.
  2. Log in to Account A and initiate a sensitive action that requires 2FA.
  3. Complete the 2FA process and capture the _sc_session cookie set by the server.
  4. Use this _sc_session cookie to perform a sensitive action on Account B without completing 2FA.

I reported this bug, but it was marked as duplicate. I then checked the Android application and found the same bug in another API. I reported this and it was triaged as High (7.7) with a $1000 bounty.

Root cause

  • Session fixation in the 2FA flow: the _sc_session cookie set after 2FA can be reused across different accounts, allowing 2FA checks to be bypassed after it has been authorised once.

Impact

  • Open redirect: an attacker can craft a login link that sends a victim to an arbitrary site after authentication. In this case it was a duplicate.
  • Email code for phone verification: an email verification code is accepted for phone verification. Triaged Medium (6.1).
  • Premature information disclosure: with a valid email and password, the login response leaks name, last name, username, secret token, phone number, PIN, and address without completing 2FA. The data cannot be modified through this issue. Triaged Medium (4.4).
  • Session fixation: an attacker who completes 2FA once on their own account can reuse the resulting _sc_session cookie to perform sensitive actions on another account without that account's 2FA. The web report was a duplicate; the same bug in another API, found in the Android application, was triaged High (7.7) and paid $1000.

Fix

The report does not describe any fixes.

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. 14 min read.

What happened, in plain words

I am debu8er, and this is the story of four bugs I found on the main domain of a private bug bounty program, three of which paid out for a total of $1600.

A bug bounty program is an arrangement where a company invites people to test its website and pays for the problems they find. A private program means you can only take part if you are invited. A VDP (vulnerability disclosure program) is a similar scheme that usually does not pay money, only recognition. "Triaging" a bug means the company has looked at your report, confirmed it is real, and given it a severity rating.

All four bugs live in the same area: the part of a website that handles logging in and the extra security step that comes after. That extra step is called two-factor authentication, or 2FA: after you type your password, the site asks for a second proof, usually a short numeric code sent to your email or your phone. The idea is that a stolen password alone is not enough to get in. Three of the bugs are ways to get around that second step, and one is a way to send a user to a different website after they log in.

Context

A while before this, I had started reporting bugs on a VDP program with the goal of triaging 20 bugs. While working through that, I read write-ups and watched videos to learn more. One of the videos I watched was by Sean (zseano) on YouTube, titled "PUTTING YOUR MIND TO IT: BUG BOUNTIES FOR 12 MONTHS".

Or watch on YouTube
From the original on medium.com

Later I received a private invite to a program with a wildcard scope (*.redacted.com). Scope is the list of things you are allowed to test. A wildcard scope like *.redacted.com means every subdomain of redacted.com is in scope: shop.redacted.com, api.redacted.com, and so on. Finding those subdomains is a common first step, called subdomain discovery, but I skipped it. Instead I focused solely on the main domain, the site you reach at www.redacted.com.

I tested function by function without any results, and kept working with the program. After three weeks, I finally found my first bug on this program.

The application is a web login and account system: users sign up with an email address, log in, and then perform sensitive account actions such as adding a phone number, changing the password, or updating the email. Those sensitive actions are protected by a second factor, delivered either to the email address or to the phone number. The bugs below all sit in that authentication and second-factor flow, plus one open redirect in the login redirect logic.

Setup

  • Scope: the main domain of a private program, wildcard scope *.redacted.com. I deliberately did not enumerate subdomains.
  • Tools: a browser and Burp Suite to intercept and modify requests. Burp Suite is a program that sits between your browser and the website and lets you pause a request, read it, change it, and send it on. Think of it as a postal worker who lets you open and rewrite a letter before delivering it.
  • Accounts: for the session fixation bug I needed two accounts, referred to below as Account A and Account B.
  • Preconditions: for the 2FA bugs, an account that has logged in with email and password and is being asked for a second factor. For the email/phone code confusion, the ability to receive the 6-digit code sent to the account email.

Finding it

I worked function by function. The first thing I looked at was the post-logout redirect, which carries a redirectTo parameter. That led to the open redirect. The rest came from watching how the application issues and verifies second-factor codes: the same verification endpoint is used for email codes and phone codes, and the login response before 2FA completion carries far more account data than it should. The last bug came from looking at the session cookie the application sets after a successful 2FA check.

A parameter is a named value attached to a web address, the part after the ?. In login?redirectTo=/account, the parameter is called redirectTo and its value is /account. An endpoint is a specific address on a server that does one job, like a counter in a shop: you go to the counter for refunds, not the one for new purchases. A session cookie is a small piece of text the server gives your browser after you log in, and your browser sends it back with every later request so the server knows who you are. Think of it as the wristband you get at an event: show it and you are let back in without queuing again.

Exploitation

Bug 1: Open Redirect (duplicate)

An open redirect is a bug where a website takes a destination from the address bar and sends the user there without checking it is a safe place. Attackers use it to make a link that starts on the real, trusted site and ends on a fake one, which is useful for phishing: the victim sees the real domain at the start of the link and trusts it.

After logging out, the user is redirected to:

Text
https://www.redacted.com/login?redirectTo=/account

This line is a web address. https://www.redacted.com/login is the login page. Everything after the ? is a parameter: redirectTo=/account tells the site "after I log in, send me to /account". The site uses this so that if you were trying to reach a page and got bounced to the login screen, you end up where you wanted to go afterwards.

During the login process, if the URL contains ?redirectTo=/account, the user is redirected accordingly after authenticating.

  1. I tried changing the value to https://www.redacted.com/login?redirectTo=https://evil.com and logged in, but it did not work. Here the destination is a full address on another site. The site refused it, which is the correct behaviour.
  2. Then I tried https://www.redacted.com/login?redirectTo=//evil.com, but it did not work either. A value starting with // is called protocol-relative: the browser fills in https: itself, so //evil.com means https://evil.com. The site refused this too.
  3. Finally, I tried https://www.redacted.com/login?redirectTo=/%0d/evil.com and it worked: I was redirected to evil.com. %0d is an encoded carriage return, an invisible control character. The value with the encoded carriage return worked: I was redirected to evil.com.

The absolute URL and the protocol-relative form were both rejected, but the value with the encoded carriage return (%0d) worked: I was redirected to evil.com.

I reported this bug, but it was marked as duplicate, with the original report submitted just one day earlier. A duplicate means someone else reported the same issue first, so no reward is paid for it.

Bug 2: Authentication Bypass in Multi-Factor Authentication by Misusing Email Verification Codes for Phone Verification ($300)

An authentication bypass means getting past a security check without satisfying it. Multi-factor authentication (MFA) is the general name for asking for more than one proof of identity; 2FA is the common case with exactly two. An API is the set of addresses a website's own pages (or a mobile app) talk to behind the scenes to fetch and change data. When you click a button, your browser sends a request to an API endpoint and the answer comes back as data, often in a format called JSON, which is just text structured with curly brackets and labels.

For signing up, email verification is not required. However, after creating an account and logging in, email verification is needed to add a phone number, change the password, or update the email. The application sends a 6-digit code (XXXXXX) to the email.

Two-Factor Request for Email

HTTP
POST /api/v1/users/two_factor_auth?email=[redacted] HTTP/2Host: www.redacted.comCookie: cookieContent-Length: 30

Line by line:

  • POST /api/v1/users/two_factor_auth?email=[redacted] HTTP/2 is the request line. POST means "I am sending data and asking you to act on it". /api/v1/users/two_factor_auth is the endpoint. ?email=[redacted] is the parameter saying which email address should receive the code. HTTP/2 is the version of the language the browser and server use to talk.
  • Host: www.redacted.com says which website the request is for. One server can host many sites, so this tells it which one you want.
  • Cookie: cookie is where the session cookie would be sent, so the server knows which logged-in user is asking. The actual value is replaced here.
  • Content-Length: 30 says how many bytes of body follow the headers. The body itself is not shown.

The application sends a 2FA code to the email. After confirming the code, you can change the password, phone number, and so on. When attempting to change the phone number, the application sends a 2FA code to the phone number, in a request similar to the one above.

Two-Factor Request for Phone

HTTP
POST /api/v1/users/two_factor_auth?phone=12405456545 HTTP/2Host: www.redacted.comCookie: cookieContent-Length: 30

This is the same request with one change: the parameter is now phone=12405456545 instead of email=....

The only difference between the two requests is the query parameter: email= for the email channel, phone= for the phone channel. Both are issued against the same endpoint.

I then noticed that the application uses the same API to verify the 2FA code:

Verify Request

HTTP
POST /api/v1/users/verify_two_factor_auth HTTP/2Host: www.redacted.comCookie: cookieContent-Length: 24Content-Type: application/json{"otp_attempt":"116293"}

Line by line:

  • POST /api/v1/users/verify_two_factor_auth HTTP/2 is the request line for a different endpoint, the one that checks a code. Notice there is no ?email= or ?phone= here.
  • Host: www.redacted.com and Cookie: cookie do the same jobs as before: which site, and which logged-in user.
  • Content-Length: 24 is the size of the body.
  • Content-Type: application/json tells the server the body is JSON, so it should be read as structured data rather than plain text.
  • {"otp_attempt":"116293"} is the body. otp_attempt is the field holding the code the user typed; 116293 is the six-digit code. OTP stands for one-time password, a code meant to be used once and then thrown away.

The verification request carries the OTP attempt in the JSON body.

I hypothesised that after initiating phone 2FA, I could confirm the phone number using the email 2FA code. In other words: ask the site to send a code to my email, then start the phone verification and type the email code into it.

Steps to Reproduce

  1. Initiate the email verification to generate a new code.
  2. Intercept the network request using Burp Suite and capture the new email verification code.
  3. Start the phone verification process.
  4. Modify the intercepted request to submit the new email verification code instead of the phone code.
  5. Observe that the system accepts the email code for phone verification, completing the process erroneously.

I reported this bug and it was triaged as Medium (6.1) with a $300 bounty. The number in brackets is a CVSS score, a standard 0 to 10 scale for how serious a bug is; 6.1 sits in the medium band.

Bug 3: Premature Information Disclosure Post-Email and Password Authentication ($300)

Information disclosure means the site reveals data to someone who should not have it yet. Here the "yet" matters: the data belongs to the account owner, but it should only be shown after the second factor is passed.

I found this bug on a subdomain, but the subdomain is part of the main website, and I did not perform subdomain discovery.

After entering the email and password, the application sends a 2FA code. Upon submitting the 2FA code, I noticed that the login response (before confirming the 2FA code) leaks account information such as name, last name, username, secret token, phone number, PIN, and address. Although I could not modify this information, I was able to view it without needing to complete the 2FA process, just by submitting username and password.

A response is what the server sends back after a request. Normally you never see it, because the browser uses it to draw the page. With Burp Suite you can read it directly.

Steps to Reproduce

  1. Navigate to the login page of https://few.redacted.com/login.
  2. Enter valid email and password credentials.
  3. Observe the HTTP response from the server, which includes sensitive user information before the 2FA code is requested or entered.

I reported this and it was triaged as Medium (4.4) with a $300 bounty.

Bug 4: Session Fixation in Website 2FA Flow Allows Bypassing 2FA for Sensitive Actions ($1000)

Session fixation is a bug where a session identifier (here, a cookie) is not tied tightly enough to the person it was created for, so it can be reused by someone else. The name comes from the idea of fixing a session in place and then handing it to another user.

The application sets a session cookie _sc_session after a user completes the 2FA process. This session cookie is intended to authenticate the user for sensitive actions such as changing email, password, or phone number. However, this session cookie can be reused across different accounts, allowing an attacker to bypass 2FA checks after it has been authorised once. In everyday terms: the wristband that proves "I passed the second check" is not stamped with whose wrist it is on, so anyone wearing it gets treated as verified.

Steps to Reproduce

  1. Create two accounts, Account A and Account B.
  2. Log in to Account A and initiate a sensitive action that requires 2FA.
  3. Complete the 2FA process and capture the _sc_session cookie set by the server.
  4. Use this _sc_session cookie to perform a sensitive action on Account B without completing 2FA.

I reported this bug, but it was marked as duplicate. I then checked the Android application and found the same bug in another API. I reported this and it was triaged as High (7.7) with a $1000 bounty.

Root cause

  • Session fixation in the 2FA flow: the _sc_session cookie set after 2FA can be reused across different accounts, allowing 2FA checks to be bypassed after it has been authorised once.

Impact

  • Open redirect: an attacker can craft a login link that sends a victim to an arbitrary site after authentication. In this case it was a duplicate.
  • Email code for phone verification: an email verification code is accepted for phone verification. Triaged Medium (6.1).
  • Premature information disclosure: with a valid email and password, the login response leaks name, last name, username, secret token, phone number, PIN, and address without completing 2FA. The data cannot be modified through this issue. Triaged Medium (4.4).
  • Session fixation: an attacker who completes 2FA once on their own account can reuse the resulting _sc_session cookie to perform sensitive actions on another account without that account's 2FA. The web report was a duplicate; the same bug in another API, found in the Android application, was triaged High (7.7) and paid $1000.

Fix

The report does not describe any fixes.

Glossary

  • 2FA (two-factor authentication): asking for two different proofs of identity, usually a password plus a code sent to your email or phone.
  • API: the set of addresses a website or app uses behind the scenes to fetch and change data.
  • Authentication: proving who you are, usually with a password and a code.
  • Authentication bypass: getting past a security check without satisfying it.
  • Bug bounty program: a scheme where a company pays people for finding and reporting problems in its systems.
  • Burp Suite: a tool that sits between your browser and a website so you can pause, read and change requests.
  • Cookie: a small piece of text a server gives your browser, sent back on later requests so the server recognises you.
  • CVSS score: a standard 0 to 10 number for how serious a vulnerability is.
  • Duplicate: a report for a bug that someone else already reported first, so no reward is paid.
  • Endpoint: a specific address on a server that performs one job.
  • Information disclosure: a bug where the site reveals data to someone who should not have it.
  • JSON: a text format for structured data, using curly brackets and labels.
  • MFA (multi-factor authentication): the general name for asking for more than one proof of identity.
  • Open redirect: a bug where a site sends the user to a destination taken from the address bar without checking it is safe.
  • OTP (one-time password): a short code meant to be used once, then discarded.
  • Parameter: a named value attached to a web address after the ?.
  • Phishing: tricking someone into trusting a link or page that looks genuine but is not.
  • Private program: a bug bounty program you can only join by invitation.
  • Protocol-relative URL: an address starting with //, where the browser fills in https: itself.
  • Response: what a server sends back after a request.
  • Scope: the list of systems you are allowed to test.
  • Session fixation: a bug where a session identifier is not tied tightly enough to its owner and can be reused by someone else.
  • Subdomain: a site under a main domain, such as shop.redacted.com under redacted.com.
  • Subdomain discovery: the process of finding a company's subdomains.
  • Triage: the company reviewing a report, confirming it, and rating its severity.
  • VDP (vulnerability disclosure program): a scheme for reporting bugs that usually offers recognition rather than money.
  • Wildcard scope: a scope that covers every subdomain of a domain, written *.redacted.com.

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.