CVE-2020-22452: SQL Injection vulnerability in phpMyAdmin

phpmyadmin Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Critical
Not published

CVE-2020-22452: SQL Injection vulnerability in function getTableCreationQuery in CreateAddField.php in phpMyAdmin 5.x before 5.2.0 via the tbl_storage_engine or tbl_collation parameters to tbl_create.php. Affects phpmyadmin versions >= 5.0.0, < 5.2.0. Fixed in 5.2.0. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

phpMyAdmin is a popular open-source tool for managing MySQL databases. It provides a web-based interface that allows users to perform various database management tasks. This vulnerability affects phpMyAdmin versions 5.x before 5.2.0. The vulnerability exists in the 'getTableCreationQuery' function in 'CreateAddField.php' file, specifically in the handling of the 'tbl_storage_engine' or 'tbl_collation' parameters in the 'tbl_create.php' file. An attacker can exploit this vulnerability to execute arbitrary SQL queries, potentially leading to unauthorized access, data manipulation, or even remote code execution.

Vulnerability Detail

The SQL Injection vulnerability in phpMyAdmin allows an attacker to inject malicious SQL code through the 'tbl_storage_engine' or 'tbl_collation' parameters in the 'tbl_create.php' file. This vulnerability arises due to insufficient input validation and sanitization. By crafting a specially crafted request, an attacker can manipulate the SQL query executed by the application, leading to unauthorized access, data manipulation, or remote code execution. This vulnerability has a critical severity score of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

How To Fix

Minimum fixed version

5.2.0

This is the first release that contains the fix.

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

Workaround

If upgrading to the latest version is not immediately possible, a temporary workaround can be implemented by disabling or restricting access to the 'tbl_create.php' file. This can be achieved by modifying the server configuration or using access control mechanisms to block unauthorized access to the vulnerable file.

Conclusion

The SQL Injection vulnerability in phpMyAdmin can have severe consequences, including unauthorized access, data manipulation, or remote code execution. It is crucial to upgrade to the latest version of phpMyAdmin (5.2.0 or later) to mitigate this vulnerability. If immediate upgrade is not possible, implementing a temporary workaround by restricting access to the vulnerable file can provide some protection. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for phpmyadmin →

Share this vulnerability

FAQ

phpMyAdmin is an open-source tool for managing MySQL databases. It provides a web-based interface for performing various database management tasks.

This vulnerability affects phpMyAdmin versions 5.x before 5.2.0.

Exploiting this vulnerability can lead to unauthorized access, data manipulation, or even remote code execution.

To fix this vulnerability, it is recommended to upgrade to phpMyAdmin version 5.2.0 or later.

Yes, a temporary workaround can be implemented by disabling or restricting access to the 'tbl_create.php' file.

Related vulnerabilities

Recent vulnerabilities recorded for phpmyadmin.

How To Fix

Minimum fixed version

5.2.0

This is the first release that contains the fix.

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