Skip to content
Business logic Write-up Intermediate

Breaking Barriers: Unmasking the Easy Password Validation Bypass in Security Key Registration | How a Dumb Frontend Led to 750 $ Bounty

The frontend relied only on the server's status code and JSON body to decide whether the current password was correct when adding or removing a security key. An attacker who could intercept and rewrite that response within seven seconds could register or remove a security key without knowing the real password.

Neh Patel Follow

Published on infosecwriteups.com

Hello Hackers, Hope you are doing grate. I am Neh Patel also known as THECYBERNEH, I am a Security Researcher from India.

Neh Patel, 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 frontend trusted the server's status code and JSON body alone, with no server-issued proof (such as a one-time cookie) that the password check really succeeded.

Impact

An attacker who can intercept the response could register or remove a security key without knowing the account password, which could weaken the account's second factor.

What the attacker needed

Attacker can intercept and modify responses; modified response reaches frontend within 7 seconds; victim has an account on the site

The fix

The server should return a unique, one-time value (for example a cookie) on a successful password check so the frontend can verify the response genuinely came from the server.

How it was found

  1. Open the security section and start adding a physical security key.
  2. Enter a wrong password and observe the server returning 401 Unauthorized with a failure body.
  3. Intercept the response and change the status code and body to a success response.
  4. Forward the modified response to the frontend within seven seconds.
  5. The page accepts the change and the security key is registered or removed without the real password.

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 add a security key, the site asks for your password and the server replies with a status code and a small message saying whether it was right. The page trusted that reply completely, so someone sitting between you and the site could change the reply to say 'correct' and the page would believe it. The author did exactly that and could add or remove a security key without knowing the password.

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.