CVE DatabaseCVE-2021-21311
한국어 권고문 →
CVE-2021-213117.2/HIGHCISA KEVCWE-918

Adminer Database Management Tool Server-Side Request Forgery (SSRF) Vulnerability (CVE-2021-21311)

⚡ Jump to Patch
Affected Vendors
vrana
Affected Components
adminer
Published Date
2021-02-11
CVSS v3.1
7.2
HIGH
EPSS (30d)
98.5%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Adminer versions 4.0.0 up to (but excluding) 4.7.9, specifically when using the bundled driver package (e.g., adminer.php)

Impact

Unauthenticated remote attackers can abuse the system to scan internal networks, probe private ports, and access sensitive internal APIs or cloud metadata services (IMDS)

Mitigation

Immediately upgrade Adminer to version 4.7.9 or higher, and restrict access to the Adminer interface using network-level controls

Affected Products & Version Scope

Adminer versions 4.0.0 through 4.7.8 (all-in-one bundled distributions)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

The recommended remediation is to upgrade Adminer to the latest secure version (4.7.9 or higher). Use the following commands to replace the vulnerable adminer.php file with the patched version.

bash
# Back up the vulnerable adminer.php and download the secure version (4.8.1)
mv /var/www/html/adminer.php /var/www/html/adminer.php.bak
wget -O /var/www/html/adminer.php https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1.php

# Set appropriate ownership and permissions
chown www-data:www-data /var/www/html/adminer.php
chmod 644 /var/www/html/adminer.php

2. Temporary Workaround & Hardening Configuration

If an immediate upgrade is not feasible, restrict access to the Adminer script at the web server level to authorized IP addresses only.

nginx
# Nginx configuration workaround (/etc/nginx/sites-available/default)
location /adminer.php {
    # Allow trusted internal IP ranges only
    allow 192.168.1.0/24;
    allow 203.0.113.50;
    deny all;

    fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

3. Log Audit & IoC Verification Commands

Verify the currently deployed Adminer version and inspect web server access logs for potential SSRF exploitation attempts targeting internal IP addresses.

bash
# 1. Check the installed Adminer version
grep -i 'VERSION =' /var/www/html/adminer.php | head -n 1

# 2. Scan access logs for suspicious loopback or private IP patterns in Adminer requests
egrep -i '(127\.0\.0\.1|localhost|169\.254\.169\.254|10\.[0-9]|192\.168)' /var/log/nginx/access.log /var/log/apache2/access.log | grep -i 'adminer'
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
Due to active exploitation (CISA KEV), immediately upgrade Adminer to version 4.7.9+ and restrict public network access.

Block Exploits Instantly with Managed Virtual Patching Rules

Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

Adminer is a popular open-source database management tool distributed as a single PHP file. In versions 4.0.0 through 4.7.8, a Server-Side Request Forgery (SSRF, CWE-918) vulnerability exists within the bundled driver configurations. The root cause lies in insufficient validation of user-supplied database host connection parameters, allowing the application to initiate arbitrary outbound TCP connections on behalf of the server.

2. Exploitation Mechanics & Attack Scenario

An attacker can exploit this vulnerability by manipulating the database server address field on the Adminer login page. Instead of connecting to a legitimate external database, the attacker inputs loopback addresses ('127.0.0.1') or internal private IP ranges ('10.0.0.0/8', '192.168.0.0/16') along with targeted port numbers. The Adminer backend attempts to establish a socket connection to these internal destinations. Based on the connection timeout or error messages returned, the attacker can map active internal services and potentially query sensitive endpoints, such as the Cloud Instance Metadata Service (IMDS) at '169.254.169.254'.

3. Infrastructure & Business Impact

This vulnerability is highly critical and is actively exploited in the wild, as evidenced by its inclusion in the CISA KEV catalog. A successful compromise allows attackers to bypass perimeter firewalls and gain visibility into isolated internal networks. This exposure can lead to lateral movement, internal service exploitation, and potential data exfiltration, severely compromising the overall security posture of the enterprise infrastructure.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2021-21311)

FAQ

Q1. How critical is CVE-2021-21311 and is it actively exploited in the wild?

CVE-2021-21311 is rated CVSS 7.2 (HIGH) with a 30-day EPSS exploitation probability of 98.5%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2021-21311?

Primary impacted vendors include vrana across adminer. Scope summary: Adminer versions 4.0.0 through 4.7.8 (all-in-one bundled distributions)

Q3. What temporary mitigations or workarounds exist for CVE-2021-21311 before patching?

[Mitigation] Immediately upgrade Adminer to version 4.7.9 or higher, and restrict access to the Adminer interface using network-level controls Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2021-21311

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (vrana)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2021-21311 Adminer Database Management Tool Server-Side Request Forgery (SSRF) Vulnerability (CVE-2021-21311) (CVSS 7.2) - Patch & Workaround | CVE Pulse