Blog

How username guessing puts user accounts at risk

Unequal geometric responses illustrating username guessing

Username guessing becomes more effective when a website confirms which account names are valid. Login, registration and recovery features can reveal that information through different responses. Knowing an account exists does not give someone access to it, but it can help them choose targets or uncover a relationship that the user expected to remain private.

What is username guessing?

A username identifies the account someone wants to use. It may be an email address, a chosen name or an identifier assigned by an organisation.

Account enumeration means discovering which accounts exist by comparing information the application reveals. The website's response might distinguish an unknown account from a recognised account with an incorrect password. Differences can also appear outside the visible wording.

Registration and recovery features need attention too. A login page can provide a consistent answer while another feature discloses the same account information.

A tester should establish a reliable distinction. One slow response or an isolated error does not demonstrate that the site consistently reveals account status. Network conditions and normal processing can create differences unrelated to account existence.

Why it matters

Consider an employee support portal intended for confidential enquiries. If a public feature confirms which work email addresses have registered, someone could learn that a particular person uses the service.

That disclosure may matter even when the person's password remains secure. Its significance depends on the service and whether account membership was intended to be public.

A list of confirmed accounts can also support targeted password attacks or more convincing impersonation messages. The attacker has less uncertainty about which identities are relevant to the system.

The assessment should distinguish those consequences from a demonstrated account compromise. Clear evidence helps the owner decide whether to change public responses, strengthen request controls or accept a deliberate disclosure that forms part of the service.

How penetration testers check for it

  • Review agreed sign-in, registration and recovery features using known test accounts and account names that are confirmed not to exist.
  • Compare visible messages and relevant response behaviour, including reliable differences in structure, outcome or processing time.
  • Repeat proportionate checks to distinguish account-related behaviour from ordinary network variation, temporary errors or controls triggered during the assessment.
  • Explain what an unauthorised visitor can reliably learn and the likely business consequence, without presenting account identification as proof of successful access.

How to fix it

  • Provide consistent public outcomes where account existence should remain private. Check the complete response rather than changing only the wording on the page.
  • Review processing paths for reliable account-dependent differences. Ensure background requests and alternate recovery routes receive the same consideration as the main sign-in form.
  • Apply proportionate request limits and monitor repeated account checks. Review account lockout so an outsider cannot easily disrupt legitimate users by targeting their account names.
  • Send account-specific guidance through a verified private channel where appropriate. Let the account owner receive useful recovery information without confirming membership to an unauthenticated visitor.

Recheck the connected features together after changes. Fixing one response will provide limited benefit if registration or recovery still reveals the same information through another route.

Read about our methodology or contact pentested.com to discuss testing for your website.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo