Skip to content
Business logic Write-up Beginner

Bypass of Username Policy: Breaking the Rules with a Simple Trick

The application enforced username rules only at registration and disabled the username change option in the profile UI, but the profile update endpoint accepted an extra parameter that let the user set a new username. An attacker could therefore bypass the username policy and change their username after signup, which the text says should not be possible.

mrcix Follow

Published on medium.com

Late one evening, I decided to dive into some bug hunting for a quick session. I noticed the application had strict username rules during registration—special characters like @@ or ... or numeric-only usernames like 123 were not allowed.

mrci0x1, 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 profile update endpoint accepted a username field without re-checking the username policy or whether username changes were allowed.

Impact

A user could change their username after signup and set values that the registration policy forbids, such as special characters or numeric-only names.

What the attacker needed

A registered account; ability to intercept requests

The fix

The profile update endpoint should reject any username field and re-apply the username policy server-side if changes are ever allowed.

How it was found

  1. Register a normal account and open the profile settings.
  2. Note that the username change option is disabled.
  3. Change the bio and intercept the request in a proxy.
  4. Add an extra parameter for the username to the request.
  5. Resend the request and observe the profile update.

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, a website checks your username against its rules. This site only checked at signup and hid the change option afterwards, but the server behind the profile page still accepted a username value if you added it to the request yourself. That means the rule was only enforced in the browser, not on the server.

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.

More by mrcix

View all

2 more disclosed reports, best first.

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.