CVE-2020-22452: SQL Injection vulnerability in phpmyadmin/phpmyadmin

phpmyadmin/phpmyadmin Updated 02 Oct 2025

Summary

26/01/2023
Yes i
Critical
9.8

CVE-2020-22452: phpmyadmin contains SQL Injection vulnerability. Affects phpmyadmin/phpmyadmin versions >= 5.0.0, < 5.0.2. Fixed in 5.0.2. How to fix ↓

Also tracked for

The same CVE-2020-22452 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

phpMyAdmin is a popular open-source tool written in PHP for managing MySQL databases. It provides a web-based interface that allows users to perform various database management tasks such as creating, modifying, and deleting databases, tables, and records. The vulnerability identified as CVE-2020-22452 affects phpMyAdmin version 5.x before 5.0.2. This vulnerability specifically targets the 'getTableCreationQuery' function in 'CreateAddField.php' and can be exploited through the 'tbl_storage_engine' or 'tbl_collation' parameters in 'tbl_create.php'.

Vulnerability Detail

The SQL Injection vulnerability in phpMyAdmin allows an attacker to inject malicious SQL code into the 'tbl_storage_engine' or 'tbl_collation' parameters, which are used in the 'getTableCreationQuery' function. By exploiting this vulnerability, an attacker can execute arbitrary SQL queries, potentially gaining unauthorized access to the database, modifying data, or even executing remote code. This vulnerability has a severity rating of CRITICAL with a CVSS score of 9.8.

How To Fix

Minimum fixed version

5.0.2

This is the first release that contains the fix.

composer require phpmyadmin/phpmyadmin:5.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can implement input validation and sanitization techniques to prevent the injection of malicious SQL code. It is recommended to thoroughly validate and sanitize user input before using it in SQL queries. Additionally, implementing parameterized queries or prepared statements can help prevent SQL Injection attacks by separating the SQL code from the user input.

Conclusion

The SQL Injection vulnerability in phpMyAdmin poses a significant risk to the security of MySQL databases. It is crucial for users to upgrade their phpMyAdmin installation to version 5.0.2 or later to mitigate this vulnerability. Implementing input validation, sanitization techniques, and using parameterized queries can also help prevent SQL Injection attacks. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for phpmyadmin/phpmyadmin →

Share this vulnerability

FAQ

phpMyAdmin is an open-source tool for managing MySQL databases through a web-based interface. It provides a convenient way to perform various database management tasks.

SQL Injection is a type of security vulnerability that allows an attacker to manipulate SQL queries by injecting malicious code. This can lead to unauthorized access, data manipulation, or even remote code execution.

The SQL Injection vulnerability in phpMyAdmin allows attackers to execute arbitrary SQL queries, potentially gaining unauthorized access to the database, modifying data, or executing remote code.

This vulnerability has a severity rating of CRITICAL with a CVSS score of 9.8.

To fix this vulnerability, users should upgrade their phpMyAdmin installation to version 5.0.2 or later. The phpMyAdmin development team has released a patch that addresses this issue.

Related vulnerabilities

Recent vulnerabilities recorded for phpmyadmin/phpmyadmin.

How To Fix

Minimum fixed version

5.0.2

This is the first release that contains the fix.

composer require phpmyadmin/phpmyadmin:5.0.2

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