Skip to content
Business logic Write-up Beginner

Logical Flaw Resulting Path Hijacking

The site did not properly verify username eligibility, allowing a user to register a username that matched an existing path such as index.php. Visiting that path then displayed the attacker's profile instead of the intended page, potentially making signup or signin pages unavailable.

Veshraj Ghimire Follow

Published on infosecwriteups.com

Hello, amazing people! I hope you are doing well.

Veshraj Ghimire, on infosecwriteups.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 application allowed usernames that collided with existing file paths without validating or reserving them.

Impact

An attacker could register usernames matching important paths such as signup.php or signin.php and take over those paths, potentially making those pages unavailable.

What the attacker needed

Ability to create an account

How it was found

  1. Sign up with the username index.php.
  2. Visit the profile page and observe that the profile appears.
  3. Visit the site path /index.php and see the profile displayed there.

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 usually checks that your chosen username is allowed. Here it did not stop someone from picking a name that is also a real page address, like index.php. So when anyone visited that address, they saw the attacker's profile instead of the normal page.

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 Veshraj Ghimire

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.