Skip to content
CSRF Disclosed report Intermediate

Общий CSRF токен для сообщений сообществ, или как подставить соседа-редактора

The CSRF token for group instant-messaging actions was derived from the group identifier, so every user with access to that group's IM shared the same token. An attacker holding that token could lure another editor into a cross-site request and send a message as that victim to a chosen peer.

povargek Follow

Originally disclosed on HackerOne

Bounty$300 Medium View original
  • Triaged in 4 hours
  • Fixed in 29 days
  • Paid in 45 days
  • Disclosed after 5 months
## Summary by the program

Ошибка в генерации CSRF-токена.

## Summary by the researcher

В разделе Group IM (сообщения сообществ, /al_im.php?gid=XXX) для почти все�
 действий (отправка сообщения, удаление диалога, etc) `hash` привязывался к `group_id`, и был одним и тем же для все�
 пользователей, которые имели доступ к личке этой группы. Таким образом, имея `hash` например к отправке сообщений, мы могли "заманить" другого редактора и выше (он имеет доступ к IM группы) на CSRF, и указаное нами сообщение отправится указанному peer_id от имени этого пользователя. Это timehash, и он живет около 7 часов, и после потери доступа к IM группы, использовать уязвимость уже было нельзя, но позже был найден способ получить статичный `hash`, что давало возможность использовать CSRF против этой группы, это можно использовать например как месть за снятие админки в группе. И еще `writeHash` сделали тайм�
ешем.

The original report as published on HackerOne, by povargek. 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

Impact

An attacker with access to a group's IM could trick another editor into sending a message under that victim's name; the token was a timehash valid for about seven hours and stopped working once the attacker lost IM access, though a later method reportedly produced a static token.

What the attacker needed

Access to the group's IM; victim has IM access to the group; victim clicks an attacker link

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.

A CSRF token is a secret value a site puts in forms so it can tell a real action by the logged-in user from a forged one triggered by another website. Here the token was the same for everyone in a group instead of being unique per person, so one member could reuse it to make another member's browser send a message without that person meaning to.

What is CSRF?

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

More by povargek

View all

13 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.