Skip to content
CSRF Write-up Beginner

Finding bugs on Chess.com

The report describes three issues on Chess.com: a CAPTCHA bypass on the login page, a missing CAPTCHA on the email login method allowing brute-force attacks, and a CSRF vulnerability in the disconnect social account feature. An attacker could bypass CAPTCHA, lock victim accounts via brute-force, or disconnect a victim's linked social account by tricking them into clicking a link.

Seqrity Follow

Published on medium.com

Bounty$180 View original

{{media:0}}

Seqrity, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against 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. 5 min read.

Context

Chess.com is the target: the number one online chess website, which runs an internal bug bounty programme rather than hosting its work on a platform such as HackerOne. The researcher describes the programme as friendly in communication but stricter than HackerOne triagers when it comes to accepting bugs and paying bounties, and argues the policy should be clarified and updated monthly.

The features examined are:

  • the login page and its Cloudflare hCaptcha challenge;
  • the two login methods, by username and by email;
  • the connected accounts feature, which lets a user link and unlink Google, Facebook and similar identity providers from the settings menu.

The write-up covers an hCaptcha bypass on login, a missing captcha after repeated failed email logins, and a CSRF in the disconnect flow for connected accounts.

Setup

The researcher is a regular Chess.com user. The work was done from a VPS whose IP was being used as a proxy, which the researcher believes caused Cloudflare to place that IP in its graylist and to present the hCaptcha challenge on the login page.

The main tool was the Firefox extension HTTP Header Live, which intercepts requests in the manner of Burp Suite: clicking a request opens a window where it can be edited and resent. The researcher notes that HTTP Header Live uses blob URLs, which matters later because the same steps cannot be reproduced in Burp.

No versions are given.

Finding it

The hunting started on the login page. Instead of logging in normally, Chess.com redirected the researcher to a page for solving Cloudflare hCaptcha. After login, the server redirects the user to the following link for solving the captcha:

Text
https://www.chess.com/login_check

The screenshot shows the https://www.chess.com/login_check page reached after login.

Exploitation

Step 1: resend the login POST to bypass hCaptcha

HTTP Header Live showed the request to login_check as a POST with the username and password in the body. The researcher simply resent it, and the following page loaded.

The screenshot shows the POST request being sent again through HTTP Header Live.

After clicking the Home button, the hCaptcha is bypassed and the user is logged in without solving the captcha, because hCaptcha has a misconfiguration on the server. The researcher stresses that these steps cannot be reproduced with Burp, because HTTP Header Live uses blob URLs, visible in the address bar of the screenshot above. The lesson drawn is not to rely on a single tool.

Step 2: brute force through the email login

Chess.com offers two login methods: by username and by email. If you enter a wrong password more than 10 times you have to solve a captcha. The email login page has a misconfiguration: after 10 wrong attempts, the captcha does not appear, so an attacker can run a brute-force attack against each user, which leads to locking the victim's account.

The screenshot shows the login page.

If the user is on the mobile app, the locked account produces the following error:

The user then has to log in on the Chess.com website and solve the captcha to unlock the account. The lesson here is to test every function of an application, not just the obvious one.

Step 3: CSRF in the connected accounts disconnect

Chess.com lets users log in through Google, Facebook and other accounts, and lets them disconnect those accounts from the settings menu. The disconnect button sends a POST request to the server:

The screenshot shows the POST request sent when the disconnect button is clicked.

After sending this POST request, nothing happens. At first sight everything looks correct: this kind of request should be a POST carrying a token, and the logic appears sound. The answer is in the next request: the POST does nothing, and the following GET request is what actually disconnects the user from the Google account.

The screenshot shows the GET request that performs the disconnect.

Because the state change is carried by a GET, any attacker can send a link to victims and they will be disconnected from their account, or host a CSRF file with the following code:

HTML
<html><body><form action="https://www.chess.com/settings/google/disconnect"><input type="submit" value="Submit request" /></form><script>document.forms[0].submit();</script></body></html>

The form targets the disconnect endpoint and the script submits it automatically as soon as the page loads. The lesson is to think out of the box and review all the requests, because something unexpected may be happening.

Root cause

Three distinct causes, as described:

  1. hCaptcha bypass: a misconfiguration on the server around the login_check flow, such that resending the login POST completes the login without a solved captcha.
  2. Missing captcha on email login: a misconfiguration on the email login page means the captcha does not appear after 10 wrong attempts.
  3. CSRF: the disconnect action is performed by a GET request, which can be triggered cross-site. The POST that looks like the real action does nothing.

Impact

  • The hCaptcha bypass lets a user complete login without solving the challenge.
  • The missing captcha on email login allows brute-force attempts against any user, and the consequence the researcher highlights is that the victim's account gets locked, requiring a website login and a solved captcha to unlock.
  • The CSRF lets any attacker disconnect a victim from their linked Google (or other) account by getting them to follow a link or load a page, with no further interaction.

Fix

No fixes are described in the report.

Variants to test

  1. Resend login POSTs past captcha gates. On any site that redirects to a challenge endpoint after login, capture the POST and resend it. A positive result is a session established without solving the challenge.
  2. Compare parallel login paths. Where a site offers username and email login, drive failed attempts through each. A positive result is one path enforcing a captcha after the threshold while the other does not.
  3. Watch for state-changing GETs behind a decoy POST. Click destructive or security-relevant buttons and inspect the following requests. A positive result is a GET that performs the action while the preceding POST has no effect.
  4. Test unlink and unenrol flows for CSRF. Build an auto-submitting form against the disconnect endpoint and load it while authenticated. A positive result is the account being disconnected without a token.
  5. Try the same request from a different tool. When one proxy cannot reproduce a flow, repeat it with a browser-based interceptor. A positive result is behaviour that only appears through one client, which points at how the request is constructed rather than at the server logic.

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. 12 min read.

What happened, in plain words

This is a story about three separate mistakes found on Chess.com, the biggest online chess website. The author is a chess lover who uses the site almost every day. A security bug is a flaw in a website that lets someone make it behave in a way its owners did not intend. Some bugs are harmless, some let an attacker take over an account, and some just weaken the protections the site has put in place.

Chess.com runs its own bug bounty programme. A bug bounty programme is an offer from a company: if you find a security problem and report it responsibly, we will pay you a reward (the bounty) instead of punishing you. Many companies run these programmes on a shared platform such as HackerOne, which also provides people called triagers who read each report and decide whether it is a real bug worth paying for. Chess.com instead runs its programme internally. The author says the team is friendly to talk to but stricter than HackerOne triagers about accepting bugs and paying out, and thinks the policy should be clearer and updated every month.

The three issues all sit around logging in and managing your account:

  • the login page and the hCaptcha challenge it shows;
  • the two ways to log in, with a username or with an email address;
  • the connected accounts feature, where you can link your Google or Facebook account to Chess.com and later unlink it from the settings menu.

The three bugs are:

  1. a way to get past the hCaptcha challenge on login by resending a request;
  2. a missing captcha after repeated wrong passwords when logging in by email, which allows guessing passwords over and over;
  3. a CSRF in the disconnect flow for connected accounts, meaning another website can make your browser disconnect your Google account without you meaning to.

We will go through them in the same order the author did, explaining each idea from scratch as it comes up.

The setup: what tools and conditions were involved

The author was working from a VPS, which stands for virtual private server: a computer rented in a data centre that you control remotely, often used to run tools. The traffic was going out through a proxy, meaning the requests were routed through that rented machine rather than straight from the author's home connection. Cloudflare is a large service that sits in front of many websites and filters traffic before it reaches them, partly to block bots and attacks. The author believes Cloudflare put the VPS address on a graylist, a middle category between trusted and blocked. hCaptcha is one of those puzzles (tick a box, pick the traffic lights) used to tell humans from automated programs.

The main tool was a Firefox browser extension called HTTP Header Live. A browser extension is a small add-on you install in your browser. This one lets you watch the requests your browser sends and the responses it gets back, and it lets you edit a request and send it again. That is roughly what Burp Suite does, a well-known professional tool for the same job, but HTTP Header Live lives inside the browser. The author notes that HTTP Header Live uses blob URLs. A blob URL is a special address the browser creates for data it is holding in memory, rather than a normal web address; you will see why that matters in a moment.

No special account was needed: this was all done as an ordinary user. The report gives no software versions.

Finding it: the login page and the captcha redirect

The hunting started on the login page. Instead of logging in normally, Chess.com sent the author to a page for solving the Cloudflare hCaptcha. After login, the server redirects the user to this address to solve the captcha:

Text
https://www.chess.com/login_check

The screenshot shows the https://www.chess.com/login_check page that you land on after logging in.

A redirect is simply the server telling your browser "the page you want is over there, go to this other address instead". A server is the computer that answers your browser's requests. So the flow is: you type your username and password, the server takes them, and then instead of dropping you straight into the site it sends you to login_check to prove you are human.

Bug 1: getting past the hCaptcha by resending the login request

Step 1: resend the login POST

When you press a login button, your browser sends what is called a POST request. A request is a message your browser sends to a server asking it to do something. There are two common kinds: a GET request asks the server to give you something (a page, an image), and a POST request sends data to the server, such as your username and password, asking it to act on it. The body of a request is the part that carries that data.

HTTP Header Live showed the request to login_check as a POST with the username and password in the body. The author simply sent it again, and the following page loaded.

The screenshot shows the POST request being sent again through HTTP Header Live.

After clicking the Home button, the hCaptcha is bypassed and the user is logged in without solving the captcha. The reason, as the author describes it, is that hCaptcha has a misconfiguration on the server. A misconfiguration means the software is set up wrongly, so it does not enforce the check it was meant to enforce. In everyday terms: imagine a bouncer at a door who is supposed to check your ticket, but if you simply walk up a second time he waves you through. The check exists, but it is not actually applied on that path.

The author stresses that these steps cannot be reproduced with Burp, because HTTP Header Live uses blob URLs, visible in the address bar of the screenshot above. In plain words: the request as this extension builds it is not quite the same thing Burp would send, so a different tool gives a different result. The lesson drawn is not to rely on a single tool. If one tool cannot reproduce something, try another before deciding the bug is not real.

Step 2: guessing passwords through the email login

Chess.com offers two login methods: by username and by email. A brute-force attack means trying many passwords in a row, automatically, until one works, like someone trying every key on a keyring on a locked door. To slow this down, sites usually add a captcha after a few failures, because a human can solve a puzzle but a program cannot easily do it thousands of times.

If you enter a wrong password more than 10 times you have to solve a captcha. The email login page has a misconfiguration: after 10 wrong attempts, the captcha does not appear. So an attacker can run a brute-force attack against each user, and the consequence the author highlights is that this locks the victim's account.

The screenshot shows the login page.

If the user is on the mobile app, the locked account produces the following error:

The user then has to log in on the Chess.com website and solve the captcha to unlock the account. The lesson here is to test every function of an application, not just the obvious one.

Step 3: CSRF in the connected accounts disconnect

CSRF stands for cross-site request forgery. The idea: your browser is logged in to a site, and it automatically attaches your login credentials (usually a cookie, a small piece of data the site stored in your browser to remember you) to every request going to that site. If another website can make your browser send a request to the first site, that request arrives already logged in as you, even though you never intended to send it. It is like someone writing a letter in your handwriting and posting it for you.

Chess.com lets users log in through Google, Facebook and other accounts, and lets them disconnect those accounts from the settings menu.

The screenshot shows the Connected Accounts section of the settings.

The disconnect button sends a POST request to the server:

The screenshot shows the POST request sent when the disconnect button is clicked.

After sending this POST request, nothing happens. At first sight everything looks correct: this kind of request should be a POST carrying a token, and the logic appears sound. A token here means a secret value the page includes so the server can tell the request really came from the site's own page and not from somewhere else; without the right token, the server refuses. That is the standard defence against CSRF.

The answer is in the next request: the POST does nothing, and the following GET request is what actually disconnects the user from the Google account.

The screenshot shows the GET request that performs the disconnect.

So the protection was on the wrong request. The POST did nothing; the real action was carried by a GET, which can be triggered from anywhere. Because the state change is carried by a GET, any attacker can send a link to victims and they will be disconnected from their account, or host a CSRF file with the following code:

HTML
<html><body><form action="https://www.chess.com/settings/google/disconnect"><input type="submit" value="Submit request" /></form><script>document.forms[0].submit();</script></body></html>

Line by line, in plain words:

  • <html><body> opens an ordinary web page.
  • <form action="https://www.chess.com/settings/google/disconnect"> starts a form, which is the part of a page that can send data somewhere. The action says where the form goes when submitted: here, the disconnect address on Chess.com.
  • <input type="submit" value="Submit request" /> is the button that submits the form. The value is just the text shown on the button.
  • <script>document.forms[0].submit();</script> is a small piece of JavaScript, the language browsers run to make pages interactive. document.forms[0] means the first form on the page, and .submit() sends it. Because this runs as soon as the page loads, the visitor does not have to click anything.

The form targets the disconnect endpoint and the script submits it automatically as soon as the page loads. The lesson is to think out of the box and review all the requests, because something unexpected may be happening.

Why each bug happened

Three distinct causes, as described:

  1. hCaptcha bypass: a misconfiguration on the server around the login_check flow, such that resending the login POST completes the login without a solved captcha.
  2. Missing captcha on email login: a misconfiguration on the email login page means the captcha does not appear after 10 wrong attempts.
  3. CSRF: the disconnect action is performed by a GET request, which can be triggered cross-site. The POST that looks like the real action does nothing.

What the impact was

  • The hCaptcha bypass lets a user complete login without solving the challenge.
  • The missing captcha on email login allows brute-force attempts against any user, and the consequence the author highlights is that the victim's account gets locked, requiring a website login and a solved captcha to unlock.
  • The CSRF lets any attacker disconnect a victim from their linked Google (or other) account by getting them to follow a link or load a page, with no further interaction.

How it should be fixed

No fixes are described in the report.

Things to try on other sites

  1. Resend login POSTs past captcha gates. On any site that redirects to a challenge endpoint after login, capture the POST and resend it. A positive result is a session established without solving the challenge.
  2. Compare parallel login paths. Where a site offers username and email login, drive failed attempts through each. A positive result is one path enforcing a captcha after the threshold while the other does not.
  3. Watch for state-changing GETs behind a decoy POST. Click destructive or security-relevant buttons and inspect the following requests. A positive result is a GET that performs the action while the preceding POST has no effect.
  4. Test unlink and unenrol flows for CSRF. Build an auto-submitting form against the disconnect endpoint and load it while authenticated. A positive result is the account being disconnected without a token.
  5. Try the same request from a different tool. When one proxy cannot reproduce a flow, repeat it with a browser-based interceptor. A positive result is behaviour that only appears through one client, which points at how the request is constructed rather than at the server logic.

Glossary

  • Bug bounty programme: a company's offer to pay a reward to people who find and report security problems in its products.
  • Bounty: the money paid for a valid report.
  • HackerOne: a platform where many companies run bug bounty programmes and where triagers review reports.
  • Triager: the person who reads a bug report and decides whether it is valid and what it is worth.
  • VPS: virtual private server, a rented computer in a data centre that you control remotely.
  • Proxy: an intermediary that forwards your traffic, so the destination sees the proxy's address instead of yours.
  • Cloudflare: a service that sits in front of websites and filters traffic before it reaches them.
  • Graylist: a middle category between trusted and blocked, where traffic is allowed but treated with suspicion.
  • hCaptcha: a puzzle used to tell humans from automated programs.
  • Captcha: any such human-check puzzle.
  • Browser extension: a small add-on installed in a browser to add features.
  • HTTP Header Live: a Firefox extension that shows, edits and resends browser requests.
  • Burp Suite: a professional tool for intercepting and editing web traffic.
  • Blob URL: a special browser address for data held in memory rather than a normal web address.
  • Request: a message your browser sends to a server asking it to do something.
  • Response: the server's reply to a request.
  • GET: a request that asks the server to give you something.
  • POST: a request that sends data to the server and asks it to act on it.
  • Body: the part of a request that carries data such as a username and password.
  • Server: the computer that answers your browser's requests.
  • Redirect: the server telling your browser to go to a different address instead.
  • Misconfiguration: software set up wrongly, so a check it was meant to enforce is not applied.
  • Brute-force attack: trying many passwords automatically until one works.
  • Account lockout: the account being temporarily blocked after too many failed attempts.
  • CSRF (cross-site request forgery): another website making your logged-in browser send a request you did not intend.
  • Cookie: a small piece of data a site stores in your browser to remember you between requests.
  • Token: a secret value included in a request so the server can tell it came from the site's own page; the standard CSRF defence.
  • Endpoint: a specific address on a server that performs a particular action.
  • JavaScript: the language browsers run to make pages interactive.
  • Form: the part of a page that can send data to a server.
  • Session: the logged-in state a site keeps for you across requests.
  • State change: an action that alters something on the server, such as disconnecting an account.

More by Seqrity

View all

1 more disclosed report, best first.

More from Chess.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.