Skip to content
Business logic Write-up Intermediate

How i Got $$ For Token Based Rate limit Bypass

The email verification endpoint enforced its rate limit by tracking a token that contained a client-controlled MAC value, so changing that value produced a fresh token and reset the counter. An attacker could therefore send unlimited verification emails and flood a victim's inbox with one-time codes.

test123cybertest Follow

Published on medium.com

Hello folks hope you’re doing well with whatever you’re working on. I’m Praveenarsh, a security engineer and bug bounty hunter.

praveenarsh0xx0, 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 rate limit was keyed on a token whose MAC field is client-supplied and not validated against the server's own record, so tampering with it created a new identity for each request.

Impact

An attacker could bypass the verification-email rate limit and send a large number of one-time codes to a victim's inbox, which could be used for spam or to obscure a genuine code.

What the attacker needed

Ability to send verification requests; intercepting proxy to edit tokens

The fix

The rate limit should be keyed on server-side state such as the account or source address rather than a client-editable token field, and the token's MAC should be validated so tampering is rejected.

How it was found

  1. Start the account-creation flow and request a verification email.
  2. Observe that after five requests the endpoint blocks further attempts.
  3. Decode the XSRF-TOKEN value, which is base64-encoded JSON containing a MAC field.
  4. Change characters inside the MAC value and re-encode the token.
  5. Send the request again and note that a new response token is issued and the limit no longer applies.
  6. Automate the change across many requests to keep receiving verification codes.

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.

Many sites limit how often you can ask them to send a code to your email, to stop abuse. Here the site decided whether you had hit the limit by looking at a value inside a token that the browser sends back, and that value could be edited by the user. By changing it each time, the site treated every request as a new user and kept sending codes.

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 test123cybertest

View all

1 more disclosed report, 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.