How I Found a Secondary SQL Injection in a Top 3 Gaming Platform
A gaming platform's login flow used the submitted username in a second SQL query after authentication, so a crafted username caused an SQL error and a boolean payload returned the game owner's account details. The attacker could read other users' data such as the GM's email and transaction history, though a username length limit blocked a full UNION dump.
medium.com
Published on medium.com
While I was hunting for a fresh website to break ethically test 🕵️♂️, I took a casual stroll through XtremeTop100 — you know, that legendary place where every private server screams “WE’RE #1!” (even if they have like 3 players).
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 username from the login request was concatenated directly into a second SQL query used to fetch account details, without a prepared statement.
Impact
The tester could read other users' data, including the game master's email and transaction history, but a username length limit prevented a full database dump.
What the attacker needed
A free account; ability to send requests directly to the server
The fix
The second query should use a prepared statement with the username as a bound parameter, and server-side validation should not rely on front-end JavaScript.
How it was found
- Register an account whose username contains an SQL payload, sending the request directly to the server to bypass the front-end filter.
- Log in with that account and observe an SQL error on the account page.
- Register another account with a boolean-based payload in the username and log in.
- Observe that the account page shows the game owner's details instead of the tester's own.
- Try a UNION payload but find the username field is truncated, so the login fails.
- Increase the payload length gradually until login succeeds, confirming a maximum username length of about 21 characters.
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.
After you log in, the site looks up your profile using the username you typed. Because it pasted that username straight into a database command, a username containing database instructions changed what the command did. This let the tester see another person's account details instead of their own.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.