Skip to content
Business logic Write-up Beginner

How I Found a Improper Input Validation in Minutes!

The registration form did not trim leading whitespace from usernames, so a user could register a name that looked identical to an existing one. An attacker could impersonate another user, including an administrator, and use the lookalike name for phishing or reputation damage.

fuad_aliyev Follow

Published on medium.com

Today, I’m sharing a bug that is very easy to find. While hunting I never use any tools even Burp Suit! let’s dive into it.

Fuad Aliyev, 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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the username uniqueness check and storage did not normalise or trim leading whitespace, so visually identical names were treated as distinct.

Impact

An attacker could impersonate another user, including an administrator, and use the lookalike account for phishing or to damage reputation.

What the attacker needed

Ability to register an account

How it was found

  1. Go to the site's registration page.
  2. Enter a username that is already taken, but put a space before it.
  3. Complete registration and observe that the name is accepted as unclaimed.

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 write-up has not been written yet. The Original tab links to the source.

When you sign up, the site checks that your chosen username is not already taken. Here it compared the exact text, so a name with an extra space at the start was treated as different. Because the space is invisible on the page, the new account looked the same as the real one, letting someone pretend to be another user.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.