Skip to content
CSRF Disclosed report Beginner

Монипулирование на страницах пользоватлей значением "Подсказывать стикеры в полях ввода"

pisarenko Follow

Originally disclosed on HackerOne

Bounty$100 Low View original
  • Triaged in 5 days
  • Fixed in 17 days
  • Paid in 21 days
  • Disclosed after 45 days
## Summary by the program

Отсутствовал `hash` в запроса�
 при изменении настроек стикеров.

## Summary by the researcher

Ошибочка в репорте `включить` на конце 1 
Включить 
https://m.vk.com/attachments?_ajax=1&act=stickers_hints_enabled&value=1

CSRF - ОТСУСТВИЕ HASH дает возможность совершать переключение в мобильной версии ВК , подсказок в поля�
 ввода ! Тем самым можем отключить у пользователя без его ведома нужную ему функцию! 

Эта функция нужна пользователю если он вводит `Привет` ему автоматически подгружаются стикеры которые можно отправить (если ГАЛКА стоит) , мы можем её отключить без его �
отения 

В полной верссии сайта https://vk.com/stickers?tab=winter HASH присутствует !

Вот запрос
https://vk.com/al_settings.php?act=a_change_stickers_hints&al=1&hash=HASH&hints=0

Мы все yмpём

███████████████████████████
███████▀▀▀░░░░░░░▀▀▀███████
████▀░░░░░░░░░░░░░░░░░▀████ 
███│░░░░░░░░░░░░░░░░░░░│███ 
██▌│░░░░░░░░░░░░░░░░░░░│▐██ 
██░└┐░░░░░░░░░░░░░░░░░┌┘░██ 
██░░└┐░░░░░░░░░░░░░░░┌┘░░██ 
██░░┌┘▄▄▄▄▄░░░░░▄▄▄▄▄└┐░░██ 
██▌░│██████▌░░░▐██████│░▐██ 
███░│▐███▀▀░░▄░░▀▀███▌│░███ 
██▀─┘░░░░░░░▐█▌░░░░░░░└─▀██ 
██▄░░░▄▄▄▓░░▀█▀░░▓▄▄▄░░░▄██ 
████▄─┘██▌░░░░░░░▐██└─▄████
█████░░▐█─┬┬┬┬┬┬┬─█▌░░█████
████▌░░░▀┬┼┼┼┼┼┼┼┬▀░░░▐████ 
█████▄░░░└┴┴┴┴┴┴┴┘░░░▄█████
███████▄░░░░░░░░░░░▄███████ 
██████████▄▄▄▄▄▄▄██████████ 
███████████████████████████

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

VK.com is a social network with a mobile web version at m.vk.com and a full desktop version at vk.com. One of its features is sticker hints in input fields: when a user types something such as Привет, the interface automatically suggests stickers that can be sent, provided the corresponding checkbox is enabled in the user's settings.

The report concerns the setting that toggles those hints. The program's own summary states the defect plainly: the hash parameter was missing from the requests used to change the sticker settings.

Setup

No special accounts, roles, tools or versions are described. The researcher worked against the mobile version of the site and compared its behaviour with the full version. The only precondition that matters is that a victim is logged in to VK and has the sticker hints setting in some state that the attacker wants to flip.

Finding it

The mobile endpoint that enables or disables sticker hints is shown without a hash value. In the full version of the site, the equivalent action does carry a hash. That difference is what made the mobile endpoint look wrong: a state-changing request that a browser can be made to issue cross-site, with no per-request token to tie it to the user's session.

The researcher frames the issue as CSRF: the absence of hash allows toggling the hints in the mobile version of VK, and therefore allows disabling a function the user wants without their knowledge.

Exploitation

Step 1: the mobile request that changes the setting

The researcher gives the mobile endpoint in the form used to enable the hints:

HTTP
https://m.vk.com/attachments?_ajax=1&act=stickers_hints_enabled&value=1

The request is an AJAX call (_ajax=1) to the attachments endpoint. The act=stickers_hints_enabled parameter selects the sticker hints setting, and value=1 sets it. There is no hash parameter anywhere in the query string. Because nothing in the request is bound to the user's session beyond the ambient cookies, a page on another origin can cause a logged-in victim's browser to issue it.

The researcher also notes a small mistake in the report itself: the word включить (enable) at the end of the first line, meaning the example shown is the enabling direction, while the value can equally be set to disable.

Step 2: the effect on the victim

The consequence described is that the attacker can switch the hints off for a user who relies on them. The researcher explains the feature: if the user types Привет, stickers are loaded automatically and can be sent, as long as the checkbox is ticked. With the cross-site request, the checkbox state is changed without the user's consent.

Step 3: comparison with the full version

On the full version of the site, at https://vk.com/stickers?tab=winter, the hash is present. The researcher shows the corresponding request:

HTTP
https://vk.com/al_settings.php?act=a_change_stickers_hints&al=1&hash=HASH&hints=0

Here the action is a_change_stickers_hints on al_settings.php, and the request carries hash=HASH alongside hints=0. The hash is present on the desktop path and absent from the mobile request.

Root cause

The mobile endpoint act=stickers_hints_enabled changes a per-user setting but does not require the hash token that the full-version endpoint a_change_stickers_hints requires. Without that token, the server has no way to distinguish a request the user intended from one forged by a third-party page, so the usual CSRF defence is absent. The report does not describe the server-side code, so the exact reason the check was omitted is not stated;

Impact

The attacker can toggle the sticker hints setting of a logged-in user without their knowledge. The realistic outcome is disabling a feature the user wants, which the researcher describes as the main harm. Severity was rated low and a bounty of 100.00 USD was paid. The report does not describe any path from this setting change to account takeover, data exposure or other escalation.

Fix

The program's summary identifies the missing hash as the defect, which points to the fix: require the same per-request token on the mobile stickers_hints_enabled action that the full-version a_change_stickers_hints action already enforces.

Variants to test

  1. Enumerate other act= values on mobile AJAX endpoints such as attachments and check whether any state-changing action lacks hash. A positive result is a request that alters a per-user setting and succeeds with no token.
  2. Compare each mobile action with its desktop counterpart (for example al_settings.php actions) and look for pairs where the desktop request carries hash and the mobile one does not.
  3. Replay a state-changing request with the hash parameter removed entirely and with an empty value, and observe whether the setting still changes.
  4. Test both directions of each toggle (value=1 and value=0) to confirm the change is persistent and visible in the user's settings afterwards.

Hunting notes

This kind of bug tends to sit in secondary interfaces: mobile web versions, AJAX endpoints and older handlers that were built separately from the main site. During recon, the useful signal is a state-changing request whose parameters are all predictable and which carries no per-request token, especially when the same action elsewhere on the site does carry one. The comparison between the two versions shows the hash is present on one path and absent on the other. The researcher named the user-visible setting affected and the request that flips it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

What happened, in plain words

VK.com is a social network. It has two ways to reach it from a browser: a mobile web version at m.vk.com and a full desktop version at vk.com. Both offer a feature called sticker hints in input fields. When you type something like Привет into a message box, the site automatically suggests stickers you can send, but only if a checkbox in your settings is ticked.

This report is about the setting that turns those hints on and off. The program's own summary says the problem in one line: the hash parameter was missing from the requests that change the sticker settings.

To follow the rest, you need three ideas:

  • A setting is a preference stored on the server for your account, such as "show sticker hints". Changing it means sending a request that the server records against your user.
  • A session cookie is a small piece of data your browser stores after you log in and sends automatically with every request to that site. It is how the server knows the request comes from you. Think of it as a wristband you get at an event: you do not show it deliberately, it is simply on your arm, and staff accept it as proof you are allowed in.
  • A CSRF token (here called hash) is a random value that the site puts into a page and expects back in a request that changes something. It proves the request was generated by a page the site itself served to you, not by some other website that made your browser send it. Think of it as a form you fill in at a counter: the clerk also asks for a reference number printed on the form, so a note scribbled elsewhere cannot be passed off as the real thing.

CSRF (Cross-Site Request Forgery) is the attack that becomes possible when that second check is missing. A malicious page cannot read your data from another site, but it can make your browser send requests to that site, and your browser attaches your cookies automatically. If the site only checks the cookie, it cannot tell your deliberate click from the malicious page's hidden request.

Setup

The report does not describe any special accounts, roles, tools or software versions. The researcher worked against the mobile version of the site and compared its behaviour with the full version. The only precondition that matters is that a victim is logged in to VK and has the sticker hints setting in some state that the attacker wants to flip.

Finding it

The mobile endpoint that enables or disables sticker hints is shown without a hash value. An endpoint is simply a URL on the server that does a particular job when it receives a request, like a specific service window in a large building. In the full version of the site, the equivalent action does carry a hash. That difference is what made the mobile endpoint look wrong: a request that changes state, which a browser can be made to issue from another site, with no per-request token to tie it to the user's session.

The researcher frames the issue as CSRF: the absence of hash allows toggling the hints in the mobile version of VK, and therefore allows disabling a function the user wants without their knowledge.

Exploitation

Step 1: the mobile request that changes the setting

The researcher gives the mobile endpoint in the form used to enable the hints:

HTTP
https://m.vk.com/attachments?_ajax=1&act=stickers_hints_enabled&value=1

Line by line, in plain words:

  • https://m.vk.com/attachments is the address on the mobile site that handles this kind of action. The name attachments suggests it deals with things attached to messages, such as stickers.
  • _ajax=1 marks the request as an AJAX call. AJAX is how a web page talks to the server in the background, without reloading the whole page. When you tick a checkbox and the page updates instantly, that is usually AJAX at work.
  • act=stickers_hints_enabled tells the server which action to perform: change the sticker hints setting.
  • value=1 is the new value for that setting. In this convention 1 means on.
  • There is no hash parameter anywhere in the query string. The query string is the part of a URL after the ?, made of name and value pairs joined by &.

Because nothing in the request is bound to the user's session beyond the ambient cookies, a page on another origin can cause a logged-in victim's browser to issue it. An origin is the combination of scheme, host and port, roughly "which site". Browsers stop one origin from reading another origin's responses, but they still send the request, cookies included, if a page simply asks for it, for example through an image tag or a form.

The researcher also notes a small mistake in the report itself: the word включить (enable) at the end of the first line, meaning the example shown is the enabling direction, while the value can equally be set to disable.

Step 2: the effect on the victim

The consequence described is that the attacker can switch the hints off for a user who relies on them. The researcher explains the feature: if the user types Привет, stickers are loaded automatically and can be sent, as long as the checkbox is ticked. With the cross-site request, the checkbox state is changed without the user's consent.

This is why the step matters: the attacker gains nothing material, no password and no data, but the victim's experience of the product changes silently. A setting the user chose is overridden by someone else.

Step 3: comparison with the full version

On the full version of the site, at https://vk.com/stickers?tab=winter, the hash is present. The researcher shows the corresponding request:

HTTP
https://vk.com/al_settings.php?act=a_change_stickers_hints&al=1&hash=HASH&hints=0

Again in plain words:

  • https://vk.com/al_settings.php is the desktop-side script that handles settings changes.
  • act=a_change_stickers_hints is the action name on that script, the desktop counterpart of the mobile action.
  • al=1 is another parameter in the request; the report does not explain what it does.
  • hash=HASH is the CSRF token. HASH here is a placeholder for the real value, which the site generates and puts into the page.
  • hints=0 sets the hints to off, the opposite direction from the mobile example.

Here the action is a_change_stickers_hints on al_settings.php, and the request carries hash=HASH alongside hints=0. The hash is present on the desktop path and absent from the mobile request.

Root cause

The mobile endpoint act=stickers_hints_enabled changes a per-user setting but does not require the hash token that the full-version endpoint a_change_stickers_hints requires. Without that token, the server has no way to distinguish a request the user intended from one forged by a third-party page, so the usual CSRF defence is absent.

Impact

The attacker can toggle the sticker hints setting of a logged-in user without their knowledge. The realistic outcome is disabling a feature the user wants, which the researcher describes as the main harm. Severity was rated low and a bounty of 100.00 USD was paid.

Fix

The program's summary identifies the missing hash as the defect, which points to the fix: require the same per-request token on the mobile stickers_hints_enabled action that the full-version a_change_stickers_hints action already enforces.

Variants to test

These are follow-up checks in the same spirit, useful if you want to look for similar bugs yourself:

  1. Enumerate other act= values on mobile AJAX endpoints such as attachments and check whether any state-changing action lacks hash. A positive result is a request that alters a per-user setting and succeeds with no token.
  2. Compare each mobile action with its desktop counterpart (for example al_settings.php actions) and look for pairs where the desktop request carries hash and the mobile one does not.
  3. Replay a state-changing request with the hash parameter removed entirely and with an empty value, and observe whether the setting still changes.
  4. Test both directions of each toggle (value=1 and value=0) to confirm the change is persistent and visible in the user's settings afterwards.

Hunting notes

This kind of bug tends to sit in secondary interfaces: mobile web versions, AJAX endpoints and older handlers that were built separately from the main site. During recon, the useful signal is a state-changing request whose parameters are all predictable and which carries no per-request token, especially when the same action elsewhere on the site does carry one. The comparison between the two versions shows the hash is present on one path and absent on the other. The researcher named the user-visible setting affected and the request that flips it.

Glossary

  • AJAX: a way for a web page to exchange data with the server in the background, without reloading the page.
  • Cookie: a small value the browser stores for a site and sends back automatically with each request; used, among other things, to keep you logged in.
  • CSRF (Cross-Site Request Forgery): an attack where a page on one site makes your browser send a request to another site where you are logged in, relying on your cookies being attached automatically.
  • CSRF token: a random value embedded in a page and required in state-changing requests, so the server can tell the request came from its own page.
  • Endpoint: a specific URL on a server that performs a particular action when it receives a request.
  • Hash (in this report): the name VK uses for its CSRF token parameter.
  • Origin: the combination of scheme, host and port that identifies a site for browser security purposes.
  • Parameter: a name and value pair in a URL or request body, such as value=1.
  • Query string: the part of a URL after the ?, containing parameters separated by &.
  • Session: the server-side record of a logged-in user, referenced by a cookie so the server knows who is making each request.
  • State-changing request: a request that alters something stored on the server, such as a setting, rather than just reading data.

More by pisarenko

View all

29 more disclosed reports, best first.

More from VK.com

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.