SQL Injection Vulnerability in phpMyAdmin: CVE-2020-5504

phpmyadmin Updated 02 Oct 2025

Summary

09/01/2020
N/A
Yes i
High
8.8

CVE-2020-5504: In phpMyAdmin 4 before 4.9.4 and 5 before 5.0.1, SQL injection exists in the user accounts page. Affects phpmyadmin across 2 version ranges.

< 4:4.9.4+dfsg1-1 >= 6da64cc3b2ba4439574f914f51e161645375be96, < b732639282104efbc42b3bc040e532649d93a1fe

Fixed in 4:4.9.4+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 for its ease of use and rich feature set. However, certain versions of phpMyAdmin are vulnerable to SQL injection attacks, which can compromise the security of the database.

Vulnerability Detail

CVE-2020-5504 is an SQL injection vulnerability found in phpMyAdmin versions prior to 4.9.4 and 5.0.1. This vulnerability arises from improper handling of user input on the user accounts page, allowing a malicious user to inject arbitrary SQL code in place of their username. An attacker must possess a valid MySQL account to exploit this vulnerability, potentially leading to unauthorized access to sensitive data, data manipulation, or even complete database compromise. The vulnerability has a CVSS score of 8.8, indicating a high severity level.

How To Fix

Minimum fixed version

4:4.9.4+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

As a temporary workaround, users can restrict access to the phpMyAdmin interface by implementing IP whitelisting or using firewall rules to limit access to trusted IP addresses only. This does not eliminate the vulnerability but can reduce the risk of exploitation.

Conclusion

CVE-2020-5504 is a significant SQL injection vulnerability in phpMyAdmin that can lead to severe security risks if not addressed. Users are strongly advised to upgrade to the latest versions to mitigate potential threats. Additionally, implementing access controls can provide a temporary safeguard until an upgrade can be performed.

See every vulnerability recorded for phpmyadmin →

Share this vulnerability

FAQ

CVE-2020-5504 is a SQL injection vulnerability in phpMyAdmin that allows attackers to inject malicious SQL code through the user accounts page.

phpMyAdmin versions prior to 4.9.4 and 5.0.1 are vulnerable to this SQL injection issue.

You can check your phpMyAdmin version in the interface or by looking at the version number in the installation directory. If it is below 4.9.4 or 5.0.1, it is vulnerable.

If an immediate upgrade is not possible, consider implementing access restrictions to the phpMyAdmin interface as a temporary measure.

More information can be found on the official CVE website or through security advisories related to phpMyAdmin.

Related vulnerabilities

Recent vulnerabilities recorded for phpmyadmin.

How To Fix

Minimum fixed version

4:4.9.4+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