Skip to content
CSRF Disclosed report Beginner

Full account takeover due to failure to validate CSRF token on accounts.yoyogames.com | urgent

CSRF tokens on accounts.yoyogames.com were not validated for the /profile/details endpoint, allowing an attacker to forge state-changing requests cross-domain. The SameSite cookie attribute was not set, so the attack could only work if the victim was recently logged in or used a browser not enforcing SameSite defaults.

mohammadowais Follow

Originally disclosed on Bugcrowd

Bounty$400 Medium View original
  • Accepted in 34 hours
  • Fixed in 28 days
  • Disclosed after 3 months

Summary by mohammadowais

CSRF tokens on accounts.yoyogames.com weren't validated for /profile/details endpoint (or site-wide perhaps) which caused possible attack scenario of forging valid state-changing HTTP requests cross domain. (not indicating ATO though as email verification was in place). The SameSite cookie attribute wasn't set (meaning it would default to LAX) so the attack could have only worked if victim was recently logged into his/her account or if victim used a browser that doesn't yet follow Chrome's legacy on same-site cookie attribute (like FF on mac).

I thank the harris_bugcrowd, Joshua and the entire team for handling this report responsively.

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target was accounts.yoyogames.com, the account management site for the GameMaker product family, filed under the Opera Public Bug Bounty programme on Bugcrowd against the asset www.gamemaker.io. The researcher, mohammadowais, reported that CSRF tokens on the account site were not validated for the /profile/details endpoint, and suggested the problem might extend site-wide.

The researcher states it plainly: CSRF tokens on the account site were not validated for the endpoint, so a cross-domain request that changes state could be forged. so a cross-domain request that changes state could be forged. The report does not include the raw request, the parameter names, the token name, or the server response that demonstrated the missing check. What it does describe is the attack scenario and the conditions under which it would work.

Two conditions limited the attack. First, the SameSite cookie attribute was not set on the session cookie, which means browsers default to Lax. Under Lax, a cross-site request that is not a top-level navigation does not carry the cookie, so the forged request only succeeds if the victim was recently logged in, or if the victim used a browser that did not yet follow Chrome's legacy behaviour for the same-site cookie attribute, the report naming Firefox on macOS as an example. Second, the researcher explicitly notes that this did not amount to account takeover because email verification was in place, despite the report title calling it a full account takeover.

The platform records the severity as medium and the bounty as 400.00 USD, disclosed on 2021-08-20. The report text itself does not describe a fix.

Root cause

The report says CSRF tokens were not validated for /profile/details, which suggests the server-side handler did not check the token, but it does not describe the implementation. A token that is never verified provides no protection, but the report does not describe how the token was handled.

The missing SameSite attribute is a second, independent weakness. Without an explicit value, the cookie falls back to the browser default, which the report describes as Lax. That default reduced the practical window for the attack rather than eliminating the underlying flaw.

Impact

An attacker who could get a logged-in victim to load a crafted page could submit state-changing requests to /profile/details as that victim. The report frames this as forging valid state-changing HTTP requests cross domain. Because email verification was in place, the researcher did not claim account takeover, and the title's claim of full account takeover is not supported by the body of the report. The impact is that state-changing requests to /profile/details could be forged, subject to the cookie conditions above.

How this kind of bug works

CSRF abuses the fact that browsers attach a site's cookies to requests automatically, regardless of which page caused the request. If a state-changing endpoint authenticates solely on a session cookie and has no other way to tell a request generated by the site's own pages from one generated elsewhere, any third-party page can trigger the action while the victim is logged in.

The standard defence is a synchroniser token: the server generates an unpredictable value, binds it to the session, embeds it in forms or headers, and rejects any state-changing request whose token does not match. The check must happen on the server for every state-changing route; generating the token without validating it is a common and silent failure. SameSite cookies are a useful second layer: Lax blocks cookies on cross-site subrequests and non-safe methods, while Strict blocks them on cross-site navigations too. Neither replaces a token check, because SameSite behaviour varies across browsers and older clients. Checking the Origin or Referer header against an allowlist is a further layer, and requiring re-authentication for sensitive changes limits the damage when a check is missed.

How to test for it

  1. Map the state-changing endpoints: profile updates, email and password changes, address books, API key creation, anything that writes.
  2. Capture a legitimate request in a proxy and note every parameter, including any token field or custom header.
  3. Replay the request with the token removed, with the token changed to a random value of the same length, and with a token belonging to a different session. A response that still applies the change indicates the token is not validated.
  4. Test whether the endpoint accepts the request when the Origin and Referer headers are absent or point to another host.
  5. Check the session cookie's SameSite attribute in the Set-Cookie response header, and note whether it is explicit or left to the browser default.
  6. Build a cross-site proof: a page on a different origin that submits the request automatically, loaded in a browser where the victim is logged in, and confirm the change lands.

A positive result is a state change that persists after a request with a missing, wrong or foreign token. Common false positives: the endpoint is protected by an Origin check that the replay did not exercise, the change was rejected but the UI showed a success message, the token was validated but the test used a token from the same session, or the request was a safe method such as GET that the application treats as read-only. Confirm the change server-side, for example by reloading the profile in a fresh session.

How it is fixed

Validate the CSRF token server-side on every state-changing request, comparing it to the value stored for the authenticated session and rejecting mismatches with an error. Set the session cookie with an explicit SameSite value, Lax or Strict as appropriate, plus Secure and HttpOnly. Add an Origin or Referer allowlist check as defence in depth. Ensure tokens are unpredictable, per-session, and rotated where the framework supports it.

Hunting notes

CSRF gaps cluster in older or hand-rolled account systems, endpoints added after the framework's default protection was configured, JSON APIs that assume a custom header is always present, and multi-step flows where one step forgets the check. Recon signals include account subdomains separate from the main application, forms with hidden token fields, and cookies set without SameSite. To make a report land, show the full request and response for the accepted forged request, demonstrate the state change persisting, and state the cookie conditions honestly: a finding that only works under a narrow browser or recency condition is still valid, but overstating it as account takeover invites dispute. Where email verification or a second factor blocks the escalation, say so, as this report does.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 8 min read.

What happened, in plain words

This report is about accounts.yoyogames.com, the website where people manage their account for the GameMaker product family. It was filed on Bugcrowd under the Opera Public Bug Bounty programme, against the asset www.gamemaker.io. The researcher, mohammadowais, found that the account site had a protection against a common web attack, but that the protection was not actually being checked on one page: the /profile/details endpoint. An endpoint is simply a specific address on a website that does something when a request is sent to it, like a particular counter in a shop. The researcher also suggested the same gap might exist across the whole site.

To understand the bug, you need three ideas.

A request is what your browser sends to a website when you click something or submit a form: a message asking the server to do something, such as save a new display name. A cookie is a small piece of data the website stores in your browser after you log in, so that the next request can be recognised as coming from you. Think of it as a wristband you get at an event: you show it at the door and you are let in without showing your ID again. A CSRF token (Cross-Site Request Forgery token) is a secret, random value that the website puts inside its forms. When you submit the form, the value travels back with it, and the server checks that it matches the value it gave you. It is like a cloakroom ticket: the staff only hand back your coat if the number on your ticket matches the number on the coat.

The problem here is that the check was missing. The report says CSRF tokens on the account site were not validated for the /profile/details endpoint. In other words, the token was not checked by the server. A token that is generated but never checked protects nothing.

Why does that matter? Because of how browsers handle cookies. When a page on one site causes your browser to send a request to another site, the browser attaches that other site's cookies automatically. So if you are logged in to the account site and you visit a malicious page, that page can quietly make your browser send a request to /profile/details on your behalf. Normally the missing or wrong token would stop this. Here, it would not, so the request could change your profile details without your knowledge. The report describes this as forging valid state-changing HTTP requests cross domain: a request that changes something, sent from a different website than the one it targets.

Two conditions made the attack harder than it first sounds.

  1. The session cookie did not have the SameSite attribute set. SameSite tells the browser when it may attach a cookie to a request coming from another site. When it is not set, browsers fall back to a default value, which the report describes as Lax. Under Lax, a request triggered from another site does not carry the cookie unless it is a top-level navigation, meaning you actually clicked a link and moved to a new page. A background request from a malicious page is not a top-level navigation, so it would arrive without your cookie and the server would not know who you are.
  2. Because of that, the attack could only have worked if the victim was recently logged in to the account, or if the victim used a browser that did not yet follow Chrome's legacy behaviour for the same-site cookie attribute. The report names Firefox on macOS as an example of such a browser.

The report title calls this a full account takeover, but the body does not support that. The researcher states plainly that it was not an account takeover because email verification was in place. In practice, the impact is that state-changing requests to /profile/details could be forged, and only under the cookie conditions above.

The report does not include the raw request, the parameter names, the token name, or the server response that showed the missing check. It also does not describe a fix. The platform records the severity as medium and the bounty as 400.00 USD, disclosed on 2021-08-20.

In general, how this kind of bug works

This class of bug is called Cross-Site Request Forgery, usually shortened to CSRF. The everyday comparison: imagine a bank where the teller recognises you only by the coat you are wearing, not by your face. Anyone who can get you to walk into the bank wearing that coat can make withdrawals in your name. The browser is the coat: it sends your cookies to the site automatically, no matter which page asked it to.

The standard defence is the synchroniser token described above. The server generates an unpredictable value, ties it to your session, puts it in the form, and rejects any request that changes something if the token does not match. The check has to happen on the server, for every route that changes data. Generating the token without validating it is a common and silent failure, exactly what this report describes.

SameSite cookies are a useful second layer. Lax blocks cookies on cross-site background requests and on methods that change data, while Strict blocks them on cross-site navigations too. Neither replaces a token check, because SameSite behaviour varies between browsers and older clients. Checking the Origin or Referer header (information the browser sends about where a request came from) against a list of allowed sites is a further layer, and asking for the password again before sensitive changes limits the damage when a check is missed.

In general, how to test for it

  1. List the endpoints that change something: profile updates, email and password changes, address books, API key creation, anything that writes.
  2. Capture a legitimate request in a proxy (a tool that sits between your browser and the site and lets you read and edit traffic) and note every parameter, including any token field or custom header.
  3. Replay the request with the token removed, with the token changed to a random value of the same length, and with a token belonging to a different session. If the change still happens, the token is not being validated.
  4. Test whether the endpoint accepts the request when the Origin and Referer headers are absent or point to another host.
  5. Check the session cookie's SameSite attribute in the Set-Cookie response header, and note whether it is explicit or left to the browser default.
  6. Build a cross-site proof: a page on a different origin that submits the request automatically, loaded in a browser where the victim is logged in, and confirm the change lands.

A positive result is a change that persists after a request with a missing, wrong or foreign token. Common false positives: the endpoint is protected by an Origin check that the replay did not exercise, the change was rejected but the page showed a success message, the token was validated but the test used a token from the same session, or the request was a safe method such as GET that the application treats as read-only. Confirm the change on the server side, for example by reloading the profile in a fresh session.

In general, how it is fixed

Validate the CSRF token on the server for every state-changing request, comparing it to the value stored for the logged-in session and rejecting mismatches with an error. Set the session cookie with an explicit SameSite value, Lax or Strict as appropriate, plus Secure and HttpOnly. Add an Origin or Referer allowlist check as defence in depth. Make sure tokens are unpredictable, per-session, and rotated where the framework supports it.

In general, where these bugs are found

CSRF gaps cluster in older or hand-rolled account systems, endpoints added after the framework's default protection was configured, JSON APIs that assume a custom header is always present, and multi-step flows where one step forgets the check. Signals worth watching during recon include account subdomains separate from the main application, forms with hidden token fields, and cookies set without SameSite. To make a report land, show the full request and response for the accepted forged request, demonstrate that the change persists, and state the cookie conditions honestly: a finding that only works under a narrow browser or recency condition is still valid, but overstating it as account takeover invites dispute. Where email verification or a second factor blocks the escalation, say so, as this report does.

Glossary

  • Endpoint: a specific address on a website that performs an action when a request is sent to it.
  • Request: the message a browser sends to a server asking it to do something.
  • Cookie: a small piece of data stored in the browser by a site, used to recognise you on later requests.
  • Session: the period during which a site remembers that you are logged in, usually tracked by a cookie.
  • CSRF (Cross-Site Request Forgery): an attack where a page on another site makes your browser send a request to a site where you are logged in.
  • CSRF token: a secret random value placed in a form and checked by the server to prove the request came from the site's own pages.
  • State-changing request: a request that changes data, such as saving a profile or changing a password, as opposed to one that only reads.
  • SameSite: a cookie attribute that controls whether the cookie is attached to requests coming from another site.
  • Lax / Strict: values of SameSite; Lax allows the cookie on top-level navigations from other sites, Strict does not.
  • Top-level navigation: when you click a link and the browser moves to a new page, as opposed to a background request.
  • Origin / Referer header: information the browser sends about which page a request came from.
  • Proxy: a tool that sits between your browser and a site so you can read and edit the traffic.
  • Secure / HttpOnly: cookie attributes that restrict the cookie to encrypted connections and hide it from page scripts.
  • Account takeover: an attack where someone gains control of another person's account.
  • Email verification: a step where the site confirms you own the email address before certain changes take effect.

More by mohammadowais

View all

3 more disclosed reports, best first.

More from Opera Public Bug Bounty

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.