Hacking Chess.com: My Journey to Unlock Premium Bots on the Android App
The Android app stored premium bot status in a local JSON file and a method, allowing a user to patch the app to unlock premium bots without a subscription. An attacker could modify the app to access paid features for free.
The rules of chess are simple: “Each player controls sixteen pieces of six types on a chessboard. Each type of piece moves in a distinct way.
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.
Context
Chess.com is an online chess platform with over 100 million members and more than 17 million games played daily, according to the author. A couple of months before the write-up it became the most popular free game in different countries on both the iOS App Store and Google Play Store. Playing is free, but the platform sells three types of premium plans.

Figure 1, Chess.com Premium Plans
One of the paid features is "Bot Players": opponents modelled on famous players such as Nakamura and Ian Nepo, or on chess streamers such as GothamChess and Anna Cramling. The feature was fairly recent, which is what prompted the author to look at how it had been implemented in the Android app and whether the subscription restriction could be bypassed. Chess.com runs a bug bounty programme, which was a further reason to look.

Figure 2, Premium Bots
Setup
The analysis was purely static, on the Android application. The vulnerable version recorded in the write-up is:
v4.5.13-googleplay (262093)
The tool used was Jadx, to decompile the APK and browse its code. No account was needed: the author notes that it is not necessary to log in to play against the "free" bot players, and the whole exercise was done on a non-rooted device. The code was not obfuscated, which made the search practical.
Finding it
The author's framing is that static analysis needs a plan: with 50,000+ classes, you cannot read every line in a limited amount of time, so you have to decide where to start. The plan was to decompile the app with Jadx and search for the string of a bot player, such as GothamChess, hoping to find a reference in the code.
That search paid off. Inside the /res directory there was a JSON file holding the information about every bot player.

Figure 3, Jadx-gui
The bots.json file stores all the information and properties of all bot players: the phrases a bot uses during games, its ranking, whether the bot is considered premium, and so on.

Figure 4, bots.json file
What made this look wrong is that a commercial entitlement (premium or not) was being decided by data shipped inside the client, in a plain, readable resource file, rather than being enforced somewhere the user cannot edit.
Exploitation
Step 1: flip the flag in bots.json
The first attempt was to set the is_premium property of every bot to false, repackage the app, and see whether it worked.
On opening the patched app, all bots were unlocked for a couple of seconds, and then they were re-locked. The author's interpretation was that some kind of double-check was taking place.
Step 2: reinstall offline
By intuition, the author uninstalled the app, switched off the Wi-Fi connection, and reinstalled the patched app. With no connectivity, all bots were unlocked.

The author's interpretation was that some kind of double-check was taking place, and going offline removed that step. It also showed the limit of this first patch, since the unlock only held while offline.
Step 3: patch the is_premium() method
To remove the connection limit as well, the author went back into the code and found the method is_premium() inside the PersonalityBotData.smali file, in:
smali_classes3/com/chess/net/model
Patching the smali code of the is_premium() method so that it always returns false unlocks all premium bot players.

Figure 5, Patch of is_premium method
The result is that all bots can be played without a premium account and with the internet connection on.

Figure 6, Unlocked bots
Root cause
The write-up maps the issue to the OWASP category "Extraneous Functionality". By patching the bots.json file inside the APK, the author was able to unlock a premium feature that was not intended to be available to a free user.
The mistake is that the premium status of each bot is shipped to the client as editable data, and the client-side method is_premium() is what the app consults to decide whether a bot is locked. Anyone who can modify the APK can change both. The re-locking observed after the first patch suggests a second check; the report does not describe it beyond the behaviour observed. The report does not describe that second check beyond the behaviour observed.
Impact
A free user, with no chess.com account and on a non-rooted device, can unlock the premium Bot Players feature by patching the APK. The author states the vulnerability can be easily exploited through static analysis and that it took just 10 minutes. The effect is limited to the bot feature: the write-up does not claim access to any other premium capability, to other users' data, or to server-side resources.
On the process side, the report gives the following timeline:
| Date | Event |
|---|---|
| 09/03/2023 | Discovery sent to chess.com through its bug bounty programme |
| 11/03/2023 | Chess.com replied that this type of vulnerability is out of scope |
| 27/03/2023 | Chess.com gave the author three months' subscription to Diamond membership |
The author also notes, as an aside, that he played against the Nakamura and GothamChess bots and lost, but was happy with a draw by repetition against the Anna Cramling bot, who has a ranking of 2100.

Figure 7, My game against Anna Cramling bot
Fix
What the analysis implies is that the premium decision should not rest on data and code the user controls: the entitlement check for premium bots should be enforced where the client cannot rewrite it, so that editing bots.json or the is_premium() method changes nothing.
Variants to test
- Entitlement flags in bundled resources. Decompile an app and grep the resources for names like
is_premium,is_paid,tierorsubscriber. A positive result is a readable JSON, XML or properties file that decides a paid feature and can be edited and repackaged. - Client-side entitlement methods. Search the smali for methods such as
is_premium(),isPro()orhasSubscription()and check whether their return value alone gates a feature. A positive result is a feature that unlocks after patching the return value, with the network on. - Two-stage checks. After a first patch, watch whether the feature unlocks briefly and then reverts. A positive result for the second stage is that the unlock survives with the network off, which points to a network-driven re-check that can then be located and patched.
- Unobfuscated builds. Try the same string search on builds where class and resource names are readable; a positive result is a direct hit on the feature's data file or model class, as happened here with
GothamChessleading tobots.json.
That's all from the original write-up, which closes with the author's hope that the reading was as enjoyable as finding the vulnerability was for him.
What happened, in plain words
Chess.com is a website and mobile app where people play chess against each other and against computer opponents. Most of it is free, but some features are sold through paid plans. One of those paid features is "Bot Players": computer opponents modelled on famous chess players and chess streamers. If you do not pay, those particular bots are supposed to stay locked.
The author of this write-up wanted to know how the Android app decides whether a bot is locked or unlocked. He downloaded the app, opened it up with a tool that shows the code inside, and found that the answer was sitting in a plain text file that ships with the app. He edited that file, rebuilt the app, and the premium bots opened up. When the app re-locked them after a few seconds, he suspected some kind of double-check, so he tried again with the phone offline. That worked. He then went one step further, changed a small piece of the app's own code so that the check always answered "not premium", and from then on the bots stayed unlocked even with the internet on.
He reported it to Chess.com through their bug bounty programme. They replied that this kind of issue was out of scope, and later gave him three months of Diamond membership anyway. Nobody's account or data was at risk: the only thing unlocked was a paid feature on his own copy of the app.
This article walks through the same steps for someone who has never done security work before. Every term is explained the first time it appears.
Background: what Chess.com is and what it sells
Chess.com is an online chess platform. According to the write-up it has over 100 million members and more than 17 million games played every day. A couple of months before the write-up it became the most popular free game in different countries on both the iOS App Store and Google Play Store.
Playing chess on the site is free, but the platform sells three types of premium plans.

Figure 1, Chess.com Premium Plans
One of the paid features is "Bot Players". These are computer opponents modelled on real people: famous players such as Nakamura and Ian Nepo, and chess streamers such as GothamChess and Anna Cramling. The feature was fairly new at the time, and that is what made the author curious about how it had been built into the Android app, and whether the subscription restriction could be bypassed. Chess.com also runs a bug bounty programme, which was a second reason to look.
A bug bounty programme is a scheme where a company invites outside people to look for security problems in its products and report them, sometimes for a reward. It is a way for a company to hear about weaknesses from friendly researchers instead of from attackers.

Figure 2, Premium Bots
Setup: the tools and the target
The analysis was purely static, meaning the author never ran the app to watch what it did at runtime; he read the code and the files inside the app package instead. The vulnerable version recorded in the write-up is:
v4.5.13-googleplay (262093)
This is simply the version string of the Android build he examined, as shown in the app's own metadata. It matters because a later version might have been fixed, so anyone repeating the work needs to know which build the finding applies to.
The tool used was Jadx, a free program that takes an Android app package and turns its compiled code back into something a human can read. To understand why that is needed, it helps to know what an Android app actually is.
An Android app is distributed as an APK file. Think of it as a sealed cardboard box: it contains the program's code, its images, its sounds, and various data files, all packed together. The code inside is not plain text; it has been compiled, meaning translated from the language the programmer wrote into a compact form that the phone's processor can execute quickly. A decompiler such as Jadx is a tool that reverses that translation as far as possible, so you can read the logic again.
No account was needed for the work. The author notes that you do not have to log in to play against the "free" bot players, so the whole exercise could be done without signing up. It was also done on a non-rooted device. Rooting an Android phone means removing the manufacturer's restrictions so you get full control over the operating system; many security tests require it, and the point here is that this one did not.
Finally, the code was not obfuscated. Obfuscation is a deliberate process that renames classes, methods and variables to meaningless labels (things like a, b, c1) so that anyone reading the decompiled code has a much harder time understanding it. Because this app was not obfuscated, names stayed readable, which made searching practical.
Finding it: searching for a name
The author's framing is that static analysis needs a plan. With 50,000+ classes to look at, you cannot read every line in a limited amount of time, so you have to decide where to start. A class is a building block of an object-oriented program: a named bundle of code and data that represents one concept, such as a chess bot or a user profile. Fifty thousand of them is far too many to read one by one.
He quotes the second World Champion, Emanuel Lasker:
"A bad plan is better than no plan at all."
The plan was simple: decompile the app with Jadx and search for the text string of a bot player, such as GothamChess, hoping to find a reference somewhere in the code. A string here means a piece of text stored in the program, such as a name or a message. Searching for a distinctive name is a classic first move, because wherever that name appears, the code or data around it is probably related to the feature you care about.
That search paid off. Inside the /res directory there was a JSON file holding the information about every bot player. The /res directory (short for resources) is the folder inside the APK where non-code assets live: images, layouts, sounds and data files.
JSON is a plain text format for structured data. It looks like a list of labelled values, and it is readable by both humans and programs. A useful everyday comparison is a well-organised form: each field has a name and a value, and the structure is obvious from the punctuation.

Figure 3, Jadx-gui
The bots.json file stores all the information and properties of all bot players: the phrases a bot uses during games, its ranking, whether the bot is considered premium, and so on.

Figure 4, bots.json file
What made this look wrong is that a commercial entitlement, that is, whether you have paid for something, was being decided by data shipped inside the client. The client is the app running on the user's own device, as opposed to the server, the company's computers that the app talks to over the internet. Anything that ships inside the client can, in principle, be edited by whoever holds the file. A premium decision stored there, in a plain readable resource file, is not really enforced at all.
Exploitation: three attempts
Step 1: flip the flag in bots.json
The first attempt was to set the is_premium property of every bot to false, repackage the app, and see whether it worked.
In plain terms: the JSON file contains, for each bot, a field named is_premium whose value says whether that bot is a paid one. Changing that value to false tells the app "this bot is free". Repackaging means putting the edited files back into an APK and signing it so the phone will install it, in the same way you would reseal the cardboard box after swapping its contents.
On opening the patched app, all bots were unlocked for a couple of seconds, and then they were re-locked. The author's interpretation was that some kind of double-check was taking place. A double-check here means a second decision point: the app looked at the local file, decided the bots were free, and then something else decided otherwise shortly afterwards.
Step 2: reinstall offline
By intuition, the author uninstalled the app, switched off the Wi-Fi connection, and reinstalled the patched app. With no connectivity, all bots were unlocked.

This supported the double-check idea: with no connectivity, all bots were unlocked. It also showed the limit of this first patch: the unlock only held while offline, which is not much use for a normal player.
Step 3: patch the is_premium() method
To remove the connection limit as well, the author went back into the code and found the method is_premium() inside the PersonalityBotData.smali file, in:
smali_classes3/com/chess/net/model
A few terms are needed to read that path. A method is a named block of code that does one job and can be called from elsewhere; is_premium() is a method whose job is to answer the question "is this bot premium?". Smali is the human-readable form of Android's compiled code: when Jadx decompiles an app, the low-level instructions can be shown in smali, which looks like short assembly-style lines rather than a modern programming language. The path smali_classes3/com/chess/net/model is simply where that file sits inside the decompiled output: a folder for the third batch of classes, then the package folders com/chess/net/model, which is the app's own naming for the part of the code that models chess data.
Patching the smali code of the is_premium() method so that it always returns false unlocks all premium bot players.

Figure 5, Patch of is_premium method
Why does that work? Because the app asks this method the question "is this bot premium?" and acts on the answer. If the method is edited so that its answer is always "no", the app treats every bot as free, no matter what the JSON file says and no matter what arrives over the network. The result is that all bots can be played without a premium account and with the internet connection on.

Figure 6, Unlocked bots
Root cause: why this was possible
The write-up maps the issue to the OWASP category "Extraneous Functionality". OWASP is a well-known non-profit project that publishes free guidance on application security, including a list of common weakness categories. "Extraneous functionality" describes code or data left in a product that was never meant to be reachable or trusted by the user, and that ends up giving away something.
By patching the bots.json file inside the APK, the author was able to unlock a premium feature that was not intended to be available to a free user.
The mistake is that the premium status of each bot is shipped to the client as editable data, and the client-side method is_premium() is what the app consults to decide whether a bot is locked. Anyone who can modify the APK can change both. The re-locking observed after the first patch indicates that a second check, likely a server-side or network-driven one, also ran; the offline reinstall bypassed it, and patching is_premium() removed the dependency on the connection altogether. The report does not describe that second check beyond the behaviour observed.
A useful comparison is a nightclub with a guest list. If the doorman keeps the list in his own pocket and you can rewrite it, you get in. If the club phones head office to confirm every name, rewriting your copy of the list is not enough, which is exactly what the re-locking showed.
Impact: what could and could not be done
A free user, with no chess.com account and on a non-rooted device, can unlock the premium Bot Players feature by patching the APK. The author states the vulnerability can be easily exploited through static analysis and that it took just 10 minutes. The effect is limited to the bot feature: the write-up does not claim access to any other premium capability, to other users' data, or to server-side resources.
On the process side, the report gives the following timeline:
| Date | Event |
|---|---|
| 09/03/2023 | Discovery sent to chess.com through its bug bounty programme |
| 11/03/2023 | Chess.com replied that this type of vulnerability is out of scope |
| 27/03/2023 | Chess.com gave the author three months' subscription to Diamond membership |
"Out of scope" means the company had decided in advance that this category of issue would not be accepted into the bounty programme, so no bounty was paid for it. The report does not say whether any bounty was paid.
The author also notes, as an aside, that he played against the Nakamura and GothamChess bots and lost, but was happy with a draw by repetition against the Anna Cramling bot, who has a ranking of 2100. A draw by repetition is a chess rule: if the same position occurs three times, the game can be declared a draw.

Figure 7, My game against Anna Cramling bot
Fix: what should change
What the analysis implies is that the premium decision should not rest on data and code the user controls: the entitlement check for premium bots should be enforced where the client cannot rewrite it, so that editing bots.json or the is_premium() method changes nothing.
In everyday terms, the answer to "has this person paid?" should be given by the company's own records, not by a note the customer carries in their pocket.
Variants to test: how to look for the same pattern elsewhere
- Entitlement flags in bundled resources. Decompile an app and grep the resources for names like
is_premium,is_paid,tierorsubscriber. To grep is to search text for a word or pattern. A positive result is a readable JSON, XML or properties file that decides a paid feature and can be edited and repackaged. - Client-side entitlement methods. Search the smali for methods such as
is_premium(),isPro()orhasSubscription()and check whether their return value alone gates a feature. A positive result is a feature that unlocks after patching the return value, with the network on. - Two-stage checks. After a first patch, watch whether the feature unlocks briefly and then reverts. A positive result for the second stage is that the unlock survives with the network off, which points to a network-driven re-check that can then be located and patched.
- Unobfuscated builds. Try the same string search on builds where class and resource names are readable; a positive result is a direct hit on the feature's data file or model class, as happened here with
GothamChessleading tobots.json.
That's all from the original write-up, which closes with the author's hope that the reading was as enjoyable as finding the vulnerability was for him.
Glossary
- APK: the file format Android apps are distributed in; a package containing code, resources and metadata.
- Bug bounty programme: a scheme where a company invites outside researchers to find and report security problems, sometimes for a reward.
- Class: a named building block of an object-oriented program, bundling code and data for one concept.
- Client: the app running on the user's own device, as opposed to the company's servers.
- Compiled: translated from a programming language into a compact form the processor can execute.
- Decompiler: a tool that reverses compilation as far as possible so the code can be read again.
- Double-check: a second decision point in a program, here one that re-locked the bots after the local file said they were free.
- Draw by repetition: a chess rule under which a game is drawn if the same position occurs three times.
- Entitlement: whether a user is entitled to a paid feature, that is, whether they have paid for it.
- Extraneous functionality: an OWASP weakness category for code or data left in a product that was never meant to be trusted or reachable by the user.
- Grep: to search text for a word or pattern.
- Jadx: a free tool that decompiles Android APKs so their code and resources can be read.
- JSON: a plain text format for structured data, made of named fields and values.
- Method: a named block of code that performs one job and can be called from elsewhere.
- Non-rooted device: an ordinary Android phone without the manufacturer's restrictions removed; many security tests need root, this one did not.
- Obfuscation: deliberately renaming classes, methods and variables to meaningless labels to make code harder to read.
- OWASP: a non-profit project publishing free guidance on application security, including lists of common weakness categories.
- Repackaging: putting edited files back into an APK and signing it so the phone will install it.
- Resources: the non-code assets inside an APK, such as images, layouts and data files, kept in the
/resdirectory. - Server: the company's computers that the app talks to over the internet.
- Smali: the human-readable form of Android's compiled code, shown as short assembly-style instructions.
- Static analysis: examining an app's code and files without running it, as opposed to watching its behaviour at runtime.
- String: a piece of text stored in a program, such as a name or a message.
- Version string: the label identifying which build of an app you are looking at.