SQL Injection Vulnerability in phpMyAdmin: CVE-2020-10804
Summary
CVE-2020-10804: In phpMyAdmin 4.x before 4.9.5 and 5.x before 5.0.2, a SQL injection vulnerability was found in retrieval of the current username (in libraries/classes/Server/Privileges.php and libraries/classes/UserPassword.php). Affects phpmyadmin across 2 version ranges.
< 4:4.9.5+dfsg1-1
>= 6da64cc3b2ba4439574f914f51e161645375be96, < 1651d674d65bdd032071733f57cfff9b496e7d85
Fixed in 4:4.9.5+dfsg1-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
phpMyAdmin is a widely used open-source tool for managing MySQL databases through a web interface. It allows users to perform various database operations such as creating, modifying, and deleting databases and tables. The tool is popular among developers and database administrators due to its ease of use and extensive features. However, phpMyAdmin versions 4.x before 4.9.5 and 5.x before 5.0.2 are vulnerable to a SQL injection attack that can compromise user accounts.
Vulnerability Detail
The vulnerability, identified as CVE-2020-10804, arises from improper handling of user input in the retrieval of the current username within the libraries/classes/Server/Privileges.php and libraries/classes/UserPassword.php files. A malicious user with access to the server can create a specially crafted username that, when manipulated, can trick a victim into executing specific actions with that user account, such as altering its privileges. This SQL injection vulnerability can lead to unauthorized access and manipulation of database privileges, posing a significant security risk.
How To Fix
Minimum fixed version
4:4.9.5+dfsg1-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade phpmyadmin
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading is not immediately possible, consider restricting access to phpMyAdmin to trusted IP addresses only. This can be done by configuring the web server to allow access based on IP address, thereby reducing the risk of exploitation until a proper fix is applied.
Conclusion
CVE-2020-10804 represents a significant security risk for phpMyAdmin users, particularly those using affected versions. Immediate action is recommended to upgrade to the latest versions to mitigate the risk of SQL injection attacks. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities in open-source software effectively.
See every vulnerability recorded for phpmyadmin →
FAQ
CVE-2020-10804 is a SQL injection vulnerability found in phpMyAdmin that allows a malicious user to manipulate user privileges through crafted usernames.
phpMyAdmin versions 4.x before 4.9.5 and 5.x before 5.0.2 are affected by this vulnerability.
You can use Vulert, which monitors open-source vulnerabilities in your software. By using the manifest file like package-lock.json, it can alert you in real-time. You can also check your application against this vulnerability using the Vulert playground without signup.
Exploitation of this vulnerability can lead to unauthorized access to user accounts, allowing attackers to alter database privileges and potentially compromise sensitive data.
The CVSS score for CVE-2020-10804 is 8.0, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for phpmyadmin.