Unlimited Store Credit: Finding an Economy-Breaking Bug in a Digi
The Discord bot checked for the Administrator permission in whatever server a command was run in, but did not verify that the server was the official store server. By inviting the bot to a personal server where they were admin, an attacker could run privileged commands like /donate to add unlimited store credits to their global balance.
Published on vankevindo.medium.com
I discovered a series of critical vulnerabilities in an e-commerce Discord bot, RGS | Assistant. The bot correctly hid admin commands from regular users in its home server.
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The bot used a server-local role check (Administrator permission in the current server) to gate commands that affected global, cross-server user data, without verifying the command was run in the official server.
Impact
An attacker could generate unlimited store credits and manipulate other users' balances and invite stats, posing a direct financial risk to the store; the actions were not logged in the main server, and banning the user from the main server did not stop them from continuing to exploit from their own server.
What the attacker needed
Ability to create a Discord server; Bot invite link is public; Bot installed in attacker's server
The fix
The bot should use a global, ID-based admin whitelist instead of server-local role checks, denying commands by default unless the user's ID is on the list.
How it was found
- Create a private Discord server where you are the owner and have Administrator permission.
- Invite the RGS | Assistant bot to your personal server using its public invite link.
- Run a privileged command such as /donate inside your own server.
- The bot checks that you have Administrator permission in that server and allows the command.
- Return to the official store server and observe that your global balance has increased.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A Discord bot is a program that runs inside a Discord server. The bot had commands meant only for the store's own administrators, but it only checked whether the person using the command was an administrator of the server where the command was typed. So if you made your own server, made yourself admin, and invited the bot there, the bot thought you were allowed to use those commands. That let you give yourself unlimited store credit.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.