# CVE-2022-23807: Improper Authentication in phpmyadmin

> Authenticated users can bypass two-factor authentication for future logins by manipulating their account settings in phpMyAdmin.

- **Severity:** Medium 4.3 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Jan 2022
- **Updated:** 3 Aug 2024
- **Also known as:** BIT-phpmyadmin-2022-23807, DEBIAN-CVE-2022-23807, GHSA-8wf2-3ggj-78q9, UBUNTU-CVE-2022-23807

## What is CVE-2022-23807?

CVE-2022-23807 is a medium-severity authentication bypass vulnerability in Phpmyadmin Phpmyadmin, published on 22 Jan 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

An issue was discovered in phpMyAdmin 4.9 before 4.9.8 and 5.1 before 5.1.2. A valid user who is already authenticated to phpMyAdmin can manipulate their account to bypass two-factor authentication for future login instances.

Weakness: CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2022-23807?

5 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 4.9.0 | 4.9.8 |
| `phpmyadmin/phpmyadmin` | Packagist | From 4.9.0 | 4.9.8 |
| `phpmyadmin/phpmyadmin` | Packagist | From 5.1.0 | 5.1.2 |
| `phpmyadmin/phpmyadmin` | Packagist | From 5.1.0 | 5.1.2 |
| `phpmyadmin` | Bitnami | From 4.9.0 | 4.9.8, 5.1.2 |

Products: Phpmyadmin Phpmyadmin.

## How do I fix CVE-2022-23807?

Upgrade phpmyadmin/phpmyadmin to a fixed version for your release line: 4.9.8 or 5.1.2.

## Is CVE-2022-23807 being exploited?

There is no known exploitation of CVE-2022-23807 in the wild and no public exploit code.

## 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-2020-22452](https://insights.sbomify.com/CVE-2020-22452/): phpmyadmin contains SQL Injection vulnerability (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-23807 and fix it if it is affected.

What it is: CVE-2022-23807 is a medium-severity authentication bypass vulnerability in Phpmyadmin Phpmyadmin, published on 22 Jan 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-23807 in the wild and no public exploit code.

Affected packages and fixed versions:
- phpmyadmin/phpmyadmin (Packagist): affected from 4.9.0; fixed in 4.9.8
- phpmyadmin/phpmyadmin (Packagist): affected from 4.9.0; fixed in 4.9.8
- phpmyadmin/phpmyadmin (Packagist): affected from 5.1.0; fixed in 5.1.2
- phpmyadmin/phpmyadmin (Packagist): affected from 5.1.0; fixed in 5.1.2
- phpmyadmin (Bitnami): affected from 4.9.0; fixed in 4.9.8, 5.1.2

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-2022-23807/ (Markdown: https://insights.sbomify.com/CVE-2022-23807/index.md)
```

## Sources

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

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