$250 for Email account enumeration using “NameToMail” tool
The password reset endpoint returned different responses for valid and invalid email addresses, allowing an attacker to enumerate registered email accounts. The author used a tool to generate candidate emails from employee names and confirmed which ones were valid.
I was invited to a private program on the HackerOne, so I’ll be referring to the site as ‘target.com’, in accordance with certain privacy-related requests. While I was testing one of their subdomains, the reset-password functionality caught my attention.
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.
Context
The target was a private program on HackerOne. The researcher refers to it as target.com to respect the program's privacy requests. The feature under test was the password reset functionality on one of the program's subdomains. A password reset form normally takes an email address and returns a generic confirmation regardless of whether that address belongs to a registered user, precisely so that the response cannot be used to tell valid accounts from invalid ones.
Setup
The researcher captured the reset-password request with Burp Suite. No other tooling, accounts or roles are described. The only precondition was access to the reset-password endpoint on the subdomain being tested.
Finding it
While testing the subdomain, the researcher captured the reset-password request and found the response "weird". The report does not reproduce the request or the response body, so the exact difference in behaviour is not shown. The reasoning drawn from it was: if a valid email produces a different response from an invalid one, then the endpoint leaks which addresses are registered. That is a username (email) enumeration issue.
Exploitation
Step 1: Confirm the differential response
The researcher captured the reset-password request and noticed the response looked unusual, then reasoned that a valid email might produce a different response from an invalid one. The report shows that the response changed for valid emails, which indicated enumeration was possible. The specific status codes, messages or lengths are not given.
Step 2: Generate candidate addresses
Guessing addresses by hand is impractical, so the researcher needed a list of plausible company addresses in common formats, such as:
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
Step 3: Use NameToMail to expand names into addresses
The researcher used a tool called NameToMail, published at github.com/ali01imani01/NameToMail, which generates emails for a company or website from a given list of names. According to the report it produces addresses in more than 70 different ways. For a single name, "Charlie Brown", the output covers hyphen, underscore and dot separators, first name only, last name only, initials, and upper, lower and mixed case combinations:
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
The researcher notes having written this script long before and that it saves a lot of time.
Step 4: Collect names for the company
The next input is a list of real people associated with target.com. The report says this is easy to obtain from Crunchbase, from theHarvester, or from other sites and tools. No specific list of names is shown.
Step 5: Run the generated addresses against the reset endpoint
The researcher ran the script and found a few valid emails. The report states that a few valid emails were found, and that the response changed for those addresses compared with the invalid ones. The post includes images of the captured response and of the valid results, but their contents are not reproduced in the text.
Root cause
The reset-password endpoint returned a response that differed depending on whether the submitted address existed. The report does not describe the implementation, so the precise cause is not stated; The report does not describe the implementation, so the precise cause is not stated.. Whatever the mechanism, the observable difference is enough to classify any submitted address as registered or not. The report does not mention rate limiting, generic-response design or any other control that would have prevented the enumeration.
Impact
An attacker can submit candidate addresses to the reset-password endpoint and learn which ones belong to real accounts. Combined with a name list for the company and a generator such as NameToMail, this turns into a practical way to build a list of valid employee addresses. The researcher received a bounty of 250 USD for the finding.
Fix
The standard remedy for this class of issue is to make the reset-password response identical for registered and unregistered addresses, for example by always showing the same confirmation message and sending the reset link only when the account exists, and to apply rate limiting to the endpoint so that bulk enumeration is impractical.
Variants to test
- Registration and login forms: submit a known-registered and a known-unregistered address and compare status codes, body text, length and timing. A consistent difference indicates enumeration.
- Other account flows: password change, email change, invitation and "resend verification" endpoints often reuse the same lookup logic. A positive result is any response that differs only on the existence of the account.
- Case and format handling: submit the same address with different casing or separators. If the application treats variants differently, the generator output above becomes even more effective.
- Timing side channels: where the response body is identical, measure response time for valid and invalid addresses. A stable, repeatable gap suggests the lookup result still influences execution.
- Rate limiting: send a batch of generated addresses and check whether requests are throttled or blocked. No throttling on a reset endpoint makes large-scale enumeration feasible.
What happened, in plain words
A security researcher was invited to test a private bug bounty program on HackerOne. A bug bounty program is an arrangement where a company invites independent testers to look for security problems in its systems and pays for the ones they report. Because the program asked for privacy, the researcher calls the site target.com throughout.
While testing one of the site's subdomains, the researcher looked at the password reset feature. A password reset form is the box where you type your email address and the site sends you a link to choose a new password. Normally such a form should answer the same way whether or not the address belongs to a real account, so that nobody can use it to work out who has an account. The response looked unusual, and the researcher reasoned that a valid address might produce a different answer. That difference let the researcher confirm which email addresses were registered, a problem called username enumeration (or, here, email enumeration). The researcher reported it and received a bounty of 250 USD.
This article walks through the whole thing from the beginning, assuming you have never done security testing before.
Context
The target was a private program on HackerOne. A private program is one you can only join by invitation, and its details are not public. The researcher refers to it as target.com to respect the program's privacy requests.
The feature under test was the password reset functionality on one of the program's subdomains. A subdomain is a part of a larger site, for example support.example.com is a subdomain of example.com. Companies often run many of them, and each one can behave differently.
A password reset form normally takes an email address and returns a generic confirmation regardless of whether that address belongs to a registered user. "Generic" means the same wording every time, something like "if an account exists, we have sent you an email". The point of that wording is precisely so that the response cannot be used to tell valid accounts from invalid ones. Think of a receptionist who always says "I will pass the message on" whether or not the person works there: you learn nothing from the answer.
Setup
The researcher captured the reset-password request with Burp Suite. Burp Suite is a tool that sits between your browser and a website and lets you see and edit every request and response. A request is the message your browser sends to a server ("please send me this page", "here is my email address"), and a response is the message the server sends back.
No other tooling, accounts or roles are described. The only precondition was access to the reset-password endpoint on the subdomain being tested. An endpoint is simply a specific address on a server that does one job, like a particular counter in a large office: one counter for passports, another for driving licences.
Finding it
While testing the subdomain, the researcher captured the reset-password request and found the response "weird". The report does not reproduce the request or the response body, so the exact difference in behaviour is not shown.
The reasoning drawn from it was: if a valid email produces a different response from an invalid one, then the endpoint leaks which addresses are registered. That is a username (email) enumeration issue. Enumeration means systematically trying many inputs and reading the answers to build a list, in this case a list of real accounts.
Why does this matter? Knowing which addresses are real is the first step of many attacks: phishing emails look far more convincing when they are addressed to a confirmed employee, and password guessing only works against accounts that exist. On its own it is a small leak, but it removes guesswork for an attacker.
Exploitation
Step 1: Confirm the differential response
The researcher captured the reset-password request and noticed the response looked unusual. The report shows that the response changed for valid emails, which indicated enumeration was possible. The specific status codes, messages or lengths are not given.
A status code is the three-digit number a server puts at the start of its response, such as 200 for "here is the page" or 404 for "not found". Comparing responses is the core habit of this kind of testing: change one thing, keep everything else the same, and see whether the answer changes.
Step 2: Generate candidate addresses
Guessing addresses by hand is impractical, so the researcher needed a list of plausible company addresses in common formats, such as:
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
Line by line:
[redacted]is the simplest pattern: a single word, such as a first name, before the @ sign.[redacted]joins a first and last name with a hyphen, a very common company format.[redacted]mixes upper and lower case and uses an underscore instead of a hyphen, because some companies use that style.[redacted]and[redacted]are generic addresses that companies often create for testing or development, and they may well exist.
Writing all of these out by hand for every employee would take forever, which is the problem the next step solves.
Step 3: Use NameToMail to expand names into addresses
The researcher used a tool called NameToMail, published at github.com/ali01imani01/NameToMail, which generates emails for a company or website from a given list of names. According to the report it produces addresses in more than 70 different ways. For a single name, "Charlie Brown", the output covers hyphen, underscore and dot separators, first name only, last name only, initials, and upper, lower and mixed case combinations:
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
What this list shows, in plain words:
- The first block uses a hyphen between the two names:
charlie-brown,brown-charlie, and the same with different capitalisation. - The next block uses an underscore:
charlie_brown,brown_charlie, again in several cases. - The last block uses a dot:
charlie.brown,brown.charlie. - Within each block there are also short forms: just the first name (
charlie), just the last name (brown), and initials combined with a name (c-brown,charlie-b). - Capitalisation varies because some systems treat
Charlieandcharlieas the same address and some do not, and because companies differ in how they write addresses.
The researcher notes having written this script long before and that it saves a lot of time. The idea is the same as a key-cutting machine: you supply the blank (a name) and it produces every plausible cut (every address format) in one go, instead of you filing each one by hand.
Step 4: Collect names for the company
The next input is a list of real people associated with target.com. The report says this is easy to obtain from Crunchbase, from theHarvester, or from other sites and tools. No specific list of names is shown.
Crunchbase is a public database of companies and their people, and theHarvester is a tool that gathers names and addresses from public sources. The point is that you do not need to break into anything to learn who works somewhere: much of it is published on purpose, on company pages, conference sites and professional profiles.
Step 5: Run the generated addresses against the reset endpoint
The researcher ran the script and found a few valid emails. The report states that a few valid emails were found, and that the response changed for those addresses compared with the invalid ones. The post includes images of the captured response and of the valid results, but their contents are not reproduced in the text.
In other words, the researcher ran the script against the company's addresses and looked at which responses differed. The differing answers marked the real accounts.
Root cause
The reset-password endpoint returned a response that differed depending on whether the submitted address existed. The report does not describe the implementation, so the precise cause is not stated; The report does not describe the implementation, so the precise cause is not stated.. Whatever the mechanism, the observable difference is enough to classify any submitted address as registered or not.
A useful comparison is a shop assistant who says "we have that in stock" for one item and "sorry, never heard of it" for another. Even without seeing the stockroom, you can map the shelves from the answers alone. The report does not mention rate limiting, generic-response design or any other control that would have prevented the enumeration. Rate limiting means refusing or slowing requests once someone sends too many in a short time, like a ticket machine that only gives out one ticket per minute.
Impact
An attacker can submit candidate addresses to the reset-password endpoint and learn which ones belong to real accounts. Combined with a name list for the company and a generator such as NameToMail, this turns into a practical way to build a list of valid employee addresses. The researcher received a bounty of 250 USD for the finding.
It is worth being clear about scale: one address at a time is a curiosity, but a script can try thousands, and a confirmed list of employees is valuable groundwork for later attacks. The finding itself does not give access to any account.
Fix
The standard remedy for this class of issue is to make the reset-password response identical for registered and unregistered addresses, for example by always showing the same confirmation message and sending the reset link only when the account exists, and to apply rate limiting to the endpoint so that bulk enumeration is impractical.
In everyday terms: the receptionist should give the same answer to everyone, and the queue should move slowly enough that nobody can ask a thousand questions in a minute.
Variants to test
- Registration and login forms: submit a known-registered and a known-unregistered address and compare status codes, body text, length and timing. A consistent difference indicates enumeration. Body text is the readable content of the response, and length is simply how long it is; both are easy to compare side by side.
- Other account flows: password change, email change, invitation and "resend verification" endpoints often reuse the same lookup logic. A positive result is any response that differs only on the existence of the account.
- Case and format handling: submit the same address with different casing or separators. If the application treats variants differently, the generator output above becomes even more effective.
- Timing side channels: where the response body is identical, measure response time for valid and invalid addresses. A stable, repeatable gap suggests the lookup result still influences execution. A timing side channel means the answer is hidden in how long the server takes rather than in what it says, like a person pausing before denying something.
- Rate limiting: send a batch of generated addresses and check whether requests are throttled or blocked. No throttling on a reset endpoint makes large-scale enumeration feasible.
Glossary
- Bug bounty program: an arrangement where a company invites independent testers to find security problems and pays for reports.
- Private program: a bounty program you can only join by invitation, with details kept out of public view.
- Subdomain: a named part of a larger site, such as
support.example.comunderexample.com. - Endpoint: a specific address on a server that performs one particular job.
- Request: the message a browser or tool sends to a server.
- Response: the message a server sends back.
- Status code: the three-digit number at the start of a response, such as 200 or 404.
- Body: the readable content of a response, as opposed to its headers and status code.
- Burp Suite: a tool that sits between browser and website so you can view and edit requests and responses.
- Password reset: the feature that lets a user choose a new password after proving control of their email address.
- Generic response: a reply that is deliberately the same in every case, so it reveals nothing.
- Enumeration: systematically trying many inputs and reading the answers to build a list, such as a list of real accounts.
- Username enumeration: learning which usernames or email addresses exist by observing differences in responses.
- Differential response: a response that changes depending on some condition, here whether the address exists.
- Rate limiting: refusing or slowing requests once too many arrive in a short period.
- Timing side channel: information leaked through how long a server takes to answer rather than through what it says.
- Crunchbase: a public database of companies and the people associated with them.
- theHarvester: a tool that collects names and addresses from public sources.
- NameToMail: a script that turns a list of names into many possible email address formats for a company.
- Bounty: the payment a program makes for a valid report.