# CVE-2020-22452: phpmyadmin contains SQL Injection vulnerability

> An attacker can execute arbitrary SQL commands via crafted parameters in phpMyAdmin, potentially reading or modifying database contents.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Jan 2023
- **Updated:** 9 Jul 2026
- **Also known as:** BIT-phpmyadmin-2020-22452, DEBIAN-CVE-2020-22452, GHSA-prcg-mc23-hgjh, UBUNTU-CVE-2020-22452

## What is CVE-2020-22452?

CVE-2020-22452 is a critical SQL injection vulnerability in Phpmyadmin Phpmyadmin, published on 26 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2020-22452?

3 open source packages ship an affected version, including phpmyadmin/phpmyadmin and phpmyadmin. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `phpmyadmin/phpmyadmin` | Packagist | From 5.0.0 | 5.0.2 |
| `phpmyadmin/phpmyadmin` | Packagist | From 5.0.0 | 5.0.2 |
| `phpmyadmin` | Bitnami | From 5.0.0 | 5.2.0 |

Products: Phpmyadmin Phpmyadmin.

## How do I fix CVE-2020-22452?

Upgrade phpmyadmin/phpmyadmin to 5.0.2 or later.

## Is CVE-2020-22452 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2020-22452 exists.

## Other vulnerabilities in Phpmyadmin Phpmyadmin

- [CVE-2008-7251](https://insights.sbomify.com/CVE-2008-7251/): Misconfiguration in n/a (critical 10.0)
- [CVE-2008-7252](https://insights.sbomify.com/CVE-2008-7252/): phpMyAdmin unsafely handles temporary files (critical 10.0)
- [CVE-2007-0203](https://insights.sbomify.com/CVE-2007-0203/): Other in n/a (critical 10.0)
- [CVE-2004-1147](https://insights.sbomify.com/CVE-2004-1147/): Command injection in n/a (critical 10.0)
- [CVE-2019-11768](https://insights.sbomify.com/CVE-2019-11768/): phpMyAdmin SQL injection in Designer feature (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-22452 and fix it if it is affected.

What it is: CVE-2020-22452 is a critical SQL injection vulnerability in Phpmyadmin Phpmyadmin, published on 26 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2020-22452 exists.

Affected packages and fixed versions:
- phpmyadmin/phpmyadmin (Packagist): affected from 5.0.0; fixed in 5.0.2
- phpmyadmin/phpmyadmin (Packagist): affected from 5.0.0; fixed in 5.0.2
- phpmyadmin (Bitnami): affected from 5.0.0; fixed in 5.2.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-22452/ (Markdown: https://insights.sbomify.com/CVE-2020-22452/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-22452
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-22452
- OSV: https://osv.dev/vulnerability/CVE-2020-22452

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-22452/
Summaries are generated and may contain mistakes; the official description above is the record.
