Skip to content
Business logic Disclosed report Beginner

API: Bug in method auth.validatePhone

The auth.validatePhone API method does not properly validate the 'sid' parameter, accepting a simplified format that allows an attacker to trigger SMS or voice calls to any user ID. Additionally, these actions occur even if the user has disabled two-factor authentication.

vladislav805 Follow

Originally disclosed on HackerOne

  • Triaged in 11 days
  • Fixed in 18 days
  • Paid in 27 days
  • Disclosed after 48 days

The bug is that auth.validatePhone does not validate the parameter "sid". In theory he should be in the format "2fa_$userId_$appId_$hash", but to get the correct result (send SMS/make call) enough only "2fa_$userId_$anyText".

For example, these requests will send a SMS: https://api.vk.com/method/auth.validatePhone?sid=2fa_23048942_lolka https://api.vk.com/method/auth.validatePhone?sid=2fa_66748_блаблабла

It turns out that with this endlessly send SMS with the activation code, and to call if the request to add voice=1: https://api.vk.com/method/auth.validatePhone?sid=2fa_66748_блаблабла&voice=1

There is also another bug. SMS and calls will be carried out in any case, even if the user has disabled two-factor authentication. // I don't know, are you interested. But there is a bug - I reported.

The original report as published on HackerOne, by vladislav805. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the API only checks that the 'sid' starts with '2fa_' and contains a user ID, but does not verify the app ID or hash, and also fails to check whether the user has 2FA enabled.

Impact

An attacker could repeatedly send SMS messages or make voice calls to any user, potentially causing harassment or financial cost, and this works even if the user has disabled two-factor authentication.

What the attacker needed

Knowledge of a user ID

How it was found

  1. Craft a request to auth.validatePhone with a sid parameter in the format '2fa_$userId_$anyText'.
  2. Send the request to trigger an SMS with an activation code to the user.
  3. Optionally add 'voice=1' to the request to trigger a voice call instead.

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 report has not been written yet. The Original tab links to the source.

This report describes a flaw in an API that handles two-factor authentication (2FA). The API is supposed to check a special code (the 'sid') before sending a text message or making a call with a login code. But it only checks part of that code, so anyone can send messages or calls to any user by guessing the user ID. This could be used to spam or harass users, and it even works if the user turned off 2FA.

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 from VK.com

View all

The newest disclosed reports for this program.

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.