Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pvpgn-stats: Multiple SQL injection vulnerabilities, and mysql_* functions removed from PHP7 #1

Open
reillychase opened this issue Sep 12, 2017 · 1 comment

Comments

@reillychase
Copy link
Contributor

reillychase commented Sep 12, 2017

I wouldn't recommend for anyone to host this utility in its current state.

  • Current SQL handler classes do not filter database queries, allowing SQL injection vulnerabilities
  • An attacker can obtain full access to PvPGN database including all emails, usernames, and passwords (easy to crack XSHA1)

In addition to the SQL injection vulnerabilities, the mysql_* database functions have been removed from PHP7 in favor of MySQLi and PDO, so it won't run on new OS installs, for example Debian 9.

Both issues can be fixed by updating the code to use PDO. I began working on a patch but didn't finish it yet, hopefully someone else who is more familiar with PHP can upgrade the util.

SQL Injection Vulnerable Parameters:

  1. POST /ladder/stats.php?action=search HTTP/1.1

game=W2BN&type=team&user_search=[INJECT]&x=1&y=10

  1. GET /ladder/stats.php?game=[INJECT]&type=[INJECT]&sortBy=username&sort_direction=[INJECT] HTTP/1.1

  2. GET /ladder/stats.php?game=W2BN&type=1&user=[INJECT] HTTP/1.1

@reillychase reillychase changed the title pvpgn-stats: Multiply SQL injection vulnerabilities, and mysql_* functions removed from PHP7 pvpgn-stats: Multiple SQL injection vulnerabilities, and mysql_* functions removed from PHP7 Sep 12, 2017
@KuroRaiken
Copy link

Is there an analogue of this monitoring?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@reillychase @KuroRaiken and others