CSRF Vulnerability allows attackers to steal SocialClub private token.
A CSRF vulnerability on the SocialClub profile edit page allowed an attacker to make a victim's browser request their private tokens, and a Flash-based XSS let the attacker read the response. This could let an attacker steal a user's SocialClub private token.
- Triaged in 22 hours
- Fixed in 10 days
- Paid in 10 days
- Disclosed after 10 days
Summary by the program
The researcher was able to combine a Flash exploit with a CSRF vulnerability in order to obtain sensitive user tokens from https://socialclub.rockstargames.com/profileedit/GetTokens. This page is ordinarily only called in a secure fashion such that an attacker is unable to see another user's tokens, but in conjunction with a secondary Flash-based XSS vulnerability, the researcher was able to bypass this protection. With the researcher's help we were able to resolve this vulnerability.
What the report shows
The target is the Rockstar Games Social Club site at socialclub.rockstargames.com, and specifically the token endpoint at https://socialclub.rockstargames.com/profileedit/GetTokens. That page returns sensitive user tokens. Under normal conditions it is only called in a secure fashion, so an attacker cannot read another user's tokens.
The researcher combined two weaknesses to break that protection. The first was a cross-site request forgery (CSRF) vulnerability. The second was a Flash-based cross-site scripting (XSS) vulnerability. The Flash XSS was the secondary bug that let the researcher bypass the protection around the token endpoint. Together they allowed the researcher to obtain sensitive user tokens from the endpoint.
The report does not include the request that triggers the endpoint, the Flash payload, the parameters involved, or the exact sequence of HTTP messages. It also does not give a bounty amount or a CVSS score. The program's summary states that the issue was resolved with the researcher's help, and the report is attributed to the researcher netfuzzer and rated high severity.
Root cause
The report points to two mistakes working together. The first is that the token endpoint could be reached through a forged cross-site request, which is the CSRF weakness. The second is a Flash-based XSS that, combined with the CSRF, let the researcher bypass the protection around the token endpoint. The protection that normally keeps the token response out of an attacker's reach was bypassed. The report does not describe the exact validation logic or the Flash content involved.
Impact
An attacker who can chain these two issues can obtain sensitive user tokens from the GetTokens endpoint. The report does not state which downstream actions the stolen tokens enable. The program rated the issue high severity.
How this kind of bug works
CSRF exploits the fact that browsers attach a user's credentials, such as cookies, to requests automatically, regardless of which site caused the request. If an endpoint performs a sensitive action or returns sensitive data based only on those ambient credentials, a page on another origin can cause the request to happen. The attacker cannot read the response cross-origin, which is why classic CSRF is used for state-changing actions rather than data theft.
Reading the response requires a second flaw. A cross-site scripting bug on the target origin, or a plugin-based execution context such as Flash, can run code in the target's origin and therefore read the response. When the two are combined, a forged request plus same-origin read access turns a CSRF into data disclosure.
Defences against CSRF include synchroniser tokens tied to the session, checking the Origin and Referer headers, requiring custom headers that simple cross-site forms cannot set, and using SameSite cookie attributes. Defences against the read step include a strict Content Security Policy, removing legacy plugin content such as Flash, output encoding, and avoiding endpoints that return secrets to any request carrying a session. Endpoints that return tokens should also require a fresh, explicit user action and should not be reachable by a plain cross-site request.
How to test for it
- Identify endpoints that return sensitive data or perform sensitive actions, especially ones tied to a session cookie. Look at profile, settings and token endpoints.
- Capture a legitimate request in a proxy and note every parameter, header and cookie. Determine which parts are validated server-side.
- Replay the request from a different origin, for example by hosting a simple page that submits a form to the endpoint, and observe whether the action succeeds or the response is returned.
- Remove or alter the CSRF token, the
Originheader and theRefererheader one at a time to see which check is actually enforced. - Test whether the response can be read cross-origin. If not, look for a same-origin execution primitive, such as reflected or stored XSS, or legacy plugin content, that would let you read it.
- A positive result is a state change or a sensitive response produced by a request you did not intend to authorise, or a chain that lets you read that response from an attacker-controlled page.
Common false positives include endpoints that require a custom header the attacker cannot set, endpoints protected by SameSite cookies that block the cross-site request, and responses that are returned but contain no sensitive data. Also check whether the action requires re-authentication, which defeats the attack.
How it is fixed
Use per-session, unpredictable anti-CSRF tokens on all sensitive endpoints and validate them server-side. Enforce Origin and Referer checks where appropriate. Set cookies with SameSite=Lax or SameSite=Strict where the application allows it. Require a custom header for state-changing requests. For the read step, remove legacy plugin content, apply a strict Content Security Policy, and encode output. Endpoints returning secrets should require an explicit user confirmation and should not be reachable by a cross-site request.
Hunting notes
This class of bug tends to hide in older features, plugin-based content, and endpoints that return tokens or secrets. Recon signals include legacy Flash or Silverlight content, endpoints under paths such as profile or settings that return tokens, and any place where a CSRF token is present but not actually validated. To get a report accepted, demonstrate the full chain: show the forged request succeeding and show that the sensitive response can be read. Include the exact requests and the resulting data, and keep the proof minimal and reproducible.
What happened, in plain words
Rockstar Games runs a website called Social Club at socialclub.rockstargames.com. It is the Rockstar Games Social Club site. To keep you logged in, the site gives your browser a small piece of data called a cookie, which the browser sends back with every request you make to that site. That is how the site knows who you are without asking for your password on every page.
Some pages on the site return something more sensitive than a profile page: a token. A token is a short string of characters that acts like a temporary key. The report does not state what the tokens allow. The report focuses on one such page, https://socialclub.rockstargames.com/profileedit/GetTokens, which hands out these tokens.
Normally that page is only called in a secure fashion, so an attacker cannot see another user's tokens. The researcher, netfuzzer, found a way around that protection by combining two separate weaknesses. The first is cross-site request forgery, or CSRF. The second is a cross-site scripting (XSS) flaw that relied on Flash, a browser plugin that was once common for games and video but has since been retired.
A request is simply your browser asking a server for something: a page, an image, a piece of data. CSRF abuses the fact that your browser attaches your cookies to requests automatically, no matter which website caused the request. Imagine a bank that accepts a withdrawal slip from anyone who walks in wearing your coat. The coat is the cookie: the bank checks the coat, not the person. If a malicious page can make your browser send a request to the Social Club site, your cookie goes along with it, and the site may treat the request as genuinely yours.
That is only half the problem. When a page on one site makes a request to another site, the browser normally refuses to let the first page read the answer. So a classic CSRF attack can trigger an action, but it cannot steal data. To read the token response, the attacker needs code running inside the Social Club site itself. The Flash-based XSS was the secondary bug that, combined with the CSRF, let the researcher bypass the protection around the token endpoint.
Together, the two weaknesses allowed the researcher to obtain sensitive user tokens from the endpoint. The program's summary says the issue was resolved with the researcher's help. The report is rated high severity and is attributed to netfuzzer. It does not include the request that triggers the endpoint, the Flash payload, the parameters involved, the exact sequence of HTTP messages, a bounty amount or a CVSS score.
In general, how this kind of bug works
CSRF works because of how browsers handle cookies. A cookie belongs to a site, and the browser sends it with every request to that site, whether you typed the address yourself or a page you are visiting quietly loaded an image or submitted a hidden form. The server sees a valid cookie and assumes the request is legitimate.
The attacker's page cannot read the response to that request, because browsers enforce an origin boundary: a page from one site cannot read data returned by another site. That is why classic CSRF is usually used to change something, such as an email address or a password, rather than to steal data.
To steal data, the attacker needs a second flaw that runs code on the target site itself. Cross-site scripting is one such flaw: it lets an attacker's script run as if it came from the target site, so the browser lets it read the response. Flash was a plugin that could also provide an execution context inside the target's origin. When a forged request and a same-origin read are combined, a CSRF becomes a data disclosure.
Defences against CSRF include synchroniser tokens tied to the session (a random value the server checks on each sensitive request), checking the Origin and Referer headers, requiring custom headers that a simple cross-site form cannot set, and using SameSite cookie attributes so the browser does not send cookies on cross-site requests. Defences against the read step include a strict Content Security Policy, removing legacy plugin content such as Flash, output encoding, and avoiding endpoints that return secrets to any request carrying a session. Endpoints that return tokens should also require a fresh, explicit user action and should not be reachable by a plain cross-site request.
How to test for it
- Identify endpoints that return sensitive data or perform sensitive actions, especially ones tied to a session cookie. Look at profile, settings and token endpoints.
- Capture a legitimate request in a proxy and note every parameter, header and cookie. Determine which parts are validated server-side.
- Replay the request from a different origin, for example by hosting a simple page that submits a form to the endpoint, and observe whether the action succeeds or the response is returned.
- Remove or alter the CSRF token, the
Originheader and theRefererheader one at a time to see which check is actually enforced. - Test whether the response can be read cross-origin. If not, look for a same-origin execution primitive, such as reflected or stored XSS, or legacy plugin content, that would let you read it.
- A positive result is a state change or a sensitive response produced by a request you did not intend to authorise, or a chain that lets you read that response from an attacker-controlled page.
Common false positives include endpoints that require a custom header the attacker cannot set, endpoints protected by SameSite cookies that block the cross-site request, and responses that are returned but contain no sensitive data. Also check whether the action requires re-authentication, which defeats the attack.
How it is fixed
Use per-session, unpredictable anti-CSRF tokens on all sensitive endpoints and validate them server-side. Enforce Origin and Referer checks where appropriate. Set cookies with SameSite=Lax or SameSite=Strict where the application allows it. Require a custom header for state-changing requests. For the read step, remove legacy plugin content, apply a strict Content Security Policy, and encode output. Endpoints returning secrets should require an explicit user confirmation and should not be reachable by a cross-site request.
Hunting notes
This class of bug tends to hide in older features, plugin-based content, and endpoints that return tokens or secrets. Recon signals include legacy Flash or Silverlight content, endpoints under paths such as profile or settings that return tokens, and any place where a CSRF token is present but not actually validated. To get a report accepted, demonstrate the full chain: show the forged request succeeding and show that the sensitive response can be read. Include the exact requests and the resulting data, and keep the proof minimal and reproducible.
Glossary
- Cookie: a small piece of data a site stores in your browser and receives back with each request, used to recognise you.
- Token: a short string that acts like a temporary key, letting whoever holds it act as the user it belongs to.
- Request: a message your browser sends to a server asking for a page, an image or data.
- Response: the answer a server sends back to a request.
- Endpoint: a specific address on a site that performs a particular function, such as returning tokens.
- CSRF (cross-site request forgery): tricking a logged-in user's browser into sending a request to a site the user did not intend to act on.
- XSS (cross-site scripting): a flaw that lets an attacker's code run inside another site, as if it came from that site.
- Flash: a browser plugin once used for games and video, now retired, which could run code inside a page.
- Origin: the combination of scheme, host and port that identifies a site; browsers use it to decide what one page may read from another.
- Session: the period during which a site remembers you as logged in, usually via a cookie.
- Synchroniser token: a random value tied to a session that the server checks on sensitive requests to prove they were intended.
Origin/Refererheaders: request headers that tell the server which site the request came from.SameSitecookie attribute: a setting that stops the browser sending a cookie on cross-site requests.- Content Security Policy: a set of rules a site sends to the browser limiting what scripts and content may run.
- Output encoding: converting characters so that data is displayed as text rather than executed as code.
- Proxy: a tool that sits between your browser and a server so you can inspect and modify requests.
- CVSS: a standard scoring system for rating the severity of a vulnerability.
- Severity: a rating of how serious a vulnerability is, here high.