# CVE-2021-21311: Adminer Server-Side Request Forgery

> Server-side request forgery in Adminer allows attackers to interact with internal services when using the bundled driver version.

- **Severity:** High 7.2 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Yes, since 29 Sep 2025 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 11 Feb 2021
- **Updated:** 21 Oct 2025
- **Also known as:** DEBIAN-CVE-2021-21311, DLA-2580-1, GHSA-x5r2-hj5c-8jx6, UBUNTU-CVE-2021-21311

## What is CVE-2021-21311?

CVE-2021-21311 is a high-severity server-side request forgery vulnerability in Debian Debian Linux, published on 11 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Adminer is an open-source database management in a single PHP file. In adminer from version 4.0.0 and before 4.7.9 there is a server-side request forgery vulnerability. Users of Adminer versions bundling all drivers (e.g. `adminer.php`) are affected. This is fixed in version 4.7.9.

Weakness: CWE-918 (Server-Side Request Forgery)

## Which versions are affected by CVE-2021-21311?

2 open source packages ship an affected version, including vrana/adminer. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `vrana/adminer` | Packagist | All versions | 4.7.9 |
| `vrana/adminer` | Packagist | All versions | 4.7.9 |

Products: Adminer Adminer, Debian Debian Linux.

## How do I fix CVE-2021-21311?

Upgrade vrana/adminer to 4.7.9 or later. US federal agencies must fix it by 20 Oct 2025.

## Is CVE-2021-21311 being exploited?

Yes. Attackers have exploited CVE-2021-21311 in the wild since at least 29 Sep 2025.

Public exploit code:

- Adminer is an open-source database management in a single PHP file. In adminer from version 4.0.0 and before 4.7.9 there is a server-side request forgery vulnerability. Users of Adminer versions bundling all drivers (e.g. `adminer.php`) are affected. This is fixed in version 4.7.9. (github_poc): https://github.com/llhala/CVE-2021-21311
- https://github.com/omoknooni/CVE-2021-21311 (github_poc): https://github.com/omoknooni/CVE-2021-21311
- A secure, zero-trust database management tool for WordPress. Fixes critical SSRF vulnerabilities (CVE-2021-21311) by enforcing local connections only. (github_poc): https://github.com/Sudo-WP/sudowp-adminer
- Adminer <4.7.9 - Server-Side Request Forgery (nuclei): http/cves/2021/CVE-2021-21311.yaml

## Other vulnerabilities in Debian Debian Linux

- [CVE-2018-7667](https://insights.sbomify.com/CVE-2018-7667/): vrana/adminer vulnerable to SSRF by connecting to privileged ports (critical 9.8)
- [CVE-2025-43960](https://insights.sbomify.com/CVE-2025-43960/): Adminer PHP Object Injection issue leads to Denial of Service (high 8.6)
- [CVE-2026-25892](https://insights.sbomify.com/CVE-2026-25892/): Adminer has an Unauthenticated Persistent DoS via Array Injection in ?script=version Endpoint (high 7.5)
- [CVE-2021-43008](https://insights.sbomify.com/CVE-2021-43008/): Files or Directories Accessible to External Parties in Adminer (high 7.5)
- [CVE-2021-29625](https://insights.sbomify.com/CVE-2021-29625/): XSS in doc_link (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-21311 and fix it if it is affected.

What it is: CVE-2021-21311 is a high-severity server-side request forgery vulnerability in Debian Debian Linux, published on 11 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2021-21311 in the wild since at least 29 Sep 2025.

Affected packages and fixed versions:
- vrana/adminer (Packagist): affected all versions; fixed in 4.7.9
- vrana/adminer (Packagist): affected all versions; fixed in 4.7.9

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

## Sources

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

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