Skip to content
Business logic Write-up Beginner

Linktree Username Validation Bypass: A Hidden Threat with a Leading Space

The backend failed to trim or sanitise usernames, allowing a user to register a username with a leading space that looked almost identical to an existing one. An attacker could use this to impersonate public figures and conduct phishing or social engineering.

infosecwriteups.com

Published on infosecwriteups.com

By Aditya Sunny Bug Bounty Hunter | Security Researcher | Ethical Hacker �

Aditya Sunny, 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 backend did not trim or normalise whitespace in usernames, so a leading space was accepted even though the frontend blocked it.

Impact

An attacker could impersonate public figures and conduct phishing, identity spoofing, and social engineering, especially on mobile devices where the difference is nearly invisible.

What the attacker needed

A free Linktree account; ability to intercept HTTP requests

The fix

The backend should trim spaces, remove invisible characters, mirror frontend validation, normalise usernames before comparison, and disallow usernames that differ only by whitespace.

How it was found

  1. Log in to a Linktree account.
  2. Go to Settings and then Change Username.
  3. Try an existing username and see the 'already taken' error.
  4. Intercept the PATCH request with Burp Suite.
  5. Modify the username to include a leading space and forward it.
  6. The server accepts the change and the new profile URL contains an encoded space.

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.

A website checks that a username has no spaces when you type it in, but the server that saves it does not repeat that check. By intercepting the request and adding a space at the start, someone could create a username that looks the same as another person's. Visitors might not notice the tiny difference, especially on a phone.

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.