CSRF Добавить просмотр к записи без ведома пользователя.
- Triaged in 12 hours
- Fixed in 2 months
- Paid in 2 months
- Disclosed after 3 months
Summary by the program
Отсутствие параметра hash при учете просмотра записей.
Summary by the researcher
Отсутствовал параметр hash при учете просмотра записей.
Можно было вести массовую накрутку просмотров на посты. При этом просмотры крутились даже в частную группу, несмотря на то, что у нас к ней не было доступа.
POC выглядел так:
https://vk.com/al_page.php?act=seen&al=1&data=238237355_r268%3A767%3A16%3A1241520615%3B275012519_r1964%3A196%3A21%3A1241520615%2Cr1965%3A1144%3A19%3A1241520615%3B277885767_r564%3A-1%3A22%3A1241520615%3B283004407_r4390%3A516%3A18%3A1241520615%3B305469601_r668%3A744%3A20%3A1241520615%3B322118449_r2163%3A800%3A17%3A1241520615%3B370186213_r382%3A-1%3A23%3A1241520615%3B-56325271_r-189765%3A800%3A17%3A1241520615%3B-113966722_r-15672%3A1144%3A19%3A1241520615%2Cr-15685%3A196%3A21%3A1241520615%3B-150313924_r-1981%3A744%3A20%3A1241520615%3B-150706218_r-21%3A-1%3A23%3A1241520615
What the report shows
The target is VK.com, and the feature involved is the view counter on posts (записи). The researcher, circuit, found that the request used to register a view did not require the hash parameter. The program's own summary states the same thing: the hash parameter was missing from view accounting.
According to the researcher, this allowed mass inflation of view counts on posts. Views could be incremented even on a private group, despite the attacker having no access to that group.
The proof of concept was a single request to the al_page.php endpoint with act=seen:
https://vk.com/al_page.php?act=seen&al=1&data=238237355_r268%3A767%3A16%3A1241520615%3B275012519_r1964%3A196%3A21%3A1241520615%2Cr1965%3A1144%3A19%3A1241520615%3B277885767_r564%3A-1%3A22%3A1241520615%3B283004407_r4390%3A516%3A18%3A1241520615%3B305469601_r668%3A744%3A20%3A1241520615%3B322118449_r2163%3A800%3A17%3A1241520615%3B370186213_r382%3A-1%3A23%3A1241520615%3B-56325271_r-189765%3A800%3A17%3A1241520615%3B-113966722_r-15672%3A1144%3A19%3A1241520615%2Cr-15685%3A196%3A21%3A1241520615%3B-150313924_r-1981%3A744%3A20%3A1241520615%3B-150706218_r-21%3A-1%3A23%3A1241520615
The data parameter carries a list of entries separated by encoded semicolons and commas. , and the negative identifiers in the list correspond to the private group the researcher mentions. The report does not decode the fields or explain what each number means.
The report was disclosed on 25 October 2017 and paid a bounty of 100.00 USD. No severity rating, CVSS score or weakness classification is given. The report does not describe the fix that was applied.
Root cause
The report states that the hash parameter was missing from view accounting; it does not explain the underlying implementation. Without that check, the researcher could inflate view counts in bulk, including on posts in a private group he had no access to.
The report's title frames the issue as CSRF: adding a view to a post without the user's knowledge. The missing hash is the mechanism named in both summaries.
Impact
The direct impact is integrity of the view counter: an attacker can inflate view counts on arbitrary posts at will. The researcher also notes that views could be registered on posts in a private group the attacker had no access to, which the researcher presents as views being counted on a private group despite having no access to it.. The report does not claim any further consequence, such as data disclosure or account takeover.
How this kind of bug works
State-changing endpoints that are called from the browser need a way to distinguish a request that originated from the application's own pages from one crafted elsewhere. Session cookies alone are sent automatically by the browser on cross-site requests, so an endpoint that relies only on the cookie is forgeable. The usual defence is a token that the attacker cannot know or reproduce: a synchroniser token stored in the page, a double-submit cookie, or a per-action hash derived from the session and the action parameters, as VK uses.
When such a token is optional, or when the server accepts requests that omit it, the check is effectively absent.
How to test for it
- Identify state-changing endpoints: anything that increments a counter, marks something as read, follows, likes, votes or changes a setting. Look at the requests the application makes while you use the feature normally.
- Note every parameter that looks like a token:
hash,csrf,_token,authenticity_token, nonce headers. Then remove it, blank it, or replace it with a random value of the same shape, and resend the request. - Compare the response with the baseline. A positive result is a response that indicates success (the same status, the same body, the counter actually changing) when the token was absent or wrong.
- Test cross-origin behaviour: build a page on a different origin that submits the same request automatically, and confirm the action takes effect while you are logged in to the target.
- Test object scope: change the object identifier to one belonging to another user or to a resource you cannot access, and see whether the action is still applied.
Common false positives: the endpoint returns a generic success page but the action is not actually performed; the token is validated but the error is rendered inside a 200 response; the request is rejected by an unrelated check such as a referer or origin header, which you should test separately; or the action is idempotent and harmless, so the missing token has no security consequence. Always confirm the side effect by re-reading the affected object.
How it is fixed
Require the token on every state-changing request and reject requests where it is missing or does not match the session and action. Do not treat the token as optional for internal or AJAX endpoints. Enforce the same authorisation checks on the endpoint that apply when the object is viewed normally, so that identifiers outside the caller's permissions are refused. Where the action is not security-relevant, consider whether it needs to be a server-side state change at all.
Hunting notes
These gaps tend to hide in internal or AJAX endpoints used by the front end, especially counters and "seen" style actions that developers consider low value.
What happened, in plain words
VK.com is a social network. One of its features is a view counter on posts (записи): every time someone opens a post, the number of views goes up by one. The researcher, circuit, looked at the request the browser sends when a post is opened, and found that it did not require a hash parameter. The program's own summary says the same: the hash parameter was missing from view accounting.
Because the check was missing, the researcher could inflate view counts in bulk. This is mass inflation of views (накрутка просмотров). The researcher also reports that views could be registered on posts in a private group, even though the attacker had no access to that group. The researcher presents this as views being counted on a private group despite having no access to it.
The proof of concept was a single request to the al_page.php endpoint with act=seen:
https://vk.com/al_page.php?act=seen&al=1&data=238237355_r268%3A767%3A16%3A1241520615%3B275012519_r1964%3A196%3A21%3A1241520615%2Cr1965%3A1144%3A19%3A1241520615%3B277885767_r564%3A-1%3A22%3A1241520615%3B283004407_r4390%3A516%3A18%3A1241520615%3B305469601_r668%3A744%3A20%3A1241520615%3B322118449_r2163%3A800%3A17%3A1241520615%3B370186213_r382%3A-1%3A23%3A1241520615%3B-56325271_r-189765%3A800%3A17%3A1241520615%3B-113966722_r-15672%3A1144%3A19%3A1241520615%2Cr-15685%3A196%3A21%3A1241520615%3B-150313924_r-1981%3A744%3A20%3A1241520615%3B-150706218_r-21%3A-1%3A23%3A1241520615
Reading it piece by piece:
https://vk.com/al_page.phpis the address of the endpoint, a server-side script that handles page-related actions.act=seentells it which action to perform: mark something as seen.data=carries the list of posts. The entries are separated by%3B(an encoded semicolon) and%2C(an encoded comma), because those characters have to be encoded inside a URL.
Each entry looks like an identifier followed by numbers joined by %3A (an encoded colon), for example 238237355_r268%3A767%3A16%3A1241520615. The report does not decode these fields or say what each number means.
Why does each step matter? Sending the request by hand, outside the normal page, is exactly what an attacker would do. If the server accepts it, the attacker controls which posts get counted and how often. The private-group entries matter because they show views were counted on posts the researcher could not access.
The report was disclosed on 25 October 2017 and paid a bounty of 100.00 USD. No severity rating, CVSS score or weakness classification is given, and the report does not describe the fix that was applied.
In general, how this kind of bug works
A request is the message your browser sends to a server when you click something or a page loads. A cookie is a small piece of data the site stores in your browser and that your browser attaches to every request to that site automatically; it is how the site recognises you as logged in. A token is a value the site puts into its own pages and expects back in the request, so the server can tell a request that came from its pages from one crafted elsewhere.
This class of bug is called CSRF, cross-site request forgery. The idea is that another website can make your browser send a request to the target site, and your cookie goes along with it automatically. If the endpoint relies on the cookie alone, the request looks legitimate. The defence is a token the attacker cannot know or reproduce: a value stored in the page, a double-submit cookie, .
When the token is optional, or the server accepts requests that omit it, the check is effectively absent.
How to test for it
- Find endpoints that change something: counters, "mark as read", follows, likes, votes, settings. Watch the requests the application makes while you use the feature normally.
- Note every parameter that looks like a token:
hash,csrf,_token,authenticity_token, nonce headers. Remove it, blank it, or replace it with a random value of the same shape, and resend the request. - Compare the response with the normal one. A positive result is a response that indicates success (same status, same body, the counter actually changing) when the token was absent or wrong.
- Test cross-origin behaviour: build a page on a different origin that submits the same request automatically, and confirm the action takes effect while you are logged in to the target.
- Test object scope: change the object identifier to one belonging to another user or to a resource you cannot access, and see whether the action is still applied.
Common false positives: the endpoint returns a generic success page but the action is not actually performed; the token is validated but the error is rendered inside a 200 response; the request is rejected by an unrelated check such as a referer or origin header, which you should test separately; or the action is idempotent and harmless, so the missing token has no security consequence. Always confirm the side effect by re-reading the affected object.
How it is fixed
Require the token on every state-changing request and reject requests where it is missing or does not match the session and action. Do not treat the token as optional for internal or AJAX endpoints. Enforce the same permission checks on the endpoint that apply when the object is viewed normally, so that identifiers outside the caller's permissions are refused. Where the action is not security-relevant, consider whether it needs to be a server-side state change at all.
Hunting notes
These gaps tend to hide in internal or AJAX endpoints used by the front end, especially counters and "seen" style actions that developers consider low value.
Glossary
- Endpoint: the address on a server that handles a particular action, such as
al_page.php. - Request: the message a browser sends to a server asking it to do something or return something.
- Parameter: a named value in a request, such as
act=seenordata=.... - Cookie: a small value stored by the site in your browser and sent automatically with requests to that site, used to recognise you.
- Token: a value the site expects back in a request to prove the request came from its own pages.
hash: the parameter the report says was missing from view accounting.- CSRF (cross-site request forgery): making a logged-in user's browser send a request to a site without the user's knowledge.
- View counter: the number shown on a post recording how many times it has been viewed.
- Mass inflation (накрутка): artificially increasing a counter by sending many requests.
- Private group: a group whose content is only visible to members; the report shows views could be registered on its posts without access.
- Proof of concept (POC): a concrete request or example that demonstrates the bug.
- URL encoding: writing characters such as
;,,and:as%3B,%2Cand%3Aso they can travel inside a URL. - Replay: sending a captured request again, unchanged, to repeat its effect.
- Idempotent: an action whose repeated execution gives the same result as doing it once.
- False positive: a result that looks like a bug but is not one.
- CVSS: a standard scoring system for the severity of a vulnerability; none is given here.
- Bounty: a payment made by a program to a researcher for a valid report; here 100.00 USD.