SQL Injection Vulnerability in phpMyAdmin: CVE-2020-10804

phpmyadmin Updated 02 Oct 2025

Summary

22/03/2020
N/A
Yes i
High
8.0

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for phpmyadmin.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback